aboutsummaryrefslogtreecommitdiff
path: root/modules/images.py
diff options
context:
space:
mode:
authormissionfloyd <missionfloyd@users.noreply.github.com>2023-02-09 17:04:55 -0700
committerGitHub <noreply@github.com>2023-02-09 17:04:55 -0700
commit73a97cac11456adcda05872364c605ebcd3982ad (patch)
tree26fd50c1c6fa4e22d7c391b6175b8008e0909bc9 /modules/images.py
parent463ab841803b45ea421ad7f9769b836f3000ef8c (diff)
Use RGB for webp
Doesn't support greyscale (L)
Diffstat (limited to 'modules/images.py')
-rw-r--r--modules/images.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/images.py b/modules/images.py
index c0c68913..b335502b 100644
--- a/modules/images.py
+++ b/modules/images.py
@@ -554,7 +554,7 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
if image_to_save.mode == 'RGBA':
image_to_save = image_to_save.convert("RGB")
elif image_to_save.mode == 'I;16':
- image_to_save = image_to_save.point(lambda p: p * 0.0038910505836576).convert("L")
+ image_to_save = image_to_save.point(lambda p: p * 0.0038910505836576).convert("RGB" if extension.lower() == ".webp" else "L")
image_to_save.save(temp_file_path, format=image_format, quality=opts.jpeg_quality)