diff options
author | Thurion <thurion8583@gmail.com> | 2023-01-28 13:42:24 +0000 |
---|---|---|
committer | Thurion <thurion8583@gmail.com> | 2023-01-28 13:42:24 +0000 |
commit | 1421e959600e0e9a2435e48373a551237bbab814 (patch) | |
tree | 1576760126deaf9b846eb70279395a5189132453 /modules | |
parent | 5d14f282c2812888275902be4b552681f942dbfd (diff) | |
download | stable-diffusion-webui-gfx803-1421e959600e0e9a2435e48373a551237bbab814.tar.gz stable-diffusion-webui-gfx803-1421e959600e0e9a2435e48373a551237bbab814.tar.bz2 stable-diffusion-webui-gfx803-1421e959600e0e9a2435e48373a551237bbab814.zip |
allow empty mask dir
Diffstat (limited to 'modules')
-rw-r--r-- | modules/img2img.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/modules/img2img.py b/modules/img2img.py index fe9447c7..3ecb6146 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -21,8 +21,10 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): images = shared.listfiles(input_dir)
- inpaint_masks = shared.listfiles(inpaint_mask_dir)
- is_inpaint_batch = inpaint_mask_dir and len(inpaint_masks) > 0
+ is_inpaint_batch = False
+ if inpaint_mask_dir:
+ inpaint_masks = shared.listfiles(inpaint_mask_dir)
+ is_inpaint_batch = len(inpaint_masks) > 0
if is_inpaint_batch:
print(f"\nInpaint batch is enabled. {len(inpaint_masks)} masks found.")
|