mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-03-09 23:44:55 +08:00
Curse you, gradio!!! fixes broken refresh button #12309
This commit is contained in:
parent
a0e74c4db4
commit
fadbab3781
@ -239,13 +239,13 @@ def create_refresh_button(refresh_component, refresh_method, refreshed_args, ele
|
|||||||
for comp in refresh_components:
|
for comp in refresh_components:
|
||||||
setattr(comp, k, v)
|
setattr(comp, k, v)
|
||||||
|
|
||||||
return [gr.update(**(args or {})) for _ in refresh_components]
|
return (gr.update(**(args or {})) for _ in refresh_components) if len(refresh_components) > 1 else gr.update(**(args or {}))
|
||||||
|
|
||||||
refresh_button = ToolButton(value=refresh_symbol, elem_id=elem_id, tooltip=f"{label}: refresh" if label else "Refresh")
|
refresh_button = ToolButton(value=refresh_symbol, elem_id=elem_id, tooltip=f"{label}: refresh" if label else "Refresh")
|
||||||
refresh_button.click(
|
refresh_button.click(
|
||||||
fn=refresh,
|
fn=refresh,
|
||||||
inputs=[],
|
inputs=[],
|
||||||
outputs=[*refresh_components]
|
outputs=refresh_components
|
||||||
)
|
)
|
||||||
return refresh_button
|
return refresh_button
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user