Skip to content

Commit

Permalink
Make buttons clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
viking1304 committed Mar 3, 2024
1 parent df6a63d commit 593ae07
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions scripts/deforum_helpers/ui_right.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@ def close_vid(): # Close video button related func
with gr.Row(elem_id=f"{id_part}_generate_box", variant='compact'):
skip = gr.Button('Pause/Resume', elem_id=f"{id_part}_skip", visible=False)
interrupt = gr.Button('Interrupt', elem_id=f"{id_part}_interrupt", visible=True)
interrupting = gr.Button('Interrupting...', elem_id=f"{id_part}_interrupting", elem_classes="generate-box-interrupting", tooltip="Interrupting generation...")
submit = gr.Button('Generate', elem_id=f"{id_part}_generate", variant='primary')

skip.click(
Expand All @@ -88,7 +89,13 @@ def close_vid(): # Close video button related func
inputs=[],
outputs=[],
)


interrupting.click(
fn=lambda: state.interrupt(),
inputs=[],
outputs=[],
)

deforum_gallery, generation_info, html_info, _ = create_output_panel("deforum", opts.outdir_img2img_samples)

with gr.Row(variant='compact'):
Expand Down Expand Up @@ -147,4 +154,4 @@ def trigger_load_general_settings():
if opts.data.get("deforum_enable_persistent_settings", False):
trigger_load_general_settings()

return [(deforum_interface, "Deforum", "deforum_interface")]
return [(deforum_interface, "Deforum", "deforum_interface")]

0 comments on commit 593ae07

Please sign in to comment.