Fixed an issue where img2img generation could not be interrupted in the latest webui
parent
1e91627c22
commit
de9d914e74
|
|
@ -940,6 +940,11 @@ class Script(scripts.Script):
|
|||
# img2img
|
||||
for img, mask, controlnet_input_img, face_coords, prompts in zip(imgs, masks, controlnet_input_imgs, face_coords_dict.values(), prompts_dict.values()):
|
||||
|
||||
# Generation cancelled.
|
||||
if shared.state.interrupted:
|
||||
print("Generation cancelled.")
|
||||
break
|
||||
|
||||
image = Image.open(img)
|
||||
mask_image = Image.open(mask) if mask else None
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue