aboutsummaryrefslogtreecommitdiff
path: root/modules/img2img.py
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-07-08 16:54:03 +0300
committerAUTOMATIC1111 <16777216c@gmail.com>2023-07-08 16:54:03 +0300
commite161b5a0259c870b9d01408d02c504c3281dbdb1 (patch)
treee45ddaefa3678760257408e41d95955644a9224e /modules/img2img.py
parent353031a0148a815226ce0752aade8cf3f76e7c9d (diff)
rework #10436 to use shared.walk_files
Diffstat (limited to 'modules/img2img.py')
-rw-r--r--modules/img2img.py8
1 files changed, 1 insertions, 7 deletions
diff --git a/modules/img2img.py b/modules/img2img.py
index 3b83814b..ef87eb0f 100644
--- a/modules/img2img.py
+++ b/modules/img2img.py
@@ -18,13 +18,7 @@ import modules.scripts
def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args, to_scale=False, scale_by=1.0, use_png_info=False, png_info_props=None, png_info_dir=None):
processing.fix_seed(p)
- images = []
- for root, directories, files in os.walk(input_dir):
- for filename in files:
- filepath = os.path.join(root, filename)
- if filepath.endswith(".jpg") or filepath.endswith(".jpeg") or filepath.endswith(".png") or filepath.endswith(".webp"):
- images.append(filepath)
-
+ images = list(shared.walk_files(input_dir, allowed_extensions=(".png", ".jpg", ".jpeg", ".webp")))
is_inpaint_batch = False
if inpaint_mask_dir: