mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-08-05 03:32:37 +00:00
Add interrupt button to preprocessing
This commit is contained in:
@@ -1249,7 +1249,9 @@ def create_ui(wrap_gradio_gpu_call):
|
||||
gr.HTML(value="")
|
||||
|
||||
with gr.Column():
|
||||
run_preprocess = gr.Button(value="Preprocess", variant='primary')
|
||||
with gr.Row():
|
||||
interrupt_preprocessing = gr.Button("Interrupt")
|
||||
run_preprocess = gr.Button(value="Preprocess", variant='primary')
|
||||
|
||||
process_split.change(
|
||||
fn=lambda show: gr_show(show),
|
||||
@@ -1422,6 +1424,12 @@ def create_ui(wrap_gradio_gpu_call):
|
||||
outputs=[],
|
||||
)
|
||||
|
||||
interrupt_preprocessing.click(
|
||||
fn=lambda: shared.state.interrupt(),
|
||||
inputs=[],
|
||||
outputs=[],
|
||||
)
|
||||
|
||||
def create_setting_component(key, is_quicksettings=False):
|
||||
def fun():
|
||||
return opts.data[key] if key in opts.data else opts.data_labels[key].default
|
||||
|
Reference in New Issue
Block a user