Unverified Commit 467d8b96 authored by AngelBottomless's avatar AngelBottomless Committed by GitHub
parent 89722fb5
...@@ -1446,17 +1446,19 @@ def create_ui(wrap_gradio_gpu_call): ...@@ -1446,17 +1446,19 @@ def create_ui(wrap_gradio_gpu_call):
continue continue
oldval = opts.data.get(key, None) oldval = opts.data.get(key, None)
try:
setattr(opts, key, value) setattr(opts, key, value)
except RuntimeError:
continue
if oldval != value: if oldval != value:
if opts.data_labels[key].onchange is not None: if opts.data_labels[key].onchange is not None:
opts.data_labels[key].onchange() opts.data_labels[key].onchange()
changed += 1 changed += 1
try:
opts.save(shared.config_filename) opts.save(shared.config_filename)
except RuntimeError:
return opts.dumpjson(), f'{changed} settings changed without save.'
return opts.dumpjson(), f'{changed} settings changed.' return opts.dumpjson(), f'{changed} settings changed.'
def run_settings_single(value, key): def run_settings_single(value, key):
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment