diff options
author | Fampai <unknown> | 2022-10-09 02:37:35 +0000 |
---|---|---|
committer | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-09 08:08:11 +0000 |
commit | 122d42687b97ec4df4c2a8c335d2de385cd1f1a1 (patch) | |
tree | c8d496050b6f8d75f3696a98a5cfa86377f3f365 /webui.py | |
parent | e00b4df7c6f0a13941d6f6ea425eebdaa2bc9318 (diff) | |
download | stable-diffusion-webui-gfx803-122d42687b97ec4df4c2a8c335d2de385cd1f1a1.tar.gz stable-diffusion-webui-gfx803-122d42687b97ec4df4c2a8c335d2de385cd1f1a1.tar.bz2 stable-diffusion-webui-gfx803-122d42687b97ec4df4c2a8c335d2de385cd1f1a1.zip |
Fix VRAM Issue by only loading in hypernetwork when selected in settings
Diffstat (limited to 'webui.py')
-rw-r--r-- | webui.py | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -82,6 +82,9 @@ modules.scripts.load_scripts(os.path.join(script_path, "scripts")) shared.sd_model = modules.sd_models.load_model()
shared.opts.onchange("sd_model_checkpoint", wrap_queued_call(lambda: modules.sd_models.reload_model_weights(shared.sd_model)))
+loaded_hypernetwork = modules.hypernetwork.load_hypernetwork(shared.opts.sd_hypernetwork)
+shared.opts.onchange("sd_hypernetwork", wrap_queued_call(lambda: modules.hypernetwork.load_hypernetwork(shared.opts.sd_hypernetwork)))
+
def webui():
# make the program just exit at ctrl+c without waiting for anything
|