diff options
author | evshiron <evshiron@gmail.com> | 2022-10-29 22:03:32 +0000 |
---|---|---|
committer | evshiron <evshiron@gmail.com> | 2022-10-29 22:03:32 +0000 |
commit | 9f4f894d74b57c3d02ebccaa59f9c22fca2b6c90 (patch) | |
tree | eb023868f65827e4d22b4db23a815d6581be6ab2 /modules/api/api.py | |
parent | 9f104b53c425e248595e5b6481336d2a339e015e (diff) | |
download | stable-diffusion-webui-gfx803-9f4f894d74b57c3d02ebccaa59f9c22fca2b6c90.tar.gz stable-diffusion-webui-gfx803-9f4f894d74b57c3d02ebccaa59f9c22fca2b6c90.tar.bz2 stable-diffusion-webui-gfx803-9f4f894d74b57c3d02ebccaa59f9c22fca2b6c90.zip |
allow skip current image in progress api
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 e960bb7b..5c5b210f 100644 --- a/modules/api/api.py +++ b/modules/api/api.py @@ -167,7 +167,7 @@ class Api: return PNGInfoResponse(info=result[1]) - def progressapi(self): + def progressapi(self, req: ProgressRequest = Depends()): # copy from check_progress_call of ui.py if shared.state.job_count == 0: @@ -188,7 +188,7 @@ class Api: progress = min(progress, 1) current_image = None - if shared.state.current_image: + if shared.state.current_image and not req.skip_current_image: current_image = encode_pil_to_base64(shared.state.current_image) return ProgressResponse(progress=progress, eta_relative=eta_relative, state=shared.state.dict(), current_image=current_image) |