diff options
author | AngelBottomless <35677394+aria1th@users.noreply.github.com> | 2022-11-04 19:24:42 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-04 19:24:42 +0000 |
commit | 467d8b967b5d1b1984ab113bec3fff217736e7ac (patch) | |
tree | 7ae6dbb2b4a8e619eb219a11c1bddd1a9bb7f679 /modules/ui.py | |
parent | 89722fb5e4eda2adc5d3a6abf8babf8a58e80d69 (diff) | |
download | stable-diffusion-webui-gfx803-467d8b967b5d1b1984ab113bec3fff217736e7ac.tar.gz stable-diffusion-webui-gfx803-467d8b967b5d1b1984ab113bec3fff217736e7ac.tar.bz2 stable-diffusion-webui-gfx803-467d8b967b5d1b1984ab113bec3fff217736e7ac.zip |
Fix errors from commit f2b697 with --hide-ui-dir-config
https://github.com/AUTOMATIC1111/stable-diffusion-webui/commit/f2b69709eaff88fc3a2bd49585556ec0883bf5ea
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):
|