Skip to content

Commit 725dd7a

Browse files
committed
fix issues with controlnet save images
1 parent ace896b commit 725dd7a

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

modules/ui.py

+3
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,9 @@ def __init__(self, d=None):
157157
is_grid = image_index < p.index_of_first_image
158158
i = 0 if is_grid else (image_index - p.index_of_first_image)
159159

160+
if image_index >= len(p.infotexts) or i >= len(p.all_seeds) or i >= len(p.all_prompts):
161+
break
162+
160163
fullfn, txt_fullfn = save_image(image, path, "", seed=p.all_seeds[i], prompt=p.all_prompts[i], extension=extension, info=p.infotexts[image_index], grid=is_grid, p=p, save_to_dirs=save_to_dirs)
161164

162165
filename = os.path.relpath(fullfn, path)

0 commit comments

Comments
 (0)