diff options
author | evshiron <evshiron@gmail.com> | 2022-11-05 14:12:20 +0000 |
---|---|---|
committer | evshiron <evshiron@gmail.com> | 2022-11-05 14:12:20 +0000 |
commit | b6cfaaa20b81d16a978524c952412cfc4d89a414 (patch) | |
tree | e0aa306e34e796c79f657d2a73f558de46f80764 /modules/ui.py | |
parent | 73e1cd6f53f3566973805666a4049450cdb8da1b (diff) | |
parent | 62e3d71aa778928d63cab81d9d8cde33e55bebb3 (diff) | |
download | stable-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.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):
|