aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui.py
diff options
context:
space:
mode:
authorAndray <light.and.ray@gmail.com>2024-01-20 07:49:05 +0000
committerAndray <light.and.ray@gmail.com>2024-01-20 07:49:05 +0000
commit56676ff923497901d56fcbca1ac549095e71d72d (patch)
treeaeb58e19d49141c8dd3a764360108a2be9d30e48 /modules/ui.py
parentcb5b335acddd126d4f6c990982816c06beb0d6ae (diff)
downloadstable-diffusion-webui-gfx803-56676ff923497901d56fcbca1ac549095e71d72d.tar.gz
stable-diffusion-webui-gfx803-56676ff923497901d56fcbca1ac549095e71d72d.tar.bz2
stable-diffusion-webui-gfx803-56676ff923497901d56fcbca1ac549095e71d72d.zip
fix tab indexes reset after restart ui
Diffstat (limited to 'modules/ui.py')
-rw-r--r--modules/ui.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/ui.py b/modules/ui.py
index a716a040..ebd33a85 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -532,7 +532,7 @@ def create_ui():
if category == "image":
with gr.Tabs(elem_id="mode_img2img"):
- img2img_selected_tab = gr.State(0)
+ img2img_selected_tab = gr.Number(value=0, visible=False)
with gr.TabItem('img2img', id='img2img', elem_id="img2img_img2img_tab") as tab_img2img:
init_img = gr.Image(label="Image for img2img", elem_id="img2img_image", show_label=False, source="upload", interactive=True, type="pil", tool="editor", image_mode="RGBA", height=opts.img2img_editor_height)
@@ -613,7 +613,7 @@ def create_ui():
elif category == "dimensions":
with FormRow():
with gr.Column(elem_id="img2img_column_size", scale=4):
- selected_scale_tab = gr.State(value=0)
+ selected_scale_tab = gr.Number(value=0, visible=False)
with gr.Tabs():
with gr.Tab(label="Resize to", elem_id="img2img_tab_resize_to") as tab_scale_to: