aboutsummaryrefslogtreecommitdiff
path: root/modules/processing.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-12 17:47:36 +0300
committerAUTOMATIC <16777216c@gmail.com>2022-09-12 17:47:36 +0300
commit40f4d3ed98477f86335927b5ccb6d67d653adaa2 (patch)
treef2eb1293bdda44afbb8867b47c61fa93eca70676 /modules/processing.py
parenta26f157a5ed05a3a5a7d4eab153b554bf08e683c (diff)
[FEATURE] Save both images, (Skip_Save optional). #265
Diffstat (limited to 'modules/processing.py')
-rw-r--r--modules/processing.py4
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]