Improve --multi-user mode

This commit is contained in:
oobabooga 2023-09-26 05:44:04 -07:00
parent 019371c0b6
commit 1ca54faaf0
10 changed files with 79 additions and 68 deletions

View file

@ -219,7 +219,7 @@ class ToolButton(gr.Button, gr.components.IOComponent):
return "button"
def create_refresh_button(refresh_component, refresh_method, refreshed_args, elem_class):
def create_refresh_button(refresh_component, refresh_method, refreshed_args, elem_class, interactive=True):
"""
Copied from https://github.com/AUTOMATIC1111/stable-diffusion-webui
"""
@ -232,7 +232,7 @@ def create_refresh_button(refresh_component, refresh_method, refreshed_args, ele
return gr.update(**(args or {}))
refresh_button = ToolButton(value=refresh_symbol, elem_classes=elem_class)
refresh_button = ToolButton(value=refresh_symbol, elem_classes=elem_class, interactive=interactive)
refresh_button.click(
fn=refresh,
inputs=[],