From aa0ac2bbdb04717e5e7823c73a01363b4be1ccff Mon Sep 17 00:00:00 2001 From: saienduri <77521230+saienduri@users.noreply.github.com> Date: Sun, 21 Jul 2024 11:51:11 -0700 Subject: [PATCH] Vae weight path none check (#784) --- .../turbine_models/custom_models/sd_inference/sd_pipeline.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/models/turbine_models/custom_models/sd_inference/sd_pipeline.py b/models/turbine_models/custom_models/sd_inference/sd_pipeline.py index f5e58fca..5d840860 100644 --- a/models/turbine_models/custom_models/sd_inference/sd_pipeline.py +++ b/models/turbine_models/custom_models/sd_inference/sd_pipeline.py @@ -343,7 +343,8 @@ def __init__( self.scheduler_device = self.map["unet"]["device"] self.scheduler_driver = self.map["unet"]["driver"] self.scheduler_target = self.map["unet"]["target"] - self.map["vae"]["export_args"]["external_weight_path"] = vae_weight_path + if vae_weight_path is not None: + self.map["vae"]["export_args"]["external_weight_path"] = vae_weight_path elif not self.is_sd3: self.tokenizer = CLIPTokenizer.from_pretrained( self.base_model_name, subfolder="tokenizer"