Update img2img.py

Hopefully corrected the white space issue
This commit is contained in:
lenankamp 2023-05-19 03:20:19 -04:00 committed by GitHub
parent bbce167305
commit ff6acd35d0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -20,7 +20,6 @@ import modules.scripts
def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args): def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args):
processing.fix_seed(p) processing.fix_seed(p)
# recursive batch, as written limits potential inputs to common image formats, may e better to just check if isfile for general use
images = [] images = []
for root, directories, files in os.walk(input_dir): for root, directories, files in os.walk(input_dir):
for filename in files: for filename in files:
@ -28,6 +27,7 @@ images = []
if filepath.endswith(".jpg") or filepath.endswith(".jpeg") or filepath.endswith(".png") or filepath.endswith(".webp"): if filepath.endswith(".jpg") or filepath.endswith(".jpeg") or filepath.endswith(".png") or filepath.endswith(".webp"):
images.append(filepath) images.append(filepath)
is_inpaint_batch = False is_inpaint_batch = False
if inpaint_mask_dir: if inpaint_mask_dir:
inpaint_masks = shared.listfiles(inpaint_mask_dir) inpaint_masks = shared.listfiles(inpaint_mask_dir)