Skip to content

Commit

Permalink
register reg images with correct subset
Browse files Browse the repository at this point in the history
  • Loading branch information
feffy380 authored Mar 23, 2024
1 parent f4a4c11 commit 0c7baea
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions library/train_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -1554,7 +1554,7 @@ def load_dreambooth_dir(subset: DreamBoothSubset):
for img_path, caption in zip(img_paths, captions):
info = ImageInfo(img_path, subset.num_repeats, caption, subset.is_reg, img_path)
if subset.is_reg:
reg_infos.append(info)
reg_infos.append((info, subset))
else:
self.register_image(info, subset)

Expand All @@ -1575,7 +1575,7 @@ def load_dreambooth_dir(subset: DreamBoothSubset):
n = 0
first_loop = True
while n < num_train_images:
for info in reg_infos:
for info, subset in reg_infos:
if first_loop:
self.register_image(info, subset)
n += info.num_repeats
Expand Down

0 comments on commit 0c7baea

Please sign in to comment.