Skip to content

Commit

Permalink
revert some questionable changes from #9159
Browse files Browse the repository at this point in the history
  • Loading branch information
AUTOMATIC1111 committed Apr 29, 2023
1 parent f685fe7 commit 1a50272
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions modules/ui_extra_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,7 +243,7 @@ def create_ui(container, button, tabname):
for page in ui.stored_extra_pages:
with gr.Tab(page.title, id=page.title.lower().replace(" ", "_")):

page_elem = gr.HTML("")
page_elem = gr.HTML(page.create_html(ui.tabname))
ui.pages.append(page_elem)

filter = gr.Textbox('', show_label=False, elem_id=tabname+"_extra_search", placeholder="Search...", visible=False)
Expand Down Expand Up @@ -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 ["" for page in ui.stored_extra_pages]
return [page.create_html(ui.tabname) for page in ui.stored_extra_pages]

index = int(index)
index = 0 if index < 0 else index
Expand All @@ -309,7 +309,7 @@ def save_preview(index, images, filename):
else:
image.save(filename)

return ["" for page in ui.stored_extra_pages]
return [page.create_html(ui.tabname) for page in ui.stored_extra_pages]

ui.button_save_preview.click(
fn=save_preview,
Expand Down

1 comment on commit 1a50272

@space-nuko
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh sorry I forgot to leave those uncommitted

Please sign in to comment.