Error and exit when switching between training and sampling
The training process is normal. When switching sampling, the terminal exits directly without any error messages. Alternatively, if I do not enable skipping the first sampling, an error will be reported synchronously during training after sampling is completed, and then it exits. 训练过程正常,在切换采样的时候,直接退出终端,无报错信息,或者我不开启跳过第一次采样,在采样完成后进行训练时会同步报错,退出。
[已退出进程,代码为 1 (0x00000001)] 现在可以使用Ctrl+D关闭此终端,或按 Enter 重新启动。
88%|########8 | 22/25 [00:50<00:06, 2.02s/it] 88%|########8 | 22/25 [00:50<00:06, 2.02s/it][A[A[A[A
92%|#########2| 23/25 [00:52<00:04, 2.01s/it] 92%|#########2| 23/25 [00:52<00:04, 2.01s/it][A[A[A[A
96%|#########6| 24/25 [00:54<00:01, 2.00s/it] 96%|#########6| 24/25 [00:54<00:01, 2.00s/it][A[A[A[A
100%|##########| 25/25 [00:56<00:00, 1.99s/it] 100%|##########| 25/25 [00:56<00:00, 1.99s/it][A[A[A[A 100%|##########| 25/25 [00:56<00:00, 2.25s/it] 100%|##########| 25/25 [00:56<00:00, 2.25s/it]
Unloading transformer Loading Vae
Running 1 job { "type": "ui_trainer", "training_folder": "/home/liyuyang/aitoolkit/ai-toolkit/output", "sqlite_db_path": "/home/liyuyang/aitoolkit/ai-toolkit/aitk_db.db", "device": "cuda", "trigger_word": null, "performance_log_every": 10, "network": { "type": "lora", "linear": 16, "linear_alpha": 16, "conv": 16, "conv_alpha": 16, "lokr_full_rank": true, "lokr_factor": -1, "network_kwargs": { "ignore_if_contains": [] } }, "save": { "dtype": "bf16", "save_every": 60, "max_step_saves_to_keep": 4, "save_format": "diffusers", "push_to_hub": false }, "datasets": [ { "folder_path": "/home/liyuyang/aitoolkit/ai-toolkit/datasets/9_2", "control_path": null, "mask_path": null, "mask_min_value": 0.1, "default_caption": "", "caption_ext": "txt", "caption_dropout_rate": 0.05, "cache_latents_to_disk": false, "is_reg": false, "network_weight": 1, "resolution": [ 1024, 256, 768 ], "controls": [], "shrink_video_to_frames": true, "num_frames": 1, "do_i2v": true, "flip_x": false, "flip_y": false } ], "train": { "batch_size": 1, "bypass_guidance_embedding": false, "steps": 960, "gradient_accumulation": 1, "train_unet": true, "train_text_encoder": false, "gradient_checkpointing": true, "noise_scheduler": "flowmatch", "optimizer": "adamw8bit", "timestep_type": "linear", "content_or_style": "balanced", "optimizer_params": { "weight_decay": 0.0001 }, "unload_text_encoder": false, "cache_text_embeddings": false, "lr": 0.0005, "ema_config": { "use_ema": false, "ema_decay": 0.99 }, "skip_first_sample": true, "force_first_sample": false, "disable_sampling": false, "dtype": "bf16", "diff_output_preservation": false, "diff_output_preservation_multiplier": 1, "diff_output_preservation_class": "person", "switch_boundary_every": 1 }, "model": { "name_or_path": "ai-toolkit/Wan2.2-T2V-A14B-Diffusers-bf16", "quantize": true, "qtype": "qfloat8", "quantize_te": true, "qtype_te": "qfloat8", "arch": "wan22_14b:t2v", "low_vram": true, "model_kwargs": { "train_high_noise": true, "train_low_noise": true } }, "sample": { "sampler": "flowmatch", "sample_every": 60, "width": 720, "height": 1280, "samples": [ { "prompt": "20250829\uff0ca woman holding a coffee cup, in a beanie, sitting at a cafe" } ], "neg": "", "seed": 42, "walk_seed": false, "guidance_scale": 4, "sample_steps": 25, "num_frames": 1, "fps": 16 } } Using SQLite database at /home/liyuyang/aitoolkit/ai-toolkit/aitk_db.db Job ID: "81e8e1cb-fb18-4e9d-b486-1f79e39f749b" #############################################
Running job: my_first_lora_v1
############################################# Running 1 process Loading Wan model Loading transformer 1 Loading checkpoint shards: 100%|##########| 3/3 [00:00<00:00, 12.54it/s] Quantizing Transformer 1
- quantizing 40 transformer blocks 100%|##########| 40/40 [00:25<00:00, 1.58it/s]
- quantizing extras Moving transformer 1 to CPU Loading transformer 2 Loading checkpoint shards: 100%|##########| 3/3 [00:00<00:00, 12.64it/s] Quantizing Transformer 2
- quantizing 40 transformer blocks 100%|##########| 40/40 [00:21<00:00, 1.89it/s]
- quantizing extras
Moving transformer 2 to CPU
Creating DualWanTransformer3DModel
Loading UMT5EncoderModel
You set
add_prefix_space. The tokenizer needs to be converted from the slow tokenizers You setadd_prefix_space. The tokenizer needs to be converted from the slow tokenizers Using ai-toolkit/umt5_xxl_encoder for UMT5 encoder. Loading checkpoint shards: 100%|##########| 3/3 [00:00<00:00, 33.05it/s] Quantizing UMT5EncoderModel Moving transformer back to GPU Loading VAE Making pipe Preparing Model create LoRA network. base dim (rank): 16, alpha: 16 neuron dropout: p=None, rank dropout: p=None, module dropout: p=None apply LoRA to Conv2d with kernel size (3,3). dim (rank): 16, alpha: 16 create LoRA for Text Encoder: 0 modules. create LoRA for U-Net: 800 modules. enable LoRA for U-Net
IMPORTANT RESUMING FROM /home/liyuyang/aitoolkit/ai-toolkit/output/my_first_lora_v1/my_first_lora_v1_000000060_low_noise.safetensors
Loading from /home/liyuyang/aitoolkit/ai-toolkit/output/my_first_lora_v1/my_first_lora_v1_000000060_low_noise.safetensors Missing keys: [] Found step 60 in metadata, starting from there Loading optimizer state from /home/liyuyang/aitoolkit/ai-toolkit/output/my_first_lora_v1/optimizer.pt Updating optimizer LR from params Dataset: /home/liyuyang/aitoolkit/ai-toolkit/datasets/9_2
- Preprocessing image dimensions 100%|##########| 12/12 [00:00<00:00, 58798.65it/s]
- Found 12 images Bucket sizes for /home/liyuyang/aitoolkit/ai-toolkit/datasets/9_2: 752x1328: 8 files 720x1248: 4 files 2 buckets made Dataset: /home/liyuyang/aitoolkit/ai-toolkit/datasets/9_2
- Preprocessing image dimensions 100%|##########| 12/12 [00:00<00:00, 99666.63it/s]
- Found 12 images Bucket sizes for /home/liyuyang/aitoolkit/ai-toolkit/datasets/9_2: 192x336: 12 files 1 buckets made Dataset: /home/liyuyang/aitoolkit/ai-toolkit/datasets/9_2
- Preprocessing image dimensions 100%|##########| 12/12 [00:00<00:00, 115971.54it/s]
- Found 12 images Bucket sizes for /home/liyuyang/aitoolkit/ai-toolkit/datasets/9_2: 576x1008: 12 files 1 buckets made Skipping first sample due to config setting my_first_lora_v1: 12%|#2 | 119/960 [06:13<1:27:27, 6.24s/it, lr: 5.0e-04 loss: 6.353e-02] Saving at step 120 Saved checkpoint to /home/liyuyang/aitoolkit/ai-toolkit/output/my_first_lora_v1/my_first_lora_v1_000000120.safetensors Saved optimizer to /home/liyuyang/aitoolkit/ai-toolkit/output/my_first_lora_v1/optimizer.pt Generating Images: 0%| | 0/1 [00:00<?, ?it/s]Unloading vae Unloading transformer Unloading text encoder 0%| | 0/25 [00:00<?, ?it/s] 4%|4 | 1/25 [00:01<00:44, 1.85s/it] 8%|8 | 2/25 [00:03<00:41, 1.82s/it] 12%|#2 | 3/25 [00:05<00:41, 1.90s/it] 16%|#6 | 4/25 [00:07<00:39, 1.86s/it] 20%|## | 5/25 [00:09<00:36, 1.84s/it] 24%|##4 | 6/25 [00:11<00:34, 1.82s/it] 28%|##8 | 7/25 [00:12<00:32, 1.81s/it] 32%|###2 | 8/25 [00:14<00:30, 1.81s/it] 36%|###6 | 9/25 [00:20<00:50, 3.15s/it] 40%|#### | 10/25 [00:25<00:54, 3.63s/it] 44%|####4 | 11/25 [00:27<00:42, 3.07s/it] 48%|####8 | 12/25 [00:29<00:34, 2.68s/it] 52%|#####2 | 13/25 [00:30<00:28, 2.41s/it] 56%|#####6 | 14/25 [00:32<00:24, 2.23s/it] 60%|###### | 15/25 [00:34<00:20, 2.10s/it] 64%|######4 | 16/25 [00:36<00:18, 2.01s/it] 68%|######8 | 17/25 [00:38<00:15, 1.95s/it] 72%|#######2 | 18/25 [00:39<00:13, 1.91s/it] 76%|#######6 | 19/25 [00:41<00:11, 1.88s/it] 80%|######## | 20/25 [00:43<00:09, 1.85s/it] 84%|########4 | 21/25 [00:45<00:07, 1.84s/it] 88%|########8 | 22/25 [00:47<00:05, 1.82s/it] 92%|#########2| 23/25 [00:48<00:03, 1.82s/it] 96%|#########6| 24/25 [00:50<00:01, 1.81s/it] 100%|##########| 25/25 [00:52<00:00, 2.10s/it] Unloading transformer
This issue has been automatically closed due to inactivity. It has had no activity for 6 months.
If this issue is still relevant, please feel free to reopen it with updated information or context. We apologize for any inconvenience.