aboutsummaryrefslogtreecommitdiff
path: root/modules/sd_models.py
diff options
context:
space:
mode:
authorDepFA <35278260+dfaker@users.noreply.github.com>2022-10-11 15:15:09 +0100
committerGitHub <noreply@github.com>2022-10-11 15:15:09 +0100
commit1eaad955330bbe2d55f6b528c902758739413dc8 (patch)
treefba92d854e283d3a413b1b36682bb23171a086d7 /modules/sd_models.py
parent7aa8fcac1e45c3ad9c6a40df0e44a346afcd5032 (diff)
parente0ee5bf703996b33e6d97aa36e0973ceedc88503 (diff)
Merge branch 'master' into embed-embeddings-in-images
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r--modules/sd_models.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/sd_models.py b/modules/sd_models.py
index 2cdcd84f..0a55b4c3 100644
--- a/modules/sd_models.py
+++ b/modules/sd_models.py
@@ -152,6 +152,10 @@ def load_model_weights(model, checkpoint_info):
devices.dtype_vae = torch.float32 if shared.cmd_opts.no_half or shared.cmd_opts.no_half_vae else torch.float16
vae_file = os.path.splitext(checkpoint_file)[0] + ".vae.pt"
+
+ if not os.path.exists(vae_file) and shared.cmd_opts.vae_path is not None:
+ vae_file = shared.cmd_opts.vae_path
+
if os.path.exists(vae_file):
print(f"Loading VAE weights from: {vae_file}")
vae_ckpt = torch.load(vae_file, map_location="cpu")