Skip to content

Commit

Permalink
Merge pull request #950 from jarrodpan/fix/non-iterable-outputpanel-o…
Browse files Browse the repository at this point in the history
…bject

fix: modify create_output_panel output to match object returned
  • Loading branch information
rewbs committed Mar 4, 2024
2 parents df6a63d + 1b938a4 commit 33c0f03
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 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,8 +89,18 @@ def close_vid(): # Close video button related func
inputs=[],
outputs=[],
)

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

output_panel = create_output_panel("deforum", opts.outdir_img2img_samples)

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

with gr.Row(variant='compact'):
settings_path = gr.Textbox("deforum_settings.txt", elem_id='deforum_settings_path', label="Settings File", info="settings file path can be relative to webui folder OR full - absolute")
Expand Down Expand Up @@ -147,4 +158,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")]

1 comment on commit 33c0f03

@kylewetton
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a breaking change.

You appear to have added deforum_gallery = output_panel.gallery when output_panel doesn't have that value

*** Error executing callback ui_tabs_callback for C:\Users\krwet\stable-diffusion-webui\extensions\sd-webui-deforum\scripts\deforum.py
    Traceback (most recent call last):
      File "C:\Users\krwet\stable-diffusion-webui\modules\script_callbacks.py", line 166, in ui_tabs_callback
        res += c.callback() or []
      File "C:\Users\krwet\stable-diffusion-webui\extensions\sd-webui-deforum\scripts\deforum_helpers\ui_right.py", line 101, in on_ui_tabs
        deforum_gallery = output_panel.gallery
    AttributeError: 'tuple' object has no attribute 'gallery'

Please sign in to comment.