From 524699ce686ff7ae83e1e8b535a7d47ed4f27e24 Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Mon, 30 Mar 2026 02:44:53 +0300 Subject: [PATCH] fix: set downscale/upscale ratio to 16 for taef2 packing --- comfy/sd.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/comfy/sd.py b/comfy/sd.py index 9cc7c04ad..ba2b567e4 100644 --- a/comfy/sd.py +++ b/comfy/sd.py @@ -477,7 +477,10 @@ class VAE: decoder_config={'target': "comfy.ldm.modules.temporal_ae.VideoDecoder", 'params': decoder_config}) elif "taesd_decoder.1.weight" in sd: self.latent_channels = sd["taesd_decoder.1.weight"].shape[1] - self.first_stage_model = comfy.taesd.taesd.TAESD(latent_channels=self.latent_channels, use_midblock_gn = True if "taesd_decoder.3.pool.0.weight" in sd else False) + use_midblock_gn = "taesd_decoder.3.pool.0.weight" in sd + self.first_stage_model = comfy.taesd.taesd.TAESD(latent_channels=self.latent_channels, use_midblock_gn=use_midblock_gn) + if self.latent_channels == 32 and use_midblock_gn: + self.downscale_ratio = self.upscale_ratio = 16 elif "vquantizer.codebook.weight" in sd: #VQGan: stage a of stable cascade self.first_stage_model = StageA() self.downscale_ratio = 4