Akegarasu / Akegarasu/lora-scripts

Docker 镜像无法正常使用 xformers

Đang mở
#672 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
Ngôn ngữ chính
Python
Star
6.1k
Fork
699
Chỉ số merge pull request
Không có pull request nào được merge trong 30 ngày

Mô tả

```python
trainer | 18:56:52-195655 INFO Found 1 legal dataset
trainer | 18:56:52-214717 INFO Training started with config file /
trainer | 训练开始,使用配置文件:
trainer | /app/lora-scripts/config/autosave/20250414-185652.toml
trainer | 18:56:52-215951 INFO Using GPU(s) / 使用 GPU: ['0']
trainer | 18:56:52-216845 INFO Task f2a905f9-333d-4f27-90b7-221dbd89f316 created
trainer | [WARNING | __main__ ]: The following values were not passed to `accelerate launch` and had defaults used instead:
trainer | `--num_processes` was set to a value of `1`
trainer | `--num_machines` was set to a value of `1`
trainer | `--mixed_precision` was set to a value of `'no'`
trainer | `--dynamo_backend` was set to a value of `'no'`
trainer | To avoid this warning pass in values for each of the problematic parameters or run `accelerate config`.
trainer | [WARNING | xformers ]: WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for:
trainer | PyTorch 2.4.0+cu121 with CUDA 1201 (you have 2.4.0a0+3bcc3cddb5.nv24.07)
trainer | Python 3.10.14 (you have 3.10.12)
trainer | Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers)
trainer | Memory-efficient attention, SwiGLU, sparse and more won't be available.
trainer | Set XFORMERS_MORE_DETAILS=1 for more details
trainer | 2025-04-14 18:56:58 INFO prepare tokenizers sdxl_train_util.py:138
trainer | 2025-04-14 18:57:00 INFO update token length: 255 sdxl_train_util.py:163
trainer | INFO Using DreamBooth method. train_network.py:172
trainer | INFO prepare images. train_util.py:1686
trainer | INFO found directory train_util.py:1633
trainer | /app/lora-scripts/resources/reso
trainer | urces/images/03/1_zkz contains
trainer | 135 image files
trainer | 2025-04-14 18:57:01 INFO 135 train images with repeating. train_util.py:1727
trainer | INFO 0 reg images. train_util.py:1730
trainer | WARNING no regularization images / train_util.py:1735
trainer | 正則化画像が見つかりませんでした
trainer | INFO [Dataset 0] config_util.py:572
trainer | batch_size: 2
trainer | resolution: (1024, 1024)
trainer | enable_bucket: True
trainer | network_multiplier: 1.0
trainer | min_bucket_reso: 256
trainer | max_bucket_reso: 1024
trainer | bucket_reso_steps: 64
trainer | bucket_no_upscale: True
trainer |
trainer | [Subset 0 of Dataset 0]
trainer | image_dir:
trainer | "/app/lora-scripts/resources/res
trainer | ources/images/03/1_zkz"
trainer | image_count: 135
trainer | num_repeats: 1
trainer | shuffle_caption: False
trainer | keep_tokens: 0
trainer | keep_tokens_separator:
trainer | caption_separator: ,
trainer | secondary_separator: None
trainer | enable_wildcard: False
trainer | caption_dropout_rate: 0.0
trainer | caption_dropout_every_n_epoc
trainer | hes: 0
trainer | caption_tag_dropout_rate:
trainer | 0.0
trainer | caption_prefix: None
trainer | caption_suffix: None
trainer | color_aug: False
trainer | flip_aug: False
trainer | face_crop_aug_range: None
trainer | random_crop: False
trainer | token_warmup_min: 1,
trainer | token_warmup_step: 0,
trainer | alpha_mask: False,
trainer | is_reg: False
trainer | class_tokens: zkz
trainer | caption_extension: .txt
trainer |
trainer |
trainer | INFO [Dataset 0] config_util.py:578
trainer | INFO loading image sizes. train_util.py:901
100%|██████████| 135/135 [00:00<00:00, 498.63it/s]
trainer | 2025-04-14 18:57:02 INFO make buckets train_util.py:907
trainer | WARNING min_bucket_reso and train_util.py:924
trainer | max_bucket_reso are ignored if
trainer | bucket_no_upscale is set, because
trainer | bucket reso is defined by image
trainer | size automatically /
trainer | bucket_no_upscaleが指定された場合
trainer | は、bucketの解像度は画像サイズか
trainer | ら自動計算されるため、min_bucket_
trainer | resoとmax_bucket_resoは無視されま
trainer | す
trainer | INFO number of images (including train_util.py:953
trainer | repeats) /
trainer | 各bucketの画像枚数(繰り返し回数
trainer | を含む)
trainer | INFO bucket 0: resolution (1024, train_util.py:958
trainer | 1024), count: 16
trainer | INFO bucket 1: resolution (1088, 832), train_util.py:958
trainer | count: 119
trainer | INFO mean ar error (without repeats): train_util.py:963
trainer | 0.017536103743000367
trainer | INFO preparing accelerator train_network.py:225
trainer | accelerator device: cuda
trainer | INFO loading model for process 0/1 sdxl_train_util.py:33
trainer | INFO load StableDiffusion sdxl_train_util.py:74
trainer | checkpoint:
trainer | /app/lora-scripts/models/chec
trainer | kpoints/SDXL/sdxlNijiSeven_sd
trainer | xlNijiSeven.safetensors
trainer | 2025-04-14 18:57:09 INFO building U-Net sdxl_model_util.py:198
trainer | INFO loading U-Net from sdxl_model_util.py:202
trainer | checkpoint
trainer | 2025-04-14 18:58:28 INFO U-Net:
trainer | INFO building text encoders sdxl_model_util.py:211
trainer | INFO loading text encoders from sdxl_model_util.py:264
trainer | checkpoint
trainer | 2025-04-14 18:58:32 INFO text encoder 1:
trainer | 2025-04-14 18:58:55 INFO text encoder 2:
trainer | INFO building VAE sdxl_model_util.py:285
trainer | INFO loading VAE from checkpoint sdxl_model_util.py:290
trainer | INFO VAE:
trainer | INFO Enable xformers for U-Net train_util.py:2832
trainer | Traceback (most recent call last):
trainer | File "/app/lora-scripts/./scripts/stable/sdxl_train_network.py", line 184, in
trainer | trainer.train(args)
trainer | File "/app/lora-scripts/scripts/stable/train_network.py", line 242, in train
trainer | vae.set_use_memory_efficient_attention_xformers(args.xformers)
trainer | File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_utils.py", line 262, in set_use_memory_efficient_attention_xformers
trainer | fn_recursive_set_mem_eff(module)
trainer | File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_utils.py", line 258, in fn_recursive_set_mem_eff
trainer | fn_recursive_set_mem_eff(child)
trainer | File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_utils.py", line 258, in fn_recursive_set_mem_eff
trainer | fn_recursive_set_mem_eff(child)
trainer | File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_utils.py", line 258, in fn_recursive_set_mem_eff
trainer | fn_recursive_set_mem_eff(child)
trainer | File "/usr/local/lib/python3.10/dist-packages/diffusers/models/modeling_utils.py", line 255, in fn_recursive_set_mem_eff
trainer | module.set_use_memory_efficient_attention_xformers(valid, attention_op)
trainer | File "/usr/local/lib/python3.10/dist-packages/diffusers/models/attention_processor.py", line 273, in set_use_memory_efficient_attention_xformers
trainer | raise e
trainer | File "/usr/local/lib/python3.10/dist-packages/diffusers/models/attention_processor.py", line 267, in set_use_memory_efficient_attention_xformers
trainer | _ = xformers.ops.memory_efficient_attention(
trainer | File "/usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/__init__.py", line 276, in memory_efficient_attention
trainer | return _memory_efficient_attention(
trainer | File "/usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/__init__.py", line 395, in _memory_efficient_attention
trainer | return _memory_efficient_attention_forward(
trainer | File "/usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/__init__.py", line 414, in _memory_efficient_attention_forward
trainer | op = _dispatch_fw(inp, False)
trainer | File "/usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/dispatch.py", line 119, in _dispatch_fw
trainer | return _run_priority_list(
trainer | File "/usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/dispatch.py", line 55, in _run_priority_list
trainer | raise NotImplementedError(msg)
trainer | NotImplementedError: No operator found for `memory_efficient_attention_forward` with inputs:
trainer | query : shape=(1, 2, 1, 40) (torch.float32)
trainer | key : shape=(1, 2, 1, 40) (torch.float32)
trainer | value : shape=(1, 2, 1, 40) (torch.float32)
trainer | attn_bias :
trainer | p : 0.0
trainer | `decoderF` is not supported because:
trainer | xFormers wasn't build with CUDA support
trainer | attn_bias type is
trainer | operator wasn't built - see `python -m xformers.info` for more info
trainer | `flshattF@2.5.6-pt` is not supported because:
trainer | xFormers wasn't build with CUDA support
trainer | dtype=torch.float32 (supported: {torch.float16, torch.bfloat16})
trainer | `cutlassF` is not supported because:
trainer | xFormers wasn't build with CUDA support
trainer | operator wasn't built - see `python -m xformers.info` for more info
trainer | `smallkF` is not supported because:
trainer | max(query.shape[-1] != value.shape[-1]) > 32
trainer | xFormers wasn't build with CUDA support
trainer | operator wasn't built - see `python -m xformers.info` for more info
trainer | unsupported embed per head: 40
trainer | 18:58:57-701463 ERROR Training failed / 训练失败
```

Hướng dẫn đóng góp

Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.