mirror of
https://github.com/openvinotoolkit/stable-diffusion-webui.git
synced 2025-01-05 19:34:33 +03:00
fix unneded reload from disk
This commit is contained in:
parent
5ef7590324
commit
57d61de25c
@ -393,6 +393,12 @@ def create_ui(interface: gr.Blocks, unrelated_tabs, tabname):
|
|||||||
for tab in related_tabs:
|
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)
|
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():
|
def refresh():
|
||||||
for pg in ui.stored_extra_pages:
|
for pg in ui.stored_extra_pages:
|
||||||
pg.refresh()
|
pg.refresh()
|
||||||
@ -401,7 +407,7 @@ def create_ui(interface: gr.Blocks, unrelated_tabs, tabname):
|
|||||||
|
|
||||||
return ui.pages_contents
|
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)
|
button_refresh.click(fn=refresh, inputs=[], outputs=ui.pages)
|
||||||
|
|
||||||
return ui
|
return ui
|
||||||
|
Loading…
Reference in New Issue
Block a user