aboutsummaryrefslogtreecommitdiffstats
path: root/modules/img2img.py
diff options
context:
space:
mode:
authorVladimir Mandic <mandic00@live.com>2023-02-08 12:03:36 +0000
committerGitHub <noreply@github.com>2023-02-08 12:03:36 +0000
commit4c562a9832343f21ce86410aea6b26904cb13b2c (patch)
tree2e532cac4032da80c746433b4251a447abf976a4 /modules/img2img.py
parentea9bd9fc7409109adcd61b897abc2c8881161256 (diff)
downloadstable-diffusion-webui-gfx803-4c562a9832343f21ce86410aea6b26904cb13b2c.tar.gz
stable-diffusion-webui-gfx803-4c562a9832343f21ce86410aea6b26904cb13b2c.tar.bz2
stable-diffusion-webui-gfx803-4c562a9832343f21ce86410aea6b26904cb13b2c.zip
convert rgba to rgb
some image format (e.g. jpg) do not support rgba
Diffstat (limited to 'modules/img2img.py')
-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))