aboutsummaryrefslogtreecommitdiffstats
path: root/modules/images.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-11-27 08:52:53 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-11-27 08:52:53 +0000
commitb006382784a2f0887317bb60ea49d19b50a5dc7e (patch)
treeea9ea0e697e630924c86ad264de97d5399c186e3 /modules/images.py
parentb5050ad2071644f7b4c99660dc66a8a95136102f (diff)
downloadstable-diffusion-webui-gfx803-b006382784a2f0887317bb60ea49d19b50a5dc7e.tar.gz
stable-diffusion-webui-gfx803-b006382784a2f0887317bb60ea49d19b50a5dc7e.tar.bz2
stable-diffusion-webui-gfx803-b006382784a2f0887317bb60ea49d19b50a5dc7e.zip
serve images from where they are saved instead of a temporary directory
add an option to choose a different temporary directory in the UI add an option to cleanup the selected temporary directory at startup
Diffstat (limited to 'modules/images.py')
-rw-r--r--modules/images.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/modules/images.py b/modules/images.py
index 26d5b7a9..8737ccff 100644
--- a/modules/images.py
+++ b/modules/images.py
@@ -524,6 +524,8 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i
else:
image.save(fullfn, quality=opts.jpeg_quality)
+ image.already_saved_as = fullfn
+
target_side_length = 4000
oversize = image.width > target_side_length or image.height > target_side_length
if opts.export_for_4chan and (oversize or os.stat(fullfn).st_size > 4 * 1024 * 1024):