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/api | |
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/api')
-rw-r--r-- | modules/api/api.py | 8 | ||||
-rw-r--r-- | modules/api/models.py | 4 |
2 files changed, 6 insertions, 6 deletions
diff --git a/modules/api/api.py b/modules/api/api.py index 5a9ac5f1..6b939daa 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -180,8 +180,8 @@ class Api: populate = txt2imgreq.copy(update={ # Override __init__ params "sampler_name": validate_sampler_name(txt2imgreq.sampler_name or txt2imgreq.sampler_index), - "do_not_save_samples": True, - "do_not_save_grid": True + "do_not_save_samples": True if not 'do_not_save_samples' in vars(txt2imgreq) else txt2imgreq.do_not_save_samples, + "do_not_save_grid": True if not 'do_not_save_grid' in vars(txt2imgreq) else txt2imgreq.do_not_save_grid, } ) if populate.sampler_name: @@ -220,8 +220,8 @@ class Api: populate = img2imgreq.copy(update={ # Override __init__ params "sampler_name": validate_sampler_name(img2imgreq.sampler_name or img2imgreq.sampler_index), - "do_not_save_samples": True, - "do_not_save_grid": True, + "do_not_save_samples": True if not 'do_not_save_samples' in img2imgreq else img2imgreq.do_not_save_samples, + "do_not_save_grid": True if not 'do_not_save_grid' in img2imgreq else img2imgreq.do_not_save_grid, "mask": mask } ) diff --git a/modules/api/models.py b/modules/api/models.py index cba43d3b..a947e6ac 100644 --- a/modules/api/models.py +++ b/modules/api/models.py @@ -14,8 +14,8 @@ API_NOT_ALLOWED = [ "outpath_samples", "outpath_grids", "sampler_index", - "do_not_save_samples", - "do_not_save_grid", + # "do_not_save_samples", + # "do_not_save_grid", "extra_generation_params", "overlay_images", "do_not_reload_embeddings", |