From a6b777fe2da5d1e4bd583f4add4f596ef784f696 Mon Sep 17 00:00:00 2001 From: saienduri <77521230+saienduri@users.noreply.github.com> Date: Tue, 23 Jul 2024 04:05:00 -0700 Subject: [PATCH] none check for vae external weight path --- models/turbine_models/custom_models/sd_inference/vae.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/models/turbine_models/custom_models/sd_inference/vae.py b/models/turbine_models/custom_models/sd_inference/vae.py index 493c8bb7..30227006 100644 --- a/models/turbine_models/custom_models/sd_inference/vae.py +++ b/models/turbine_models/custom_models/sd_inference/vae.py @@ -163,7 +163,7 @@ def export_vae_model( if dtype == torch.float16: vae_model = vae_model.half() mapper = {} - if not os.path.exists(external_weight_path): + if (external_weight_path is not None) and (not os.path.exists(external_weight_path)): utils.save_external_weights( mapper, vae_model,