hollowstrawberry / kohya-colab

Accessible Google Colab notebooks for Stable Diffusion Lora training, based on the work of kohya-ss and Linaqruf
GNU General Public License v3.0
561 stars 80 forks source link

Problem with xformer and cuda #89

Closed GeoffreyOlivier closed 3 months ago

GeoffreyOlivier commented 4 months ago

๐Ÿ“‚ Connecting to Google Drive... Mounted at /content/drive

๐Ÿ’ฟ Checking dataset... ๐Ÿ“MyDrive/Loras/Charles_Lora/dataset ๐Ÿ“ˆ Found 12 images with 10 repeats, equaling 120 steps. ๐Ÿ“‰ Divide 120 steps by 2 batch size to get 60.0 steps per epoch. ๐Ÿ”ฎ There will be 10 epochs, for around 600 total training steps.

๐Ÿญ Installing dependencies...

Cloning into '/content/kohya-trainer'... remote: Enumerating objects: 5909, done. remote: Counting objects: 100% (5909/5909), done. remote: Compressing objects: 100% (1873/1873), done. remote: Total 5909 (delta 4201), reused 5591 (delta 4024), pack-reused 0 Receiving objects: 100% (5909/5909), 9.23 MiB | 7.85 MiB/s, done. Resolving deltas: 100% (4201/4201), done. HEAD is now at e6ad3cb Merge pull request #478 from rockerBOO/patch-1 39 packages can be upgraded. Run 'apt list --upgradable' to see them. The following additional packages will be installed: libaria2-0 libc-ares2 The following NEW packages will be installed: aria2 libaria2-0 libc-ares2 0 upgraded, 3 newly installed, 0 to remove and 39 not upgraded. Need to get 1,513 kB of archives. After this operation, 5,441 kB of additional disk space will be used. Selecting previously unselected package libc-ares2:amd64. (Reading database ... 121749 files and directories currently installed.) Preparing to unpack .../libc-ares2_1.18.1-1ubuntu0.22.04.3_amd64.deb ... Unpacking libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ... Selecting previously unselected package libaria2-0:amd64. Preparing to unpack .../libaria2-0_1.36.0-1_amd64.deb ... Unpacking libaria2-0:amd64 (1.36.0-1) ... Selecting previously unselected package aria2. Preparing to unpack .../aria2_1.36.0-1_amd64.deb ... Unpacking aria2 (1.36.0-1) ... Setting up libc-ares2:amd64 (1.18.1-1ubuntu0.22.04.3) ... Setting up libaria2-0:amd64 (1.36.0-1) ... Setting up aria2 (1.36.0-1) ... Processing triggers for man-db (2.10.2-1) ... Processing triggers for libc-bin (2.35-0ubuntu3.4) ... /sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_5.so.3 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc_proxy.so.2 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbbbind_2_0.so.3 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbbmalloc.so.2 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbbbind.so.3 is not a symbolic link

/sbin/ldconfig.real: /usr/local/lib/libtbb.so.12 is not a symbolic link

Preparing metadata (setup.py) ... done โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 191.5/191.5 kB 5.0 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 6.3/6.3 MB 64.4 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 53.1/53.1 kB 6.9 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 41.6/41.6 kB 4.2 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 503.1/503.1 kB 41.7 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 825.8/825.8 kB 46.1 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 92.6/92.6 MB 9.1 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 489.8/489.8 MB 3.3 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 1.3/1.3 MB 73.8 MB/s eta 0:00:00 Installing build dependencies ... done Getting requirements to build wheel ... done Preparing metadata (pyproject.toml) ... done Preparing metadata (setup.py) ... done โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 211.5/211.5 MB 6.2 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 7.8/7.8 MB 99.9 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 840.4/840.4 kB 62.2 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 5.5/5.5 MB 103.5 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 440.7/440.7 kB 43.5 MB/s eta 0:00:00 โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ”โ” 1.7/1.7 MB 86.7 MB/s eta 0:00:00 Building wheel for dadaptation (pyproject.toml) ... done Building wheel for lycoris_lora (setup.py) ... done Building wheel for library (setup.py) ... done

โœ… Installation finished in 149 seconds.

๐Ÿ”„ Downloading model...

Download Results: gid |stat|avg speed |path/URI ======+====+===========+======================================================= fa016a|OK | 222MiB/s|//content/AnyLoRA_noVae_fp16-pruned.ckpt

