Merge pull request #14659 from AUTOMATIC1111/immediately-stop-on-second-interrupt

immediately stop on second interrupt
This commit is contained in:
AUTOMATIC1111 2024-01-20 10:26:52 +03:00 committed by GitHub
commit cfa326bbcc
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 2 additions and 1 deletions

View File

@ -107,8 +107,9 @@ class Toprow:
)
def interrupt_function():
if shared.state.job_count > 1 and shared.opts.interrupt_after_current:
if not shared.state.stopping_generation and shared.state.job_count > 1 and shared.opts.interrupt_after_current:
shared.state.stop_generating()
gr.Info("Generation will stop after finishing this image, click again to stop immediately.")
else:
shared.state.interrupt()