fix(comfyui): T2V workflow pairs 14B models with the 5B VAE, breaking every run at VAEDecode#312
Conversation
The bundled wan22-t2v-4step.json workflow loads the 14B FP8 diffusion pair (wan2.2_t2v_high/low_noise_14B_fp8_scaled.safetensors), which produce 16-channel latents, but its VAELoader referenced wan2.2_vae.safetensors — the WAN 2.2 5B model's VAE, which expects 48-channel latents. Every T2V run therefore failed at VAEDecode with: Expected tensor to have size 48 at dimension 1, but got size 16 Switch the workflow to wan_2.1_vae.safetensors, matching the 14B models and the sibling wan22-i2v-4step.json, and update the T2V required-models list in tools/video/comfyui_video.py to match so preflight checks for the VAE that is actually used. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
calesthio
left a comment
There was a problem hiding this comment.
Thanks for the focused fix. I reviewed this against docs/PR_REVIEW_GUIDE.md and checked the PR description, changed files, and current review/comment state. The scope is tight: the bundled WAN 2.2 T2V workflow and the required-model preflight list now both reference wan_2.1_vae.safetensors, matching the 14B FP8 model family and the sibling I2V workflow.\n\nValidation run locally on the PR head:\n- python -m py_compile tools/video/comfyui_video.py -> passed\n- JSON/workflow consistency check -> VAELoader node 4 uses wan_2.1_vae.safetensors\n- Required-model consistency check -> tools/video/comfyui_video.py requires wan_2.1_vae.safetensors and no longer requires wan2.2_vae.safetensors\n\nI did not find unrelated scope, dependency, security, or provider-discovery risk in this diff. The live ComfyUI decode path still depends on having the WAN models installed, but the PR author's RTX 4090 verification plus the workflow/preflight alignment are enough for this narrow fix.
Problem
The bundled T2V workflow
tools/_comfyui/workflows/wan22-t2v-4step.jsonpairs the WAN 2.2 14B FP8 diffusion models (wan2.2_t2v_high_noise_14B_fp8_scaled.safetensors/wan2.2_t2v_low_noise_14B_fp8_scaled.safetensors) with the wrong VAE: itsVAELoaderreferenceswan2.2_vae.safetensors, which is the WAN 2.2 5B model's VAE and expects 48-channel latents. The 14B models produce 16-channel latents, so every text-to-video run through this workflow fails at theVAEDecodenode.Repro
_REQUIRED_MODELS_T2V(tools/video/comfyui_video.py).comfyui_video(or queuewan22-t2v-4step.jsondirectly in ComfyUI).VAEDecodefails with:Fix
wan22-t2v-4step.json:vae_name→wan_2.1_vae.safetensors, the VAE the WAN 2.2 14B models require. This matches the siblingwan22-i2v-4step.json, which already uses it with the same 14B FP8 model family.tools/video/comfyui_video.py: update_REQUIRED_MODELS_T2Vto listwan_2.1_vae.safetensorsso the preflight/required-models check matches the VAE the workflow actually loads (previously it would demand a model the workflow no longer uses, and not check for the one it does).Verified locally: with the corrected VAE, the same workflow decodes and renders T2V output successfully on a RTX 4090.
🤖 Generated with Claude Code