aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorAUTOMATIC1111 <16777216c@gmail.com>2022-11-05 16:22:50 +0300
committerGitHub <noreply@github.com>2022-11-05 16:22:50 +0300
commitb8f2dfed3c0085f1df359b9dc5b3841ddc2196f0 (patch)
treed2f8eafbac0cd5fdf44df53dc59fd9e6f5aeaad2 /modules
parent994136b9c2915aa0a7ae72f19426df5d60dc57d2 (diff)
parent467d8b967b5d1b1984ab113bec3fff217736e7ac (diff)
Merge pull request #4297 from AUTOMATIC1111/aria1th-patch-1
Fix errors from commit f2b697 with --hide-ui-dir-config
Diffstat (limited to 'modules')
-rw-r--r--modules/ui.py14
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):