mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-03-06 05:29:49 +00:00
experimental: allow some tabs to hide model bar
This commit is contained in:
@@ -906,12 +906,14 @@ def create_ui():
|
||||
extensions_interface = ui_extensions.create_ui()
|
||||
interfaces += [(extensions_interface, "Extensions", "extensions")]
|
||||
|
||||
interface_names_without_quick_setting_bars = ["Spaces"]
|
||||
|
||||
shared.tab_names = []
|
||||
for _interface, label, _ifid in interfaces:
|
||||
shared.tab_names.append(label)
|
||||
|
||||
with gr.Blocks(theme=shared.gradio_theme, analytics_enabled=False, title="Stable Diffusion", head=canvas_head) as demo:
|
||||
settings.add_quicksettings()
|
||||
quicksettings_row = settings.add_quicksettings()
|
||||
|
||||
parameters_copypaste.connect_paste_params_buttons()
|
||||
|
||||
@@ -932,6 +934,11 @@ def create_ui():
|
||||
|
||||
loadsave.setup_ui()
|
||||
|
||||
def tab_changed(evt: gr.SelectData):
|
||||
return gr.update(visible=evt.value not in interface_names_without_quick_setting_bars)
|
||||
|
||||
tabs.select(tab_changed, outputs=[quicksettings_row], show_progress=False, queue=False)
|
||||
|
||||
if os.path.exists(os.path.join(script_path, "notification.mp3")) and shared.opts.notification_audio:
|
||||
gr.Audio(interactive=False, value=os.path.join(script_path, "notification.mp3"), elem_id="audio_notification", visible=False)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user