Wan22 Animate To Video (Tiled VAE Encode)
The conditioner that stopped being the bottleneck
- positive
- negative
- vae
- clip_vision_output
- reference_image
- face_video
- pose_video
- background_video
- character_mask
- continue_motion
- positive
- negative
- latent
- trim_latent
- trim_image
- video_frame_offset
Character animation with Wan 2.2 Animate is a genuinely great workflow, right up until your VRAM says no. The Animate conditioner is a hungry one: it VAE-encodes a reference image plus a whole motion sequence up front, and on 8–12GB cards that single encode can spike past what you have free - while the sampler downstream would have been fine. This node is the fix. It's the same ComfyUI-native Wan 2.2 Animate conditioner, with the full-tensor VAE encode swapped for a tiled one.
What it actually does
Wan Animate (the Wan2.2-Animate-14B model, Alibaba's character animation/replacement release) needs a pile of visual inputs glued into the conditioning: a reference image of your character, plus optional driving pose video, face video, and background. The original node encodes all of that into latent space in one go - the memory spike. This pack's version runs vae.encode_tiled() instead: it chops the image into overlapping spatial tiles (tile_size × tile_size, with overlap) and the video into temporal chunks (temporal_size frames, with temporal_overlap), encodes each chunk separately, and blends them back together.
Because the tiles overlap and get blended, the encoded result is effectively identical to a full encode. The whole point of the pack - and of the original ComfyUI--WanImageToVideoTiled this one extends - is that you get the same latent using a fraction of the peak VRAM. It costs a little extra wall-clock time; the author calls it negligible, and it is, compared to an OOM crash.
The inputs that matter
The essentials are the usual WAN conditioners: positive and negative conditioning from a CLIPTextEncode, a vae (the Wan VAE), and width / height / length / batch_size. Then the fun part:
reference_image- the character you want to animate.pose_video,face_video,background_video- the driving inputs, from an Animate-style workflow (pose extraction, face crops, background plate).character_mask- tells the model where the character is so the background can move independently.continue_motion- paste in the tail of a previous clip to chain shots;continue_motion_max_framessets how many frames get reused.
Then the four tiling knobs, shared by every node in this pack: tile_size (512), overlap (64), temporal_size (64 frames per chunk), temporal_overlap (8). Leave them alone until you hit VRAM limits - defaults are well chosen.
Outputs are positive / negative conditioning and an empty latent for the KSampler, plus trim_latent and trim_image (integers telling downstream nodes how much got trimmed) and video_frame_offset, which you feed into the next Animate node's video_frame_offset input when chaining.
Installing it
ComfyUI Manager → "Install Custom Nodes" → search Fossiel or WAN-Additional-Tilers, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Fossiel/ComfyUI-Fossiel-WAN-Additional-Tilers
Restart ComfyUI. This pack has zero extra Python dependencies - no requirements.txt, nothing to pip install - and it downloads no models. You bring the Wan 2.2 checkpoint, CLIP, VAE, and the Animate-14B weights yourself.
Gotchas
The biggest one: keep ComfyUI reasonably current. The temporal-tiling args (tile_t / overlap_t) on encode_tiled() are a newer addition; an old build won't accept them. If you hit an unexpected encode_tiled error, update ComfyUI first.
The face video is resized to 512×512 internally and doesn't get tiled - that one's cheap enough. And if your clip still won't fit, don't reach straight for tiny tile_size; reducing length or using a continue_motion chain usually hurts quality less.
Inputs (20)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| width | INT | 83216–16384 | — |
| height | INT | 48016–16384 | — |
| length | INT | 771–16384 | — |
| batch_size | INT | 11–4096 | — |
| continue_motion_max_frames | INT | 51–16384 | — |
| tile_size | INT | 51264–4096 | Tile size for VAE encoding (X and Y). |
| overlap | INT | 640–4096 | Overlap between spatial tiles. |
| temporal_size | INT | 648–4096 | Number of frames to encode per temporal tile. |
| temporal_overlap | INT | 84–4096 | Overlap between temporal tiles. |
| clip_vision_outputopt | CLIP_VISION_OUTPUT | — | |
| reference_imageopt | IMAGE | — | |
| face_videoopt | IMAGE | — | |
| pose_videoopt | IMAGE | — | |
| background_videoopt | IMAGE | — | |
| character_maskopt | MASK | — | |
| continue_motionopt | IMAGE | — | |
| video_frame_offsetopt | INT | 00–16384 | — |
Outputs (6)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |
| trim_latent | INT | — |
| trim_image | INT | — |
| video_frame_offset | INT | — |