From 746a0410d43b02dcaf91ac5abc2c1803e420203d Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Sun, 16 Jun 2024 03:10:04 -0400 Subject: [PATCH] Fix VAEEncode with taesd3. --- comfy/sd.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/comfy/sd.py b/comfy/sd.py index 8d90dd063..82f9aeab8 100644 --- a/comfy/sd.py +++ b/comfy/sd.py @@ -189,7 +189,8 @@ class VAE: encoder_config={'target': "comfy.ldm.modules.diffusionmodules.model.Encoder", 'params': encoder_config}, decoder_config={'target': "comfy.ldm.modules.temporal_ae.VideoDecoder", 'params': decoder_config}) elif "taesd_decoder.1.weight" in sd: - self.first_stage_model = comfy.taesd.taesd.TAESD(latent_channels=sd["taesd_decoder.1.weight"].shape[1]) + self.latent_channels = sd["taesd_decoder.1.weight"].shape[1] + self.first_stage_model = comfy.taesd.taesd.TAESD(latent_channels=self.latent_channels) elif "vquantizer.codebook.weight" in sd: #VQGan: stage a of stable cascade self.first_stage_model = StageA() self.downscale_ratio = 4