Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update train_util.py, bug fix #1532

Merged
merged 1 commit into from
Aug 31, 2024
Merged

Update train_util.py, bug fix #1532

merged 1 commit into from
Aug 31, 2024

Conversation

nandometzger
Copy link
Contributor

Error message:

2024-08-30 08:10:37 INFO     Loading dataset config from dataset.toml                                          train_network.py:270
                    INFO     prepare images.                                                                     train_util.py:1803
                    WARNING  not directory: nandodataset                                                         train_util.py:1710
Traceback (most recent call last):
  File "/scratch2/metzgern/misc/kohya_ss/sd-scripts/flux_train_network.py", line 446, in <module>
    trainer.train(args)
  File "/scratch2/metzgern/misc/kohya_ss/sd-scripts/train_network.py", line 307, in train
    train_dataset_group = config_util.generate_dataset_group_by_blueprint(blueprint.dataset_group)
  File "/scratch2/metzgern/misc/kohya_ss/sd-scripts/library/config_util.py", line 485, in generate_dataset_group_by_blueprint
    dataset = dataset_klass(subsets=subsets, **asdict(dataset_blueprint.params))
  File "/scratch2/metzgern/misc/kohya_ss/sd-scripts/library/train_util.py", line 1820, in __init__
    img_paths, captions, sizes = load_dreambooth_dir(subset)
ValueError: not enough values to unpack (expected 3, got 2)
Traceback (most recent call last):
  File "/scratch2/metzgern/misc/kohya_ss/venv/bin/accelerate", line 8, in <module>
    sys.exit(main())
  File "/scratch2/metzgern/misc/kohya_ss/venv/lib/python3.10/site-packages/accelerate/commands/accelerate_cli.py", line 48, in main
    args.func(args)
  File "/scratch2/metzgern/misc/kohya_ss/venv/lib/python3.10/site-packages/accelerate/commands/launch.py", line 1106, in launch_command
    simple_launcher(args)
  File "/scratch2/metzgern/misc/kohya_ss/venv/lib/python3.10/site-packages/accelerate/commands/launch.py", line 704, in simple_launcher

this can be solved by replacing

return [], [],

with

return [], [], []

in the load_dreambooth_dir function.

@kohya-ss kohya-ss merged commit 826ab5c into kohya-ss:main Aug 31, 2024
1 check failed
@kohya-ss
Copy link
Owner

Thank you for this!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants