diff --git a/apps/stable_diffusion/web/ui/img2img_ui.py b/apps/stable_diffusion/web/ui/img2img_ui.py index 7a6419fe97..f3ba552035 100644 --- a/apps/stable_diffusion/web/ui/img2img_ui.py +++ b/apps/stable_diffusion/web/ui/img2img_ui.py @@ -585,10 +585,10 @@ def create_canvas(w, h): with gr.Column(scale=2): random_seed = gr.Button("Randomize Seed") random_seed.click( - None, + lambda: -1, inputs=[], outputs=[seed], - _js="() => -1", + queue=False, ) with gr.Column(scale=6): stable_diffusion = gr.Button("Generate Image(s)") diff --git a/apps/stable_diffusion/web/ui/inpaint_ui.py b/apps/stable_diffusion/web/ui/inpaint_ui.py index 7e01ec8306..082668e85b 100644 --- a/apps/stable_diffusion/web/ui/inpaint_ui.py +++ b/apps/stable_diffusion/web/ui/inpaint_ui.py @@ -484,10 +484,10 @@ def inpaint_api( with gr.Column(scale=2): random_seed = gr.Button("Randomize Seed") random_seed.click( - None, + lambda: -1, inputs=[], outputs=[seed], - _js="() => -1", + queue=False, ) with gr.Column(scale=6): stable_diffusion = gr.Button("Generate Image(s)") diff --git a/apps/stable_diffusion/web/ui/lora_train_ui.py b/apps/stable_diffusion/web/ui/lora_train_ui.py index 2e50476613..c8e00fdad4 100644 --- a/apps/stable_diffusion/web/ui/lora_train_ui.py +++ b/apps/stable_diffusion/web/ui/lora_train_ui.py @@ -159,10 +159,10 @@ with gr.Column(scale=2): random_seed = gr.Button("Randomize Seed") random_seed.click( - None, + lambda: -1, inputs=[], outputs=[seed], - _js="() => -1", + queue=False, ) with gr.Column(scale=6): train_lora = gr.Button("Train LoRA") diff --git a/apps/stable_diffusion/web/ui/outpaint_ui.py b/apps/stable_diffusion/web/ui/outpaint_ui.py index 824dddde9e..0401275f2d 100644 --- a/apps/stable_diffusion/web/ui/outpaint_ui.py +++ b/apps/stable_diffusion/web/ui/outpaint_ui.py @@ -512,10 +512,10 @@ def outpaint_api( with gr.Column(scale=2): random_seed = gr.Button("Randomize Seed") random_seed.click( - None, + lambda: -1, inputs=[], outputs=[seed], - _js="() => -1", + queue=False, ) with gr.Column(scale=6): stable_diffusion = gr.Button("Generate Image(s)") diff --git a/apps/stable_diffusion/web/ui/outputgallery_ui.py b/apps/stable_diffusion/web/ui/outputgallery_ui.py index ee2bf136ad..467d4e6d5d 100644 --- a/apps/stable_diffusion/web/ui/outputgallery_ui.py +++ b/apps/stable_diffusion/web/ui/outputgallery_ui.py @@ -104,7 +104,7 @@ def clear_zero_length_temps(): value=gallery_files.value, visible=False, show_label=True, - ).style(grid=4) + ).style(columns=4) gallery.DEFAULT_TEMP_DIR = gradio_tmp_galleries_folder with gr.Column(scale=4): diff --git a/apps/stable_diffusion/web/ui/txt2img_ui.py b/apps/stable_diffusion/web/ui/txt2img_ui.py index 7182807e49..961ad788b3 100644 --- a/apps/stable_diffusion/web/ui/txt2img_ui.py +++ b/apps/stable_diffusion/web/ui/txt2img_ui.py @@ -451,10 +451,10 @@ def txt2img_api( with gr.Column(scale=2): random_seed = gr.Button("Randomize Seed") random_seed.click( - None, + lambda: -1, inputs=[], outputs=[seed], - _js="() => -1", + queue=False, ) with gr.Column(scale=6): stable_diffusion = gr.Button("Generate Image(s)") diff --git a/apps/stable_diffusion/web/ui/upscaler_ui.py b/apps/stable_diffusion/web/ui/upscaler_ui.py index 413461c237..81449ad473 100644 --- a/apps/stable_diffusion/web/ui/upscaler_ui.py +++ b/apps/stable_diffusion/web/ui/upscaler_ui.py @@ -492,10 +492,10 @@ def upscaler_api( with gr.Column(scale=2): random_seed = gr.Button("Randomize Seed") random_seed.click( - None, + lambda: -1, inputs=[], outputs=[seed], - _js="() => -1", + queue=False, ) with gr.Column(scale=6): stable_diffusion = gr.Button("Generate Image(s)")