aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2023-07-16 11:52:29 +0300
committerAUTOMATIC1111 <16777216c@gmail.com>2023-07-16 11:52:29 +0300
commit57d61de25cb6de2e317ae23580971e98c70f542e (patch)
treec11e625bec2bc04fea18abea86007b21843c811c /modules
parent5ef7590324891ec7263c767d178a51827a6f9b33 (diff)
fix unneded reload from disk
Diffstat (limited to 'modules')
-rw-r--r--modules/ui_extra_networks.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py
index 0eb02873..c11f1d5b 100644
--- a/modules/ui_extra_networks.py
+++ b/modules/ui_extra_networks.py
@@ -393,6 +393,12 @@ def create_ui(interface: gr.Blocks, unrelated_tabs, tabname):
for tab in related_tabs:
tab.select(fn=lambda: [gr.update(visible=True) for _ in range(5)], inputs=[], outputs=[edit_search, edit_search, dropdown_sort, button_sortorder, button_refresh], show_progress=False)
+ def pages_html():
+ if not ui.pages_contents:
+ return refresh()
+
+ return ui.pages_contents
+
def refresh():
for pg in ui.stored_extra_pages:
pg.refresh()
@@ -401,7 +407,7 @@ def create_ui(interface: gr.Blocks, unrelated_tabs, tabname):
return ui.pages_contents
- interface.load(fn=refresh, inputs=[], outputs=[*ui.pages])
+ interface.load(fn=pages_html, inputs=[], outputs=[*ui.pages])
button_refresh.click(fn=refresh, inputs=[], outputs=ui.pages)
return ui