sd_api_pictures: fix Gradio warning message regarding custom value (#4391)

This commit is contained in:
GuizzyQC 2023-10-26 22:03:21 -04:00 committed by GitHub
parent 92b2f57095
commit 317e2c857e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -339,7 +339,7 @@ def ui():
height = gr.Slider(64, 2048, value=params['height'], step=64, label='Height') height = gr.Slider(64, 2048, value=params['height'], step=64, label='Height')
with gr.Column(variant="compact", elem_id="sampler_col"): with gr.Column(variant="compact", elem_id="sampler_col"):
with gr.Row(elem_id="sampler_row"): with gr.Row(elem_id="sampler_row"):
sampler_name = gr.Dropdown(value=params['sampler_name'], label='Sampling method', elem_id="sampler_box") sampler_name = gr.Dropdown(value=params['sampler_name'], allow_custom_value=True, label='Sampling method', elem_id="sampler_box")
create_refresh_button(sampler_name, lambda: None, lambda: {'choices': get_samplers()}, 'refresh-button') create_refresh_button(sampler_name, lambda: None, lambda: {'choices': get_samplers()}, 'refresh-button')
steps = gr.Slider(1, 150, value=params['steps'], step=1, label="Sampling steps", elem_id="steps_box") steps = gr.Slider(1, 150, value=params['steps'], step=1, label="Sampling steps", elem_id="steps_box")
with gr.Row(): with gr.Row():