diff --git a/comfy/sd.py b/comfy/sd.py index 230d4cf82..4380cffa5 100644 --- a/comfy/sd.py +++ b/comfy/sd.py @@ -1095,6 +1095,9 @@ class VAE: self.patcher = mp(self.first_stage_model, load_device=self.device, offload_device=offload_device, fast_disk=fast_disk) m, u = self.first_stage_model.load_state_dict(sd, strict=False, assign=self.patcher.is_dynamic()) + if not self.patcher.is_dynamic(): + # Lazy parameters only exist after loading the state dict. + self.first_stage_model.to(self.vae_dtype) if len(m) > 0: logging.warning("Missing VAE keys {}".format(m))