Status Legend: (OK):download completed.

๐Ÿ“„ Config saved to /content/drive/MyDrive/Loras/Charles_Lora/training_config.toml ๐Ÿ“„ Dataset config saved to /content/drive/MyDrive/Loras/Charles_Lora/dataset_config.toml

โญ Starting trainer...

WARNING[XFORMERS]: xFormers can't load C++/CUDA extensions. xFormers was built for: PyTorch 2.1.0+cu118 with CUDA 1108 (you have 2.1.0+cu121) Python 3.10.13 (you have 3.10.12) Please reinstall xformers (see https://github.com/facebookresearch/xformers#installing-xformers) Memory-efficient attention, SwiGLU, sparse and more won't be available. Set XFORMERS_MORE_DETAILS=1 for more details CUDA backend failed to initialize: Found CUDA version 12010, but JAX was built against version 12020, which is newer. The copy of CUDA that is installed must be at least as new as the version against which JAX was built. (Set TF_CPP_MIN_LOG_LEVEL=0 and rerun for more info.) Loading settings from /content/drive/MyDrive/Loras/Charles_Lora/training_config.toml... /content/drive/MyDrive/Loras/Charles_Lora/training_config prepare tokenizer vocab.json: 100% 961k/961k [00:00<00:00, 62.5MB/s] merges.txt: 100% 525k/525k [00:00<00:00, 1.82MB/s] special_tokens_map.json: 100% 389/389 [00:00<00:00, 2.24MB/s] tokenizer_config.json: 100% 905/905 [00:00<00:00, 4.10MB/s] update token length: 225 Load dataset config from /content/drive/MyDrive/Loras/Charles_Lora/dataset_config.toml prepare images. found directory /content/drive/MyDrive/Loras/Charles_Lora/dataset contains 12 image files 120 train images with repeating. 0 reg images. no regularization images / ๆญฃๅ‰‡ๅŒ–็”ปๅƒใŒ่ฆ‹ใคใ‹ใ‚Šใพใ›ใ‚“ใงใ—ใŸ [Dataset 0] batch_size: 2 resolution: (512, 512) enable_bucket: True min_bucket_reso: 256 max_bucket_reso: 1024 bucket_reso_steps: 64 bucket_no_upscale: False

[Subset 0 of Dataset 0] image_dir: "/content/drive/MyDrive/Loras/Charles_Lora/dataset" image_count: 12 num_repeats: 10 shuffle_caption: True keep_tokens: 1 caption_dropout_rate: 0.0 caption_dropout_every_n_epoches: 0 caption_tag_dropout_rate: 0.0 color_aug: False flip_aug: True face_crop_aug_range: None random_crop: False token_warmup_min: 1, token_warmup_step: 0, is_reg: False class_tokens: None caption_extension: .txt

