diff options
author | Vladimir Mandic <mandic00@live.com> | 2023-03-03 13:29:10 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-03 13:29:10 +0000 |
commit | 23d4fb5bf2400622d00ca5fe489fadb160ee7c47 (patch) | |
tree | 3495054aa9b1c9b2926ba5ca61b97cae6eff2e7d /modules/images.py | |
parent | 0cc0ee1bcb4c24a8c9715f66cede06601bfc00c8 (diff) | |
download | stable-diffusion-webui-gfx803-23d4fb5bf2400622d00ca5fe489fadb160ee7c47.tar.gz stable-diffusion-webui-gfx803-23d4fb5bf2400622d00ca5fe489fadb160ee7c47.tar.bz2 stable-diffusion-webui-gfx803-23d4fb5bf2400622d00ca5fe489fadb160ee7c47.zip |
allow saving of images 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)
|