kohya-ss / kohya-ss/sd-scripts
Error when attempting to train
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.2k
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
min_bucket_reso and max_bucket_reso are ignored if bucket_no_upscale is set, because bucket reso is defined by image size automatically / bucket_no_upscaleが指定された場合は、bucketの解像度は画像サイズから自動計算されるため、min_bucket_resoとmax_bucket_resoは無視されます
number of images (including repeats) / 各bucketの画像枚数(繰り返し回数を含む)
bucket 0: resolution (640, 1024), count: 20
bucket 1: resolution (768, 1216), count: 20
bucket 2: resolution (832, 1088), count: 20
bucket 3: resolution (832, 1216), count: 260
bucket 4: resolution (896, 1088), count: 20
bucket 5: resolution (896, 1152), count: 20
bucket 6: resolution (960, 1088), count: 20
bucket 7: resolution (1024, 1024), count: 400
bucket 8: resolution (1216, 832), count: 20
mean ar error (without repeats): 0.0008680292132730673
Traceback (most recent call last):
File "/workspace/kohya_ss/./sdxl_train_network.py", line 185, in
trainer.train(args)
File "/workspace/kohya_ss/train_network.py", line 216, in train
self.assert_extra_args(args, train_dataset_group)
File "/workspace/kohya_ss/./sdxl_train_network.py", line 29, in assert_extra_args
assert (
AssertionError: network for Text Encoder cannot be trained with caching Text Encoder outputs / Text Encoderの出力をキャッシュしながらText Encoderのネットワークを学習することはできません
Traceback (most recent call last):
File "/workspace/kohya_ss/venv/bin/accelerate", line 8, in
sys.exit(main())
File "/workspace/kohya_ss/venv/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py", line 47, in main
args.func(args)
File "/workspace/kohya_ss/venv/lib/python3.10/site-packages/accelerate/commands/launch.py", line 986, in launch_command
simple_launcher(args)
File "/workspace/kohya_ss/venv/lib/python3.10/site-packages/accelerate/commands/launch.py", line 628, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['/workspace/kohya_ss/venv/bin/python3', './sdxl_train_network.py', '--enable_bucket', '--min_bucket_reso=256', '--max_bucket_reso=2048', '--pretrained_model_name_or_path=/workspace/stable-diffusion-webui/models/Stable-diffusion/sd_xl_base_1.0_0.9vae.safetensors', '--train_data_dir=/workspace/jaydenkoya/img', '--reg_data_dir=/workspace/jaydenkoya/reg', '--resolution=1024,1024', '--output_dir=/workspace/jaydenkoya/model', '--logging_dir=/workspace/jaydenkoya/log', '--network_alpha=1', '--save_model_as=safetensors', '--network_module=networks.lora', '--text_encoder_lr=0.0003', '--unet_lr=0.0003', '--network_dim=256', '--output_name=jayden_jaymes', '--lr_scheduler_num_cycles=10', '--cache_text_encoder_outputs', '--no_half_vae', '--learning_rate=0.0003', '--lr_scheduler=constant', '--train_batch_size=1', '--max_train_steps=8000', '--save_every_n_epochs=1', '--mixed_precision=fp16', '--save_precision=fp16', '--caption_extension=.txt', '--cache_latents', '--cache_latents_to_disk', '--optimizer_type=Adafactor', '--optimizer_args', 'scale_parameter=False', 'relative_step=False', 'warmup_init=False', '--max_data_loader_n_workers=0', '--bucket_reso_steps=64', '--xformers', '--bucket_no_upscale', '--noise_offset=0.0']' returned non-zero exit status 1.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with the reported command and the assertion in sdxl_train_network.py at line 29, then follow the call from train_network.py line 216. Reproduce the failure using the listed options and determine whether the intended outcome is a code change or clearer handling of the incompatible training settings. Done means the reported command has an agreed, working configuration or the supported behavior is documented.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100