diff options
author | AUTOMATIC <16777216c@gmail.com> | 2022-09-12 14:47:36 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2022-09-12 14:47:36 +0000 |
commit | 40f4d3ed98477f86335927b5ccb6d67d653adaa2 (patch) | |
tree | f2eb1293bdda44afbb8867b47c61fa93eca70676 /modules/processing.py | |
parent | a26f157a5ed05a3a5a7d4eab153b554bf08e683c (diff) | |
download | stable-diffusion-webui-gfx803-40f4d3ed98477f86335927b5ccb6d67d653adaa2.tar.gz stable-diffusion-webui-gfx803-40f4d3ed98477f86335927b5ccb6d67d653adaa2.tar.bz2 stable-diffusion-webui-gfx803-40f4d3ed98477f86335927b5ccb6d67d653adaa2.zip |
[FEATURE] Save both images, (Skip_Save optional). #265
Diffstat (limited to 'modules/processing.py')
-rw-r--r-- | modules/processing.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/processing.py b/modules/processing.py index 1e17d77c..aaecb104 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -254,12 +254,16 @@ def process_images(p: StableDiffusionProcessing) -> Processed: x_sample = x_sample.astype(np.uint8)
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)
+
devices.torch_gc()
x_sample = modules.face_restoration.restore_faces(x_sample)
image = Image.fromarray(x_sample)
+
if p.overlay_images is not None and i < len(p.overlay_images):
overlay = p.overlay_images[i]
|