diff options
author | AUTOMATIC <16777216c@gmail.com> | 2023-05-02 06:08:00 +0000 |
---|---|---|
committer | AUTOMATIC <16777216c@gmail.com> | 2023-05-02 06:08:00 +0000 |
commit | b1717c0a4804f8ed3bb8cc2f3aea5d095778b447 (patch) | |
tree | c4a696c3fd656ae84bf12b3ad1076de59fb96134 /modules/ui.py | |
parent | 696c338ee2841830fd5010427d90347329d5786a (diff) | |
download | stable-diffusion-webui-gfx803-b1717c0a4804f8ed3bb8cc2f3aea5d095778b447.tar.gz stable-diffusion-webui-gfx803-b1717c0a4804f8ed3bb8cc2f3aea5d095778b447.tar.bz2 stable-diffusion-webui-gfx803-b1717c0a4804f8ed3bb8cc2f3aea5d095778b447.zip |
do not load wait for shared.sd_model to load at startup
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/ui.py b/modules/ui.py index 7b45f131..16c46515 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -828,7 +828,7 @@ def create_ui(): with FormGroup():
with FormRow():
cfg_scale = gr.Slider(minimum=1.0, maximum=30.0, step=0.5, label='CFG Scale', value=7.0, elem_id="img2img_cfg_scale")
- image_cfg_scale = gr.Slider(minimum=0, maximum=3.0, step=0.05, label='Image CFG Scale', value=1.5, elem_id="img2img_image_cfg_scale", visible=shared.sd_model and shared.sd_model.cond_stage_key == "edit")
+ image_cfg_scale = gr.Slider(minimum=0, maximum=3.0, step=0.05, label='Image CFG Scale', value=1.5, elem_id="img2img_image_cfg_scale", visible=False)
denoising_strength = gr.Slider(minimum=0.0, maximum=1.0, step=0.01, label='Denoising strength', value=0.75, elem_id="img2img_denoising_strength")
elif category == "seed":
@@ -1693,11 +1693,9 @@ def create_ui(): show_progress=info.refresh is not None,
)
- text_settings.change(
- fn=lambda: gr.update(visible=shared.sd_model and shared.sd_model.cond_stage_key == "edit"),
- inputs=[],
- outputs=[image_cfg_scale],
- )
+ update_image_cfg_scale_visibility = lambda: gr.update(visible=shared.sd_model and shared.sd_model.cond_stage_key == "edit")
+ text_settings.change(fn=update_image_cfg_scale_visibility, inputs=[], outputs=[image_cfg_scale])
+ demo.load(fn=update_image_cfg_scale_visibility, inputs=[], outputs=[image_cfg_scale])
button_set_checkpoint = gr.Button('Change checkpoint', elem_id='change_checkpoint', visible=False)
button_set_checkpoint.click(
|