diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-09-23 11:41:06 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-23 11:41:06 +0000 |
commit | 79e7c392989ad70a1c02cbfe6eb38ee5a78bdbce (patch) | |
tree | 412f3d27a348deaa7dc2784a7fe63dde63d14730 /modules/images.py | |
parent | 03faf2025143a5d789af12c79c057523c43cbd39 (diff) | |
parent | d26d89377bfb47779daec02e888c3c2c931be1f0 (diff) | |
download | stable-diffusion-webui-gfx803-79e7c392989ad70a1c02cbfe6eb38ee5a78bdbce.tar.gz stable-diffusion-webui-gfx803-79e7c392989ad70a1c02cbfe6eb38ee5a78bdbce.tar.bz2 stable-diffusion-webui-gfx803-79e7c392989ad70a1c02cbfe6eb38ee5a78bdbce.zip |
Merge pull request #847 from rewbs/rewbs-optionally-save-before-color-correction
Add option to save before color correction. This helps with some posterisation issues in img2img loopback.
Diffstat (limited to 'modules/images.py')
-rw-r--r-- | modules/images.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/images.py b/modules/images.py index 4926d800..6cf56ddb 100644 --- a/modules/images.py +++ b/modules/images.py @@ -312,7 +312,7 @@ def get_next_sequence_number(path, basename): return result + 1
-def save_image(image, path, basename, seed=None, prompt=None, extension='png', info=None, short_filename=False, no_prompt=False, grid=False, pnginfo_section_name='parameters', p=None, existing_info=None, forced_filename=None):
+def save_image(image, path, basename, seed=None, prompt=None, extension='png', info=None, short_filename=False, no_prompt=False, grid=False, pnginfo_section_name='parameters', p=None, existing_info=None, forced_filename=None, suffix=""):
if short_filename or prompt is None or seed is None:
file_decoration = ""
elif opts.save_to_dirs:
@@ -323,7 +323,7 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i if file_decoration != "":
file_decoration = "-" + file_decoration.lower()
- file_decoration = apply_filename_pattern(file_decoration, p, seed, prompt)
+ file_decoration = apply_filename_pattern(file_decoration, p, seed, prompt) + suffix
if extension == 'png' and opts.enable_pnginfo and info is not None:
pnginfo = PngImagePlugin.PngInfo()
|