kohya-ss / kohya-ss/sd-scripts
Parameter Mismatch in cache_latents Between ControlNetDataset and DatasetGroup
- Dominant language
- Python
- Stars
- 7.2k
- Forks
- 1.2k
- Avg merge
- 11m
- Merged PRs (30d)
- 2
Description
The cache_latents function in the ControlNetDataset class in train_util.py has parameters that do not match those of the cache_latents function in the DatasetGroup class, resulting in errors during masked loss training: `TypeError: ControlNetDataset.cache_latents() takes from 2 to 5 positional arguments but 6 were given`
Contributor guide
No contributing guide indexed for this repository
Research direction
Compare the cache_latents definitions for ControlNetDataset and DatasetGroup in train_util.py, focusing on their parameter lists and the masked loss training call that raises the TypeError. Align the interface so the call no longer passes too many positional arguments, then verify masked loss training reaches cache_latents without this error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- machine-learning
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100