aboutsummaryrefslogtreecommitdiffstats
path: root/modules/ui.py
diff options
context:
space:
mode:
authorAUTOMATIC <16777216c@gmail.com>2022-09-17 09:05:04 +0000
committerAUTOMATIC <16777216c@gmail.com>2022-09-17 09:05:18 +0000
commit247f58a5e740a7bd3980815961425b778d77ec28 (patch)
tree56536dd5c7a078720e4d0cc71530280c70df3c47 /modules/ui.py
parentb8be33dad13d4937c6ef8fbb49715d843c3dd586 (diff)
downloadstable-diffusion-webui-gfx803-247f58a5e740a7bd3980815961425b778d77ec28.tar.gz
stable-diffusion-webui-gfx803-247f58a5e740a7bd3980815961425b778d77ec28.tar.bz2
stable-diffusion-webui-gfx803-247f58a5e740a7bd3980815961425b778d77ec28.zip
add support for switching model checkpoints at runtime
Diffstat (limited to 'modules/ui.py')
-rw-r--r--modules/ui.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/modules/ui.py b/modules/ui.py
index 437bce66..36e3c664 100644
--- a/modules/ui.py
+++ b/modules/ui.py
@@ -758,7 +758,12 @@ def create_ui(txt2img, img2img, run_extras, run_pnginfo):
if comp_args and isinstance(comp_args, dict) and comp_args.get('visible') is False:
continue
+ oldval = opts.data.get(key, None)
opts.data[key] = value
+
+ if oldval != value and opts.data_labels[key].onchange is not None:
+ opts.data_labels[key].onchange()
+
up.append(comp.update(value=value))
opts.save(shared.config_filename)