kohya-ss / kohya-ss/sd-scripts

Why is Kohya scripts failing to read this in the toml config?

Open
#681 5 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

I have the following in my config.toml

[[datasets]]
resolution = 768
min_bucket_reso = 320
max_bucket_reso = 1280
caption_tag_dropout_rate = 0
caption_dropout_every_n_epochs = 0
flip_aug = true
color_aug = false

I get this error: AssertionError: resolution is required / resolution(解像度)指定は必須です from this: 1025 │ ) -> None: │
│ 1026 │ │ super().__init__(tokenizer, max_token_length, resolution, deb │
│ 1027 │ │ │
│ ❱ 1028 │ │ assert resolution is not None, f"resolution is required / res │
│ 1029 │ │ │
│ 1030 │ │ self.batch_size = batch_size │
│ 1031 │ │ self.size = min(self.width, self.height) # 短いほう │
╰────────────────────────────────────────────────────────────────────

Kohya is ignoring the resolution and I don't understand why when it is right there in the config.toml.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the failure with the provided config.toml dataset block and trace how the configuration reaches the dataset constructor at the reported assertion. Compare the parsed dataset values with the assertion input; done means this configuration is accepted and resolution is available to the training path.

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
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.