kohya-ss / kohya-ss/sd-scripts

aksing for help: error accurs after trainning activated..

Open
#338 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
7.2k
Forks
1.2k
Avg merge
11m
Merged PRs (30d)
2

Description

Hey guys, what can I do? thanks so much.

To create a public link, set `share=True` in `launch()`.
Folder 100_test: 12 images found
Folder 100_test: 1200 steps
max_train_steps = 1200
stop_text_encoder_training = 0
lr_warmup_steps = 120
accelerate launch --num_cpu_threads_per_process=2 "train_network.py" --enable_bucket --pretrained_model_name_or_path="C:/Users/zyb/stable-diffusion-webui/models/Stable-diffusion/Realistic_Vision_V1.4.ckpt" --train_data_dir="E:/AI/lora training data/100_zb/image" --resolution=512,512 --output_dir="E:/AI/lora training data/100_zb/model" --logging_dir="E:/AI/lora training data/100_zb/log" --network_alpha="1" --save_model_as=safetensors --network_module=networks.lora --text_encoder_lr=5e-5 --unet_lr=0.0001 --network_dim=8 --output_name="last" --lr_scheduler_num_cycles="1" --learning_rate="0.0001" --lr_scheduler="cosine" --lr_warmup_steps="120" --train_batch_size="1" --max_train_steps="1200" --save_every_n_epochs="1" --mixed_precision="fp16" --save_precision="fp16" --cache_latents --optimizer_type="AdamW8bit" --max_data_loader_n_workers="0" --bucket_reso_steps=64 --xformers --bucket_no_upscale
Could not find module 'E:\AI\kohya\kohya_ss\venv\Lib\site-packages\xformers\_C.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
WARNING:root:WARNING: Could not find module 'E:\AI\kohya\kohya_ss\venv\Lib\site-packages\xformers\_C.pyd' (or one of its dependencies). Try using the full path with constructor syntax.
Need to compile C++ extensions to get sparse attention suport. Please run python setup.py build develop
prepare tokenizer
Use DreamBooth method.
Traceback (most recent call last):
File "E:\AI\kohya\kohya_ss\train_network.py", line 699, in
train(args)
File "E:\AI\kohya\kohya_ss\train_network.py", line 101, in train
train_dataset_group = config_util.generate_dataset_group_by_blueprint(blueprint.dataset_group)
File "E:\AI\kohya\kohya_ss\library\config_util.py", line 369, in generate_dataset_group_by_blueprint
subsets = [subset_klass(**asdict(subset_blueprint.params)) for subset_blueprint in dataset_blueprint.subsets]
File "E:\AI\kohya\kohya_ss\library\config_util.py", line 369, in
subsets = [subset_klass(**asdict(subset_blueprint.params)) for subset_blueprint in dataset_blueprint.subsets]
TypeError: DreamBoothSubset.__init__() missing 2 required positional arguments: 'token_warmup_min' and 'token_warmup_step'
Traceback (most recent call last):
File "C:\Users\zyb\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\zyb\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in _run_code
exec(code, run_globals)
File "E:\AI\kohya\kohya_ss\venv\Scripts\accelerate.exe\__main__.py", line 7, in
File "E:\AI\kohya\kohya_ss\venv\lib\site-packages\accelerate\commands\accelerate_cli.py", line 45, in main
args.func(args)
File "E:\AI\kohya\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 1104, in launch_command
simple_launcher(args)
File "E:\AI\kohya\kohya_ss\venv\lib\site-packages\accelerate\commands\launch.py", line 567, in simple_launcher
raise subprocess.CalledProcessError(returncode=process.returncode, cmd=cmd)
subprocess.CalledProcessError: Command '['E:\\AI\\kohya\\kohya_ss\\venv\\Scripts\\python.exe', 'train_network.py', '--enable_bucket', '--pretrained_model_name_or_path=C:/Users/zyb/stable-diffusion-webui/models/Stable-diffusion/Realistic_Vision_V1.4.ckpt', '--train_data_dir=E:/AI/lora training data/100_zb/image', '--resolution=512,512', '--output_dir=E:/AI/lora training data/100_zb/model', '--logging_dir=E:/AI/lora training data/100_zb/log', '--network_alpha=1', '--save_model_as=safetensors', '--network_module=networks.lora', '--text_encoder_lr=5e-5', '--unet_lr=0.0001', '--network_dim=8', '--output_name=last', '--lr_scheduler_num_cycles=1', '--learning_rate=0.0001', '--lr_scheduler=cosine', '--lr_warmup_steps=120', '--train_batch_size=1', '--max_train_steps=1200', '--save_every_n_epochs=1', '--mixed_precision=fp16', '--save_precision=fp16', '--cache_latents', '--optimizer_type=AdamW8bit', '--max_data_loader_n_workers=0', '--bucket_reso_steps=64', '--xformers', '--bucket_no_upscale']' returned non-zero exit status 1.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with train_network.py:101 and library/config_util.py:369, then inspect the DreamBoothSubset construction shown in the traceback. Re-run the provided accelerate command to confirm the failure, and consider the work complete when dataset setup proceeds without the reported TypeError.

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
20/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.