diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-05 13:22:50 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 13:22:50 +0000 |
commit | b8f2dfed3c0085f1df359b9dc5b3841ddc2196f0 (patch) | |
tree | d2f8eafbac0cd5fdf44df53dc59fd9e6f5aeaad2 /modules/ui.py | |
parent | 994136b9c2915aa0a7ae72f19426df5d60dc57d2 (diff) | |
parent | 467d8b967b5d1b1984ab113bec3fff217736e7ac (diff) | |
download | stable-diffusion-webui-gfx803-b8f2dfed3c0085f1df359b9dc5b3841ddc2196f0.tar.gz stable-diffusion-webui-gfx803-b8f2dfed3c0085f1df359b9dc5b3841ddc2196f0.tar.bz2 stable-diffusion-webui-gfx803-b8f2dfed3c0085f1df359b9dc5b3841ddc2196f0.zip |
Merge pull request #4297 from AUTOMATIC1111/aria1th-patch-1
Fix errors from commit f2b697 with --hide-ui-dir-config
Diffstat (limited to 'modules/ui.py')
-rw-r--r-- | modules/ui.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/modules/ui.py b/modules/ui.py index 4c2829af..76ca9b07 100644 --- a/modules/ui.py +++ b/modules/ui.py @@ -1446,17 +1446,19 @@ def create_ui(wrap_gradio_gpu_call): continue
oldval = opts.data.get(key, None)
-
- setattr(opts, key, value)
-
+ try:
+ setattr(opts, key, value)
+ except RuntimeError:
+ continue
if oldval != value:
if opts.data_labels[key].onchange is not None:
opts.data_labels[key].onchange()
changed += 1
-
- opts.save(shared.config_filename)
-
+ try:
+ opts.save(shared.config_filename)
+ except RuntimeError:
+ return opts.dumpjson(), f'{changed} settings changed without save.'
return opts.dumpjson(), f'{changed} settings changed.'
def run_settings_single(value, key):
|