diff options
author | Anthony Fu <anthonyfu117@hotmail.com> | 2023-10-16 07:00:17 +0000 |
---|---|---|
committer | Anthony Fu <anthonyfu117@hotmail.com> | 2023-10-16 07:00:17 +0000 |
commit | 3d15e58b0a30f2ef1e731f9e429f4d3cf1c259c5 (patch) | |
tree | cee1045fc2c2788e12b065d3d4977d84ef94309f /modules/ui.py | |
parent | 8aa13d5dce2789a7d0bd802e6d62453b3c380496 (diff) | |
download | stable-diffusion-webui-gfx803-3d15e58b0a30f2ef1e731f9e429f4d3cf1c259c5.tar.gz stable-diffusion-webui-gfx803-3d15e58b0a30f2ef1e731f9e429f4d3cf1c259c5.tar.bz2 stable-diffusion-webui-gfx803-3d15e58b0a30f2ef1e731f9e429f4d3cf1c259c5.zip |
feat: refactor
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/ui.py b/modules/ui.py index bcf39199..c30093d7 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -216,8 +216,14 @@ class Toprow: outputs=[],
)
+ def interrupt_fn():
+ if shared.state.job_count > 1 and shared.opts.interrupt_after_current:
+ shared.state.interrupt_next()
+ else:
+ shared.state.interrupt()
+
self.interrupt.click(
- fn=lambda: shared.state.interrupt(),
+ fn=interrupt_fn,
inputs=[],
outputs=[],
)
|