diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-03-11 10:03:23 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-11 10:03:23 +0000 |
commit | bb3ecc32856dc1341f2fb6c41efca8ade0f5217e (patch) | |
tree | 6571c30590d5df355e36e02d8e47477617e6aa3b /modules/images.py | |
parent | d81c50391823aaa264bf9c0896a1552e5af5fea6 (diff) | |
parent | b012d70f15641d6b85c9257b83cec892e941609c (diff) | |
download | stable-diffusion-webui-gfx803-bb3ecc32856dc1341f2fb6c41efca8ade0f5217e.tar.gz stable-diffusion-webui-gfx803-bb3ecc32856dc1341f2fb6c41efca8ade0f5217e.tar.bz2 stable-diffusion-webui-gfx803-bb3ecc32856dc1341f2fb6c41efca8ade0f5217e.zip |
Merge pull request #8287 from vladmandic/save-images
Allow saving of images generated via API
Diffstat (limited to 'modules/images.py')
-rw-r--r-- | modules/images.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/modules/images.py b/modules/images.py index 5b80c23e..f8e62b71 100644 --- a/modules/images.py +++ b/modules/images.py @@ -489,6 +489,9 @@ def save_image(image, path, basename, seed=None, prompt=None, extension='png', i """
namegen = FilenameGenerator(p, seed, prompt, image)
+ if path is None: # set default path to avoid errors when functions are triggered manually or via api and param is not set
+ path = opts.outdir_save
+
if save_to_dirs is None:
save_to_dirs = (grid and opts.grid_save_to_dirs) or (not grid and opts.save_to_dirs and not no_prompt)
|