diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2023-03-11 16:00:43 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-11 16:00:43 +0300 |
commit | f968270fec57d4818b823afb8023ce24b669e426 (patch) | |
tree | 46448494f4298a990bb5a23b0cef9b0bfd70aeab /modules/ui.py | |
parent | 463711634171dff76f45249fa189942ae920749f (diff) | |
parent | 83829471decbde64d335eb510d4a5670baf68773 (diff) |
Merge pull request #7812 from vladmandic/hide_ui_tabs
allow configurable hiding of ui tabs
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/ui.py b/modules/ui.py index 2509ce2d..3614da45 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1563,6 +1563,10 @@ def create_ui(): extensions_interface = ui_extensions.create_ui()
interfaces += [(extensions_interface, "Extensions", "extensions")]
+ shared.tab_names = []
+ for _interface, label, _ifid in interfaces:
+ shared.tab_names.append(label)
+
with gr.Blocks(css=css, analytics_enabled=False, title="Stable Diffusion") as demo:
with gr.Row(elem_id="quicksettings", variant="compact"):
for i, k, item in sorted(quicksettings_list, key=lambda x: quicksettings_names.get(x[1], x[0])):
@@ -1573,6 +1577,8 @@ def create_ui(): with gr.Tabs(elem_id="tabs") as tabs:
for interface, label, ifid in interfaces:
+ if label in shared.opts.hidden_tabs:
+ continue
with gr.TabItem(label, id=ifid, elem_id='tab_' + ifid):
interface.render()
|