diff options
author | Artem Kotov <breengles@gmail.com> | 2023-05-29 17:38:49 +0000 |
---|---|---|
committer | Artem Kotov <breengles@gmail.com> | 2023-05-29 17:38:49 +0000 |
commit | 23314a6e27a24fc8bf98717ddc180aec06674abd (patch) | |
tree | 59044779a8f49aa2cc46152b6114370f17f40f55 /modules/img2img.py | |
parent | 6c610a8a951ea8141024dbb659c2528bf24225ec (diff) | |
download | stable-diffusion-webui-gfx803-23314a6e27a24fc8bf98717ddc180aec06674abd.tar.gz stable-diffusion-webui-gfx803-23314a6e27a24fc8bf98717ddc180aec06674abd.tar.bz2 stable-diffusion-webui-gfx803-23314a6e27a24fc8bf98717ddc180aec06674abd.zip |
ruffed
Diffstat (limited to 'modules/img2img.py')
-rw-r--r-- | modules/img2img.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/modules/img2img.py b/modules/img2img.py index 5d6ad520..a29add3a 100644 --- a/modules/img2img.py +++ b/modules/img2img.py @@ -50,11 +50,11 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args, to_scale=Fal continue
# Use the EXIF orientation of photos taken by smartphones.
img = ImageOps.exif_transpose(img)
-
+
if to_scale:
p.width = int(img.width * scale_by)
p.height = int(img.height * scale_by)
-
+
p.init_images = [img] * p.batch_size
if is_inpaint_batch:
@@ -63,7 +63,7 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args, to_scale=Fal mask_image_path = list(path.parent.glob(f"**/{path.stem}*"))
if len(mask_image_path) > 0:
mask_image_path = str(mask_image_path[0])
-
+
# if not found use first one ("same mask for all images" use-case)
if mask_image_path not in inpaint_masks:
mask_image_path = inpaint_masks[0]
|