Skip to content

Commit

Permalink
Merge pull request #14659 from AUTOMATIC1111/immediately-stop-on-seco…
Browse files Browse the repository at this point in the history
…nd-interrupt

immediately stop on second interrupt
  • Loading branch information
AUTOMATIC1111 authored Jan 20, 2024
2 parents 7581da5 + 14b9762 commit cfa326b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion modules/ui_toprow.py
Original file line number Diff line number Diff line change
Expand Up @@ -107,8 +107,9 @@ def create_submit_box(self):
)

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()

Expand Down

0 comments on commit cfa326b

Please sign in to comment.