Skip to content

Commit

Permalink
fixed generate_controlnet_subsets_config for training
Browse files Browse the repository at this point in the history
  • Loading branch information
sdbds committed Sep 16, 2023
1 parent 55cdd5c commit ae606ac
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions library/config_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -547,17 +547,13 @@ def generate(base_dir: Optional[str]):
return []

subsets_config = []
for subdir in base_dir.iterdir():
if not subdir.is_dir():
continue

subset_config = {"image_dir": str(subdir), "conditioning_data_dir": conditioning_data_dir, "caption_extension": caption_extension, "num_repeats": 1}
subsets_config.append(subset_config)
subset_config = {"image_dir": train_data_dir, "conditioning_data_dir": conditioning_data_dir, "caption_extension": caption_extension, "num_repeats": 1}
subsets_config.append(subset_config)

return subsets_config

subsets_config = []
subsets_config += generate(train_data_dir, False)
subsets_config += generate(train_data_dir)

return subsets_config

Expand Down

0 comments on commit ae606ac

Please sign in to comment.