WanAnimatePlus VAE Decode
The VAE decode that knows where your frames went
- vae
- samples
- images
Latents are compressed video in a box. This node is the box-opener - but unlike a plain VAE decode, it's smart about the WanAnimatePlus tricks that make your frame count lie. When the SCAIL-2 Flow chain hard-freezes 21 transition frames into the front of the latent for seamless video connection, a naive decode would hand you those extra frames back as if they were output. This node knows they're scaffolding, trims them, and returns the video you actually asked for.
The mechanism is refreshingly direct (worth quoting from the pack's source): it checks whether the LATENT object already carries decoded video - the Flow Sampler's internal loop can stash video in there - and if so it returns that directly, skipping a second decode pass entirely. Otherwise it does a normal decode and then applies the accounting: it slices off the canvas_expansion_px leading frames and trims to output_frame_count, so prefix scaffolding and transition padding never leak into your result.
What you set
vae- the Wan VAE. On the official-compatible chain you can wire the same VAE the Flow Embeds node used, or leave it to the chain; on the Flow path the sampler may already have bundled one.samples- theLATENTfromWanAnimatePlus SCAIL_2 Flow Sampler(or any ordinary latent; it decodes those fine too).tiled_vae- off by default. Tiling decodes in chunks, drastically cutting memory at the cost of possible seams; flip it on when an 81+ frame decode is OOMing.
Output is a single images tensor - standard ComfyUI IMAGE - ready for a preview, a SaveAnimatedWEBP/video-save node, or a stitched-together multi-chunk workflow.
Why you'd reach for it
Two reasons. First, the official-compatible Flow chain ends with it: Flow Embeds → Flow Sampler → VAE Decode, all standard types, no WANVID... sockets anywhere. Second, it fixes a class of bug that makes beginners tear their hair out - output clips that come back the wrong length, or with a few frozen/duplicated frames at the front. That's not you doing something wrong; that's prefix/transition scaffolding. This node handles the trim so you don't have to count frames by hand. (The frame-count confusion is a real and documented Wan trap - the VAE compresses time ~4x, so N frames and (N−1)//4+1 latents and back again rarely round-trip to the number you typed.)
Install
Same as the rest of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/wuwukaka/ComfyUI-WanAnimatePlus.git
Restart ComfyUI, or use ComfyUI Manager (search "ComfyUI-WanAnimatePlus"). Keep the original ComfyUI-WanVideoWrapper installed per the README, and don't mix WanAnimatePlus nodes with original WanVideoWrapper ones in a single workflow.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| vae | VAE | — | |
| samples | LATENT | — | |
| tiled_vae | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |