aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui.py
diff options
context:
space:
mode:
authorevshiron <evshiron@gmail.com>2022-11-05 14:12:20 +0000
committerevshiron <evshiron@gmail.com>2022-11-05 14:12:20 +0000
commitb6cfaaa20b81d16a978524c952412cfc4d89a414 (patch)
treee0aa306e34e796c79f657d2a73f558de46f80764 /modules/ui.py
parent73e1cd6f53f3566973805666a4049450cdb8da1b (diff)
parent62e3d71aa778928d63cab81d9d8cde33e55bebb3 (diff)
downloadstable-diffusion-webui-gfx803-b6cfaaa20b81d16a978524c952412cfc4d89a414.tar.gz
stable-diffusion-webui-gfx803-b6cfaaa20b81d16a978524c952412cfc4d89a414.tar.bz2
stable-diffusion-webui-gfx803-b6cfaaa20b81d16a978524c952412cfc4d89a414.zip
Merge branch 'master' into fix/encode-pnginfo
Diffstat (limited to 'modules/ui.py')
-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):