diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-10-11 21:50:19 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-10-11 21:50:19 +0300 |
commit | 419e539fe33e5bd1f7c7f55b477f955f6bdfc822 (patch) | |
tree | 131ea9501cefd29b7e5cb4b3e1ea36d76c64beb6 /modules/sd_models.py | |
parent | 2536ecbb1790da2af0d61b6a26f38732cba665cd (diff) | |
parent | d7474a5185df2af84a93a12bc7e140d24e0fc516 (diff) |
Merge branch 'learning_rate-scheduling' into learnschedule
Diffstat (limited to 'modules/sd_models.py')
-rw-r--r-- | modules/sd_models.py | 4 |
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")
|