aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-02-19 09:15:27 +0000
committerGitHub <noreply@github.com>2023-02-19 09:15:27 +0000
commite287d9b2940b13c2d19dd59750e8cde7e53cbbd8 (patch)
treef9b1a9d0d4b8967217bb9e7e9cf22896288910bd
parentfe46a08f52c36ca61446f657296802ab3ceb2529 (diff)
parent4c562a9832343f21ce86410aea6b26904cb13b2c (diff)
downloadstable-diffusion-webui-gfx803-e287d9b2940b13c2d19dd59750e8cde7e53cbbd8.tar.gz
stable-diffusion-webui-gfx803-e287d9b2940b13c2d19dd59750e8cde7e53cbbd8.tar.bz2
stable-diffusion-webui-gfx803-e287d9b2940b13c2d19dd59750e8cde7e53cbbd8.zip
Merge pull request #7650 from vladmandic/img2img-fix
Convert image from RGBA to RGB before saving
-rw-r--r--modules/img2img.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/img2img.py b/modules/img2img.py
index bcc158dc..c973b770 100644
--- a/modules/img2img.py
+++ b/modules/img2img.py
@@ -73,6 +73,8 @@ def process_batch(p, input_dir, output_dir, inpaint_mask_dir, args):
if not save_normally:
os.makedirs(output_dir, exist_ok=True)
+ if processed_image.mode == 'RGBA':
+ processed_image = processed_image.convert("RGB")
processed_image.save(os.path.join(output_dir, filename))