mirror of
https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
synced 2025-01-01 12:25:06 +08:00
Use default value when dropdown ui setting is bad
Default value is the first value of selectables. Particually, None in styles.
This commit is contained in:
parent
20bf99052a
commit
b65a3101ce
@ -1744,7 +1744,7 @@ Requested path was: {f}
|
||||
# Since there are many dropdowns that shouldn't be saved,
|
||||
# we only mark dropdowns that should be saved.
|
||||
if type(x) == gr.Dropdown and getattr(x, 'save_to_config', False):
|
||||
apply_field(x, 'value')
|
||||
apply_field(x, 'value', lambda val: val in x.choices)
|
||||
|
||||
visit(txt2img_interface, loadsave, "txt2img")
|
||||
visit(img2img_interface, loadsave, "img2img")
|
||||
|
Loading…
Reference in New Issue
Block a user