diff options
author | Billy Cao <aliencaocao@gmail.com> | 2022-11-27 13:12:37 +0000 |
---|---|---|
committer | Billy Cao <aliencaocao@gmail.com> | 2022-11-27 13:12:37 +0000 |
commit | 3cf93de24f90247af33ab9cf743a6eb45308d668 (patch) | |
tree | 27c4571c8075d149e36967e8fc5ef9c5c13b0b69 /modules/api/api.py | |
parent | 488f831d528f538f8c6a801e91d80c5e2ee05cf1 (diff) | |
download | stable-diffusion-webui-gfx803-3cf93de24f90247af33ab9cf743a6eb45308d668.tar.gz stable-diffusion-webui-gfx803-3cf93de24f90247af33ab9cf743a6eb45308d668.tar.bz2 stable-diffusion-webui-gfx803-3cf93de24f90247af33ab9cf743a6eb45308d668.zip |
Fix sampler_name for API requests are being ignored
Diffstat (limited to 'modules/api/api.py')
-rw-r--r-- | modules/api/api.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/api/api.py b/modules/api/api.py index efcedbba..53980551 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -112,7 +112,7 @@ class Api: def text2imgapi(self, txt2imgreq: StableDiffusionTxt2ImgProcessingAPI): populate = txt2imgreq.copy(update={ # Override __init__ params "sd_model": shared.sd_model, - "sampler_name": validate_sampler_name(txt2imgreq.sampler_index), + "sampler_name": validate_sampler_name(txt2imgreq.sampler_name or txt2imgreq.sampler_index), "do_not_save_samples": True, "do_not_save_grid": True } @@ -142,7 +142,7 @@ class Api: populate = img2imgreq.copy(update={ # Override __init__ params "sd_model": shared.sd_model, - "sampler_name": validate_sampler_name(img2imgreq.sampler_index), + "sampler_name": validate_sampler_name(img2imgreq.sampler_name or img2imgreq.sampler_index), "do_not_save_samples": True, "do_not_save_grid": True, "mask": mask |