[Dataset 0] loading image sizes. 100% 12/12 [00:10<00:00, 1.10it/s] make buckets number of images (including repeats) / ๅ„bucketใฎ็”ปๅƒๆžšๆ•ฐ๏ผˆ็นฐใ‚Š่ฟ”ใ—ๅ›žๆ•ฐใ‚’ๅซใ‚€๏ผ‰ bucket 0: resolution (512, 512), count: 120 mean ar error (without repeats): 0.0 prepare accelerator Using accelerator 0.15.0 or above. loading model for process 0/1 load StableDiffusion checkpoint loading u-net: loading vae: config.json: 100% 4.52k/4.52k [00:00<00:00, 16.4MB/s] model.safetensors: 100% 1.71G/1.71G [00:11<00:00, 144MB/s] loading text encoder: Replace CrossAttention.forward to use xformers [Dataset 0] caching latents. 100% 12/12 [00:03<00:00, 3.43it/s] import network module: networks.lora create LoRA network. base dim (rank): 16, alpha: 8 create LoRA for Text Encoder: 72 modules. create LoRA for U-Net: 192 modules. enable LoRA for text encoder enable LoRA for U-Net prepare optimizer, data loader etc. use 8-bit AdamW optimizer | {} override steps. steps for 10 epochs is / ๆŒ‡ๅฎšใ‚จใƒใƒƒใ‚ฏใพใงใฎใ‚นใƒ†ใƒƒใƒ—ๆ•ฐ: 600 running training / ๅญฆ็ฟ’้–‹ๅง‹ num train images repeats / ๅญฆ็ฟ’็”ปๅƒใฎๆ•ฐร—็นฐใ‚Š่ฟ”ใ—ๅ›žๆ•ฐ: 120 num reg images / ๆญฃๅ‰‡ๅŒ–็”ปๅƒใฎๆ•ฐ: 0 num batches per epoch / 1epochใฎใƒใƒƒใƒๆ•ฐ: 60 num epochs / epochๆ•ฐ: 10 batch size per device / ใƒใƒƒใƒใ‚ตใ‚คใ‚บ: 2 gradient accumulation steps / ๅ‹พ้…ใ‚’ๅˆ่จˆใ™ใ‚‹ใ‚นใƒ†ใƒƒใƒ—ๆ•ฐ = 1 total optimization steps / ๅญฆ็ฟ’ใ‚นใƒ†ใƒƒใƒ—ๆ•ฐ: 600 steps: 0% 0/600 [00:00<?, ?it/s]epoch 1/10 โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ /content/kohya-trainer/train_network.py:773 in โ”‚ โ”‚ โ”‚ โ”‚ 770 โ”‚ args = parser.parse_args() โ”‚ โ”‚ 771 โ”‚ args = train_util.read_config_from_file(args, parser) โ”‚ โ”‚ 772 โ”‚ โ”‚ โ”‚ โฑ 773 โ”‚ train(args) โ”‚ โ”‚ 774 โ”‚ โ”‚ โ”‚ โ”‚ /content/kohya-trainer/train_network.py:605 in train โ”‚ โ”‚ โ”‚ โ”‚ 602 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 603 โ”‚ โ”‚ โ”‚ โ”‚ # Predict the noise residual โ”‚ โ”‚ 604 โ”‚ โ”‚ โ”‚ โ”‚ with accelerator.autocast(): โ”‚ โ”‚ โฑ 605 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ noise_pred = unet(noisy_latents, timesteps, encoder_hidden_states).s โ”‚ โ”‚ 606 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 607 โ”‚ โ”‚ โ”‚ โ”‚ if args.v_parameterization: โ”‚ โ”‚ 608 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ # v-parameterization training โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py:1518 in _wrapped_call_impl โ”‚ โ”‚ โ”‚ โ”‚ 1515 โ”‚ โ”‚ if self._compiled_call_impl is not None: โ”‚ โ”‚ 1516 โ”‚ โ”‚ โ”‚ return self._compiled_call_impl(args, kwargs) # type: ignore[misc] โ”‚ โ”‚ 1517 โ”‚ โ”‚ else: โ”‚ โ”‚ โฑ 1518 โ”‚ โ”‚ โ”‚ return self._call_impl(*args, *kwargs) โ”‚ โ”‚ 1519 โ”‚ โ”‚ โ”‚ 1520 โ”‚ def _call_impl(self, args, kwargs): โ”‚ โ”‚ 1521 โ”‚ โ”‚ forward_call = (self._slow_forward if torch._C._get_tracing_state() else self.fo โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py:1527 in _call_impl โ”‚ โ”‚ โ”‚ โ”‚ 1524 โ”‚ โ”‚ if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks โ”‚ โ”‚ 1525 โ”‚ โ”‚ โ”‚ โ”‚ or _global_backward_pre_hooks or _global_backward_hooks โ”‚ โ”‚ 1526 โ”‚ โ”‚ โ”‚ โ”‚ or _global_forward_hooks or _global_forward_pre_hooks): โ”‚ โ”‚ โฑ 1527 โ”‚ โ”‚ โ”‚ return forward_call(*args, kwargs) โ”‚ โ”‚ 1528 โ”‚ โ”‚ โ”‚ โ”‚ 1529 โ”‚ โ”‚ try: โ”‚ โ”‚ 1530 โ”‚ โ”‚ โ”‚ result = None โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/accelerate/utils/operations.py:490 in call โ”‚ โ”‚ โ”‚ โ”‚ 487 โ”‚ โ”‚ update_wrapper(self, model_forward) โ”‚ โ”‚ 488 โ”‚ โ”‚ โ”‚ 489 โ”‚ def call(self, *args, *kwargs): โ”‚ โ”‚ โฑ 490 โ”‚ โ”‚ return convert_to_fp32(self.model_forward(args, kwargs)) โ”‚ โ”‚ 491 โ”‚ โ”‚ โ”‚ 492 โ”‚ def getstate(self): โ”‚ โ”‚ 493 โ”‚ โ”‚ raise pickle.PicklingError( โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/torch/amp/autocast_mode.py:16 in decorate_autocast โ”‚ โ”‚ โ”‚ โ”‚ 13 โ”‚ @functools.wraps(func) โ”‚ โ”‚ 14 โ”‚ def decorate_autocast(*args, kwargs): โ”‚ โ”‚ 15 โ”‚ โ”‚ with autocast_instance: โ”‚ โ”‚ โฑ 16 โ”‚ โ”‚ โ”‚ return func(*args, *kwargs) โ”‚ โ”‚ 17 โ”‚ โ”‚ โ”‚ 18 โ”‚ decorate_autocast.__script_unsupported = "@autocast() decorator is not supported in โ”‚ โ”‚ 19 โ”‚ return decorate_autocast โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/diffusers/models/unet_2d_condition.py:381 in forward โ”‚ โ”‚ โ”‚ โ”‚ 378 โ”‚ โ”‚ down_block_res_samples = (sample,) โ”‚ โ”‚ 379 โ”‚ โ”‚ for downsample_block in self.down_blocks: โ”‚ โ”‚ 380 โ”‚ โ”‚ โ”‚ if hasattr(downsample_block, "has_cross_attention") and downsample_block.has โ”‚ โ”‚ โฑ 381 โ”‚ โ”‚ โ”‚ โ”‚ sample, res_samples = downsample_block( โ”‚ โ”‚ 382 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ hidden_states=sample, โ”‚ โ”‚ 383 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ temb=emb, โ”‚ โ”‚ 384 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ encoder_hidden_states=encoder_hidden_states, โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py:1518 in _wrapped_call_impl โ”‚ โ”‚ โ”‚ โ”‚ 1515 โ”‚ โ”‚ if self._compiled_call_impl is not None: โ”‚ โ”‚ 1516 โ”‚ โ”‚ โ”‚ return self._compiled_call_impl(args, kwargs) # type: ignore[misc] โ”‚ โ”‚ 1517 โ”‚ โ”‚ else: โ”‚ โ”‚ โฑ 1518 โ”‚ โ”‚ โ”‚ return self._call_impl(*args, kwargs) โ”‚ โ”‚ 1519 โ”‚ โ”‚ โ”‚ 1520 โ”‚ def _call_impl(self, *args, *kwargs): โ”‚ โ”‚ 1521 โ”‚ โ”‚ forward_call = (self._slow_forward if torch._C._get_tracing_state() else self.fo โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py:1527 in _call_impl โ”‚ โ”‚ โ”‚ โ”‚ 1524 โ”‚ โ”‚ if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks โ”‚ โ”‚ 1525 โ”‚ โ”‚ โ”‚ โ”‚ or _global_backward_pre_hooks or _global_backward_hooks โ”‚ โ”‚ 1526 โ”‚ โ”‚ โ”‚ โ”‚ or _global_forward_hooks or _global_forward_pre_hooks): โ”‚ โ”‚ โฑ 1527 โ”‚ โ”‚ โ”‚ return forward_call(args, kwargs) โ”‚ โ”‚ 1528 โ”‚ โ”‚ โ”‚ โ”‚ 1529 โ”‚ โ”‚ try: โ”‚ โ”‚ 1530 โ”‚ โ”‚ โ”‚ result = None โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/diffusers/models/unet_2d_blocks.py:612 in forward โ”‚ โ”‚ โ”‚ โ”‚ 609 โ”‚ โ”‚ โ”‚ โ”‚ )[0] โ”‚ โ”‚ 610 โ”‚ โ”‚ โ”‚ else: โ”‚ โ”‚ 611 โ”‚ โ”‚ โ”‚ โ”‚ hidden_states = resnet(hidden_states, temb) โ”‚ โ”‚ โฑ 612 โ”‚ โ”‚ โ”‚ โ”‚ hidden_states = attn(hidden_states, encoder_hidden_states=encoder_hidden โ”‚ โ”‚ 613 โ”‚ โ”‚ โ”‚ โ”‚ โ”‚ 614 โ”‚ โ”‚ โ”‚ output_states += (hidden_states,) โ”‚ โ”‚ 615 โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py:1518 in _wrapped_call_impl โ”‚ โ”‚ โ”‚ โ”‚ 1515 โ”‚ โ”‚ if self._compiled_call_impl is not None: โ”‚ โ”‚ 1516 โ”‚ โ”‚ โ”‚ return self._compiled_call_impl(*args, kwargs) # type: ignore[misc] โ”‚ โ”‚ 1517 โ”‚ โ”‚ else: โ”‚ โ”‚ โฑ 1518 โ”‚ โ”‚ โ”‚ return self._call_impl(*args, *kwargs) โ”‚ โ”‚ 1519 โ”‚ โ”‚ โ”‚ 1520 โ”‚ def _call_impl(self, args, kwargs): โ”‚ โ”‚ 1521 โ”‚ โ”‚ forward_call = (self._slow_forward if torch._C._get_tracing_state() else self.fo โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py:1527 in _call_impl โ”‚ โ”‚ โ”‚ โ”‚ 1524 โ”‚ โ”‚ if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks โ”‚ โ”‚ 1525 โ”‚ โ”‚ โ”‚ โ”‚ or _global_backward_pre_hooks or _global_backward_hooks โ”‚ โ”‚ 1526 โ”‚ โ”‚ โ”‚ โ”‚ or _global_forward_hooks or _global_forward_pre_hooks): โ”‚ โ”‚ โฑ 1527 โ”‚ โ”‚ โ”‚ return forward_call(*args, kwargs) โ”‚ โ”‚ 1528 โ”‚ โ”‚ โ”‚ โ”‚ 1529 โ”‚ โ”‚ try: โ”‚ โ”‚ 1530 โ”‚ โ”‚ โ”‚ result = None โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/diffusers/models/attention.py:216 in forward โ”‚ โ”‚ โ”‚ โ”‚ 213 โ”‚ โ”‚ โ”‚ โ”‚ 214 โ”‚ โ”‚ # 2. Blocks โ”‚ โ”‚ 215 โ”‚ โ”‚ for block in self.transformer_blocks: โ”‚ โ”‚ โฑ 216 โ”‚ โ”‚ โ”‚ hidden_states = block(hidden_states, context=encoder_hidden_states, timestep โ”‚ โ”‚ 217 โ”‚ โ”‚ โ”‚ โ”‚ 218 โ”‚ โ”‚ # 3. Output โ”‚ โ”‚ 219 โ”‚ โ”‚ if self.is_input_continuous: โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py:1518 in _wrapped_call_impl โ”‚ โ”‚ โ”‚ โ”‚ 1515 โ”‚ โ”‚ if self._compiled_call_impl is not None: โ”‚ โ”‚ 1516 โ”‚ โ”‚ โ”‚ return self._compiled_call_impl(*args, *kwargs) # type: ignore[misc] โ”‚ โ”‚ 1517 โ”‚ โ”‚ else: โ”‚ โ”‚ โฑ 1518 โ”‚ โ”‚ โ”‚ return self._call_impl(args, kwargs) โ”‚ โ”‚ 1519 โ”‚ โ”‚ โ”‚ 1520 โ”‚ def _call_impl(self, *args, kwargs): โ”‚ โ”‚ 1521 โ”‚ โ”‚ forward_call = (self._slow_forward if torch._C._get_tracing_state() else self.fo โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py:1527 in _call_impl โ”‚ โ”‚ โ”‚ โ”‚ 1524 โ”‚ โ”‚ if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks โ”‚ โ”‚ 1525 โ”‚ โ”‚ โ”‚ โ”‚ or _global_backward_pre_hooks or _global_backward_hooks โ”‚ โ”‚ 1526 โ”‚ โ”‚ โ”‚ โ”‚ or _global_forward_hooks or _global_forward_pre_hooks): โ”‚ โ”‚ โฑ 1527 โ”‚ โ”‚ โ”‚ return forward_call(*args, *kwargs) โ”‚ โ”‚ 1528 โ”‚ โ”‚ โ”‚ โ”‚ 1529 โ”‚ โ”‚ try: โ”‚ โ”‚ 1530 โ”‚ โ”‚ โ”‚ result = None โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/diffusers/models/attention.py:484 in forward โ”‚ โ”‚ โ”‚ โ”‚ 481 โ”‚ โ”‚ if self.only_cross_attention: โ”‚ โ”‚ 482 โ”‚ โ”‚ โ”‚ hidden_states = self.attn1(norm_hidden_states, context) + hidden_states โ”‚ โ”‚ 483 โ”‚ โ”‚ else: โ”‚ โ”‚ โฑ 484 โ”‚ โ”‚ โ”‚ hidden_states = self.attn1(norm_hidden_states) + hidden_states โ”‚ โ”‚ 485 โ”‚ โ”‚ โ”‚ โ”‚ 486 โ”‚ โ”‚ if self.attn2 is not None: โ”‚ โ”‚ 487 โ”‚ โ”‚ โ”‚ # 2. Cross-Attention โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py:1518 in _wrapped_call_impl โ”‚ โ”‚ โ”‚ โ”‚ 1515 โ”‚ โ”‚ if self._compiled_call_impl is not None: โ”‚ โ”‚ 1516 โ”‚ โ”‚ โ”‚ return self._compiled_call_impl(args, kwargs) # type: ignore[misc] โ”‚ โ”‚ 1517 โ”‚ โ”‚ else: โ”‚ โ”‚ โฑ 1518 โ”‚ โ”‚ โ”‚ return self._call_impl(*args, kwargs) โ”‚ โ”‚ 1519 โ”‚ โ”‚ โ”‚ 1520 โ”‚ def _call_impl(self, *args, *kwargs): โ”‚ โ”‚ 1521 โ”‚ โ”‚ forward_call = (self._slow_forward if torch._C._get_tracing_state() else self.fo โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/torch/nn/modules/module.py:1527 in _call_impl โ”‚ โ”‚ โ”‚ โ”‚ 1524 โ”‚ โ”‚ if not (self._backward_hooks or self._backward_pre_hooks or self._forward_hooks โ”‚ โ”‚ 1525 โ”‚ โ”‚ โ”‚ โ”‚ or _global_backward_pre_hooks or _global_backward_hooks โ”‚ โ”‚ 1526 โ”‚ โ”‚ โ”‚ โ”‚ or _global_forward_hooks or _global_forward_pre_hooks): โ”‚ โ”‚ โฑ 1527 โ”‚ โ”‚ โ”‚ return forward_call(args, kwargs) โ”‚ โ”‚ 1528 โ”‚ โ”‚ โ”‚ โ”‚ 1529 โ”‚ โ”‚ try: โ”‚ โ”‚ 1530 โ”‚ โ”‚ โ”‚ result = None โ”‚ โ”‚ โ”‚ โ”‚ /content/kohya-trainer/library/train_util.py:1846 in forward_xformers โ”‚ โ”‚ โ”‚ โ”‚ 1843 โ”‚ โ”‚ q = q.contiguous() โ”‚ โ”‚ 1844 โ”‚ โ”‚ k = k.contiguous() โ”‚ โ”‚ 1845 โ”‚ โ”‚ v = v.contiguous() โ”‚ โ”‚ โฑ 1846 โ”‚ โ”‚ out = xformers.ops.memory_efficient_attention(q, k, v, attn_bias=None) # ๆœ€้ฉใช โ”‚ โ”‚ 1847 โ”‚ โ”‚ โ”‚ โ”‚ 1848 โ”‚ โ”‚ out = rearrange(out, "b n h d -> b n (h d)", h=h) โ”‚ โ”‚ 1849 โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/init.py:223 in โ”‚ โ”‚ memory_efficient_attention โ”‚ โ”‚ โ”‚ โ”‚ 220 โ”‚ โ”‚ and options. โ”‚ โ”‚ 221 โ”‚ :return: multi-head attention Tensor with shape [B, Mq, H, Kv] โ”‚ โ”‚ 222 โ”‚ """ โ”‚ โ”‚ โฑ 223 โ”‚ return _memory_efficient_attention( โ”‚ โ”‚ 224 โ”‚ โ”‚ Inputs( โ”‚ โ”‚ 225 โ”‚ โ”‚ โ”‚ query=query, key=key, value=value, p=p, attn_bias=attn_bias, scale=scale โ”‚ โ”‚ 226 โ”‚ โ”‚ ), โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/init.py:326 in โ”‚ โ”‚ _memory_efficient_attention โ”‚ โ”‚ โ”‚ โ”‚ 323 โ”‚ โ”‚ ) โ”‚ โ”‚ 324 โ”‚ โ”‚ โ”‚ 325 โ”‚ output_shape = inp.normalize_bmhk() โ”‚ โ”‚ โฑ 326 โ”‚ return _fMHA.apply( โ”‚ โ”‚ 327 โ”‚ โ”‚ op, inp.query, inp.key, inp.value, inp.attn_bias, inp.p, inp.scale โ”‚ โ”‚ 328 โ”‚ ).reshape(output_shape) โ”‚ โ”‚ 329 โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/torch/autograd/function.py:539 in apply โ”‚ โ”‚ โ”‚ โ”‚ 536 โ”‚ โ”‚ if not torch._C._are_functorch_transforms_active(): โ”‚ โ”‚ 537 โ”‚ โ”‚ โ”‚ # See NOTE: [functorch vjp and autograd interaction] โ”‚ โ”‚ 538 โ”‚ โ”‚ โ”‚ args = _functorch.utils.unwrap_dead_wrappers(args) โ”‚ โ”‚ โฑ 539 โ”‚ โ”‚ โ”‚ return super().apply(*args, **kwargs) # type: ignore[misc] โ”‚ โ”‚ 540 โ”‚ โ”‚ โ”‚ โ”‚ 541 โ”‚ โ”‚ if cls.setup_context == _SingleLevelFunction.setup_context: โ”‚ โ”‚ 542 โ”‚ โ”‚ โ”‚ raise RuntimeError( โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/init.py:42 in forward โ”‚ โ”‚ โ”‚ โ”‚ 39 โ”‚ โ”‚ op_fw = op[0] if op is not None else None โ”‚ โ”‚ 40 โ”‚ โ”‚ op_bw = op[1] if op is not None else None โ”‚ โ”‚ 41 โ”‚ โ”‚ โ”‚ โ”‚ โฑ 42 โ”‚ โ”‚ out, op_ctx = _memory_efficient_attention_forward_requires_grad( โ”‚ โ”‚ 43 โ”‚ โ”‚ โ”‚ inp=inp, op=op_fw โ”‚ โ”‚ 44 โ”‚ โ”‚ ) โ”‚ โ”‚ 45 โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/init.py:351 in โ”‚ โ”‚ _memory_efficient_attention_forward_requires_grad โ”‚ โ”‚ โ”‚ โ”‚ 348 โ”‚ inp.validate_inputs() โ”‚ โ”‚ 349 โ”‚ output_shape = inp.normalize_bmhk() โ”‚ โ”‚ 350 โ”‚ if op is None: โ”‚ โ”‚ โฑ 351 โ”‚ โ”‚ op = _dispatch_fw(inp, True) โ”‚ โ”‚ 352 โ”‚ else: โ”‚ โ”‚ 353 โ”‚ โ”‚ _ensure_op_supports_or_raise(ValueError, "memory_efficient_attention", op, inp) โ”‚ โ”‚ 354 โ”‚ out = op.apply(inp, needs_gradient=True) โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/dispatch.py:120 in _dispatch_fw โ”‚ โ”‚ โ”‚ โ”‚ 117 โ”‚ Returns: โ”‚ โ”‚ 118 โ”‚ โ”‚ AttentionOp: The best operator for the configuration โ”‚ โ”‚ 119 โ”‚ """ โ”‚ โ”‚ โฑ 120 โ”‚ return _run_priority_list( โ”‚ โ”‚ 121 โ”‚ โ”‚ "memory_efficient_attention_forward", โ”‚ โ”‚ 122 โ”‚ โ”‚ _dispatch_fw_priority_list(inp, needs_gradient), โ”‚ โ”‚ 123 โ”‚ โ”‚ inp, โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/xformers/ops/fmha/dispatch.py:63 in _run_priority_list โ”‚ โ”‚ โ”‚ โ”‚ 60 {textwrap.indent(_format_inputs_description(inp), ' ')}""" โ”‚ โ”‚ 61 โ”‚ for op, not_supported in zip(priority_list, not_supported_reasons): โ”‚ โ”‚ 62 โ”‚ โ”‚ msg += "\n" + _format_not_supported_reasons(op, not_supported) โ”‚ โ”‚ โฑ 63 โ”‚ raise NotImplementedError(msg) โ”‚ โ”‚ 64 โ”‚ โ”‚ 65 โ”‚ โ”‚ 66 def _dispatch_fw_priority_list( โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ NotImplementedError: No operator found for memory_efficient_attention_forward with inputs: query : shape=(2, 4096, 8, 40) (torch.float16) key : shape=(2, 4096, 8, 40) (torch.float16) value : shape=(2, 4096, 8, 40) (torch.float16) attn_bias : <class 'NoneType'> p : 0.0 flshattF@0.0.0 is not supported because: xFormers wasn't build with CUDA support requires device with capability > (8, 0) but your GPU has capability (7, 5) (too old) operator wasn't built - see python -m xformers.info for more info tritonflashattF is not supported because: xFormers wasn't build with CUDA support requires device with capability > (8, 0) but your GPU has capability (7, 5) (too old) operator wasn't built - see python -m xformers.info for more info triton is not available requires GPU with sm80 minimum compute capacity, e.g., A100/H100/L4 Only work on pre-MLIR triton for now cutlassF is not supported because: xFormers wasn't build with CUDA support operator wasn't built - see python -m xformers.info for more info smallkF is not supported because: max(query.shape[-1] != value.shape[-1]) > 32 xFormers wasn't build with CUDA support dtype=torch.float16 (supported: {torch.float32}) operator wasn't built - see python -m xformers.info for more info unsupported embed per head: 40 steps: 0% 0/600 [00:03<?, ?it/s] โ•ญโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€ Traceback (most recent call last) โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฎ โ”‚ /usr/local/bin/accelerate:8 in โ”‚ โ”‚ โ”‚ โ”‚ 5 from accelerate.commands.accelerate_cli import main โ”‚ โ”‚ 6 if name == 'main': โ”‚ โ”‚ 7 โ”‚ sys.argv[0] = re.sub(r'(-script.pyw|.exe)?$', '', sys.argv[0]) โ”‚ โ”‚ โฑ 8 โ”‚ sys.exit(main()) โ”‚ โ”‚ 9 โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/accelerate/commands/accelerate_cli.py:45 in main โ”‚ โ”‚ โ”‚ โ”‚ 42 โ”‚ โ”‚ exit(1) โ”‚ โ”‚ 43 โ”‚ โ”‚ โ”‚ 44 โ”‚ # Run โ”‚ โ”‚ โฑ 45 โ”‚ args.func(args) โ”‚ โ”‚ 46 โ”‚ โ”‚ 47 โ”‚ โ”‚ 48 if name == "main": โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py:1104 in launch_command โ”‚ โ”‚ โ”‚ โ”‚ 1101 โ”‚ elif defaults is not None and defaults.compute_environment == ComputeEnvironment.AMA โ”‚ โ”‚ 1102 โ”‚ โ”‚ sagemaker_launcher(defaults, args) โ”‚ โ”‚ 1103 โ”‚ else: โ”‚ โ”‚ โฑ 1104 โ”‚ โ”‚ simple_launcher(args) โ”‚ โ”‚ 1105 โ”‚ โ”‚ 1106 โ”‚ โ”‚ 1107 def main(): โ”‚ โ”‚ โ”‚ โ”‚ /usr/local/lib/python3.10/dist-packages/accelerate/commands/launch.py:567 in simple_launcher โ”‚ โ”‚ โ”‚ โ”‚ 564 โ”‚ process = subprocess.Popen(cmd, env=current_env) โ”‚ โ”‚ 565 โ”‚ process.wait() โ”‚ โ”‚ 566 โ”‚ if process.returncode != 0: โ”‚ โ”‚ โฑ 567 โ”‚ โ”‚ raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd) โ”‚ โ”‚ 568 โ”‚ โ”‚ 569 โ”‚ โ”‚ 570 def multi_gpu_launcher(args): โ”‚ โ•ฐโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ•ฏ CalledProcessError: Command '['/usr/bin/python3', 'train_network.py', '--dataset_config=/content/drive/MyDrive/Loras/Charles_Lora/dataset_config.toml', '--config_file=/content/drive/MyDrive/Loras/Charles_Lora/training_config.toml']' returned non-zero exit status 1.

hollowstrawberry commented 3 months ago

This should be fixed already