Nodes/ComfyUI-Fossiel-WAN-Additional-Tilers/Wan22 Animate To Video (Tiled VAE Encode)
ComfyUI Node

Wan22 Animate To Video (Tiled VAE Encode)

The conditioner that stopped being the bottleneck

By Fossiel·Created 10 months ago·Updated 10 months ago· 2
Wan22 Animate To Video (Tiled VAE Encode)
  • 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
width832
height480
length77
batch_size1
continue_motion_max_frames5
tile_size512
overlap64
temporal_size64
temporal_overlap8
video_frame_offset0

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_frames sets 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.

Categoryconditioning/video_models

Inputs (20)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING
vaeVAE
widthINT83216–16384
heightINT48016–16384
lengthINT771–16384
batch_sizeINT11–4096
continue_motion_max_framesINT51–16384
tile_sizeINT51264–4096Tile size for VAE encoding (X and Y).
overlapINT640–4096Overlap between spatial tiles.
temporal_sizeINT648–4096Number of frames to encode per temporal tile.
temporal_overlapINT84–4096Overlap between temporal tiles.
clip_vision_outputoptCLIP_VISION_OUTPUT
reference_imageoptIMAGE
face_videooptIMAGE
pose_videooptIMAGE
background_videooptIMAGE
character_maskoptMASK
continue_motionoptIMAGE
video_frame_offsetoptINT00–16384

Outputs (6)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
latentLATENT
trim_latentINT
trim_imageINT
video_frame_offsetINT