add support for switching model checkpoints at runtime

This commit is contained in:
AUTOMATIC
2022-09-17 12:05:04 +03:00
parent b8be33dad1
commit 247f58a5e7
6 changed files with 182 additions and 61 deletions

View File

@@ -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)