aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui_extra_networks.py
diff options
context:
space:
mode:
authorspace-nuko <24979496+space-nuko@users.noreply.github.com>2023-03-29 18:04:02 +0000
committerspace-nuko <24979496+space-nuko@users.noreply.github.com>2023-03-29 18:07:12 +0000
commit67955ca9e5cb6b3cc539333d0a7d9591009bc800 (patch)
treee36ee024f8cd9d2bb38dacb448fad00d3ad84a46 /modules/ui_extra_networks.py
parent22bcc7be428c94e9408f589966c2040187245d81 (diff)
downloadstable-diffusion-webui-gfx803-67955ca9e5cb6b3cc539333d0a7d9591009bc800.tar.gz
stable-diffusion-webui-gfx803-67955ca9e5cb6b3cc539333d0a7d9591009bc800.tar.bz2
stable-diffusion-webui-gfx803-67955ca9e5cb6b3cc539333d0a7d9591009bc800.zip
Make selected tab configurable with UI config
Diffstat (limited to 'modules/ui_extra_networks.py')
-rw-r--r--modules/ui_extra_networks.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/ui_extra_networks.py b/modules/ui_extra_networks.py
index 25eb464b..ad98f083 100644
--- a/modules/ui_extra_networks.py
+++ b/modules/ui_extra_networks.py
@@ -241,9 +241,9 @@ def create_ui(container, button, tabname):
with gr.Tabs(elem_id=tabname+"_extra_tabs") as tabs:
for page in ui.stored_extra_pages:
- with gr.Tab(page.title):
+ with gr.Tab(page.title, id=page.title.lower().replace(" ", "_")):
- page_elem = gr.HTML(page.create_html(ui.tabname))
+ page_elem = gr.HTML("")
ui.pages.append(page_elem)
filter = gr.Textbox('', show_label=False, elem_id=tabname+"_extra_search", placeholder="Search...", visible=False)
@@ -284,7 +284,7 @@ def setup_ui(ui, gallery):
def save_preview(index, images, filename):
if len(images) == 0:
print("There is no image in gallery to save as a preview.")
- return [page.create_html(ui.tabname) for page in ui.stored_extra_pages]
+ return ["" for page in ui.stored_extra_pages]
index = int(index)
index = 0 if index < 0 else index
@@ -309,7 +309,7 @@ def setup_ui(ui, gallery):
else:
image.save(filename)
- return [page.create_html(ui.tabname) for page in ui.stored_extra_pages]
+ return ["" for page in ui.stored_extra_pages]
ui.button_save_preview.click(
fn=save_preview,