diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-20 10:00:59 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2023-08-20 10:00:59 +0000 |
commit | a0d721e109d7c7b75aefaf3853f7bf58da43847b (patch) | |
tree | 36db8dbb2ae746214521530b26ba04db1a7168d4 /modules/progress.py | |
parent | 499cef3c2b5786a388fc6cc228de3df0d5f16f75 (diff) | |
download | stable-diffusion-webui-gfx803-a0d721e109d7c7b75aefaf3853f7bf58da43847b.tar.gz stable-diffusion-webui-gfx803-a0d721e109d7c7b75aefaf3853f7bf58da43847b.tar.bz2 stable-diffusion-webui-gfx803-a0d721e109d7c7b75aefaf3853f7bf58da43847b.zip |
make live preview display work independently from progress bar
Diffstat (limited to 'modules/progress.py')
-rw-r--r-- | modules/progress.py | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/progress.py b/modules/progress.py index f405f07f..e32b59dd 100644 --- a/modules/progress.py +++ b/modules/progress.py @@ -48,6 +48,7 @@ def add_task_to_queue(id_job): class ProgressRequest(BaseModel):
id_task: str = Field(default=None, title="Task ID", description="id of the task to get progress for")
id_live_preview: int = Field(default=-1, title="Live preview image ID", description="id of last received last preview image")
+ live_preview: bool = Field(default=True, title="Include live preview", description="boolean flag indicating whether to include the live preview image")
class ProgressResponse(BaseModel):
@@ -91,7 +92,7 @@ def progressapi(req: ProgressRequest): id_live_preview = req.id_live_preview
shared.state.set_current_image()
- if opts.live_previews_enable and shared.state.id_live_preview != req.id_live_preview:
+ if opts.live_previews_enable and req.live_preview and shared.state.id_live_preview != req.id_live_preview:
image = shared.state.current_image
if image is not None:
buffered = io.BytesIO()
|