diff options
author | ふぁ <34892635+fa0311@users.noreply.github.com> | 2022-10-18 08:29:42 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-18 12:08:23 +0000 |
commit | 97d3ba3941536215ea15431886c7f28300a9d915 (patch) | |
tree | 4ac06444d3dfcb49ac9e25f4e2e567e609150956 /modules/ui.py | |
parent | 428080d469a1b760d7b08a1d81fef77d3d47832a (diff) | |
download | stable-diffusion-webui-gfx803-97d3ba3941536215ea15431886c7f28300a9d915.tar.gz stable-diffusion-webui-gfx803-97d3ba3941536215ea15431886c7f28300a9d915.tar.bz2 stable-diffusion-webui-gfx803-97d3ba3941536215ea15431886c7f28300a9d915.zip |
Add scripts to ui-config,json
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/ui.py b/modules/ui.py index 75eb0b0c..39afbc4e 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1753,6 +1753,11 @@ Requested path was: {f} print(f'Warning: Bad ui setting value: {key}: {saved_value}; Default value "{getattr(obj, field)}" will be used instead.')
else:
setattr(obj, field, saved_value)
+ if getattr(x, 'init_field', False):
+ try:
+ x.init_field(saved_value)
+ except Exception:
+ print(f'Warning: Bad ui setting value: {key}: {saved_value}; Default value "{getattr(obj, field)}" will be used instead.')
if type(x) in [gr.Slider, gr.Radio, gr.Checkbox, gr.Textbox, gr.Number] and x.visible:
apply_field(x, 'visible')
|