mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2026-01-05 08:42:14 -08:00
Add option to save before color correction. Add suffix param when saving files, used for special saves without color correction and face restoration.
This commit is contained in:
parent
3582befdcd
commit
25eb1e3d90
3 changed files with 6 additions and 3 deletions
|
|
@ -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):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue