aboutsummaryrefslogtreecommitdiff
path: root/modules/processing.py
diff options
context:
space:
mode:
authorRobin Fernandes <robin@soal.org>2022-09-22 20:54:50 +1000
committerRobin Fernandes <robin@soal.org>2022-09-22 20:54:50 +1000
commit25eb1e3d9072a060a253abce6889e7fef440dfe1 (patch)
tree30f8373b783d199ec7182efa646e0ead2bc79492 /modules/processing.py
parent3582befdcd779e674855e58d63b06711ef6989bf (diff)
Add option to save before color correction. Add suffix param when saving files, used for special saves without color correction and face restoration.
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/modules/processing.py b/modules/processing.py
index f44c3f26..49fed0d8 100644
--- a/modules/processing.py
+++ b/modules/processing.py
@@ -357,7 +357,7 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
if p.restore_faces:
if opts.save and not p.do_not_save_samples and opts.save_images_before_face_restoration:
- images.save_image(Image.fromarray(x_sample), p.outpath_samples, "", seeds[i], prompts[i], opts.samples_format, info=infotext(n, i), p=p)
+ images.save_image(Image.fromarray(x_sample), p.outpath_samples, "", seeds[i], prompts[i], opts.samples_format, info=infotext(n, i), p=p, suffix="-before-face-restoration")
devices.torch_gc()
@@ -366,6 +366,8 @@ def process_images(p: StableDiffusionProcessing) -> Processed:
image = Image.fromarray(x_sample)
if p.color_corrections is not None and i < len(p.color_corrections):
+ if opts.save and not p.do_not_save_samples and opts.save_images_before_color_correction:
+ images.save_image(Image.fromarray(x_sample), p.outpath_samples, "", seeds[i], prompts[i], opts.samples_format, info=infotext(n, i), p=p, suffix="-before-color-correction")
image = apply_color_correction(p.color_corrections[i], image)
if p.overlay_images is not None and i < len(p.overlay_images):