Unverified Commit cd7e8fb4 authored by AUTOMATIC1111's avatar AUTOMATIC1111 Committed by GitHub

Merge pull request #7319 from Thurion/img2img_batch_fix

Fix error when using img2img batch without masks
parents b7d2af8c 1421e959
...@@ -21,8 +21,10 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): ...@@ -21,8 +21,10 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args):
images = shared.listfiles(input_dir) images = shared.listfiles(input_dir)
inpaint_masks = shared.listfiles(inpaint_mask_dir) is_inpaint_batch = False
is_inpaint_batch = inpaint_mask_dir and len(inpaint_masks) > 0 if inpaint_mask_dir:
inpaint_masks = shared.listfiles(inpaint_mask_dir)
is_inpaint_batch = len(inpaint_masks) > 0
if is_inpaint_batch: if is_inpaint_batch:
print(f"\nInpaint batch is enabled. {len(inpaint_masks)} masks found.") print(f"\nInpaint batch is enabled. {len(inpaint_masks)} masks found.")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment