Nodes/FeiHou WanAnimate2 Plus/FeiHou-WanAnimate2 Context Options
ComfyUI Node

FeiHou-WanAnimate2 Context Options

The 81-frame wall, and the node that rams through it

By FX-FeiHou·Created 2 days ago·Updated 2 days ago· 1
FeiHou-WanAnimate2 Context Options
  • model
  • model
context_schedulestandard_static
context_frames81
context_stride4
context_overlap32
pose_cache_modedisabled
cache_dtypeint8

If you've rendered video on Wan, you know the wall: 81 frames of native context, about five seconds at 16fps, and asking for more either drifts into mush or OOMs your card. Context-window sampling is the standard way past it - instead of pushing the whole clip through the transformer at once, you denoise overlapping chunks of the latent timeline and fuse them back together. WanAnimate2ContextOptions is that machinery for ComfyUI's native Wan Animate2 support, wrapped in a UI that finally speaks in output frames rather than latent frames.

This one comes from a young pack - ComfyUI-FeiHou-WanAnimate2-Plus, v0.6.0, which went public in September 2026. No community track record yet, so treat the defaults as a starting point rather than gospel. What it does have is a real design opinion: it doesn't reimplement sampling. It leans entirely on ComfyUI's native context handler (IndexListContextHandler) and the model's built-in Animate2 pose handling, which means it tracks the upstream implementation instead of fighting it.

What it replaces

The stock long-video recipe wires up a pair of nodes by hand:

LightX2V LoRA → Context Windows (Manual) → WanAnimate2Cache → sampler model

This node collapses that into one. Feed it the same model you'd give the sampler, and it comes out the other side wearing the context handler and a bounded version of the pose cache - the real upgrade over WanAnimate2Cache, which could retain one pose-branch window forever on a long render. FeiHou's cache keeps a single most-recent slot and evicts cleanly, so VRAM can't silently grow.

How it works

Wan's VAE compresses time by 4x, and Animate2 wants latent lengths of the form 4n+1. So the node takes your values in real output frames and converts internally: context_frames = 81 becomes 21 latent frames, context_overlap = 32 becomes 8, and context_stride = 4 becomes one latent-frame stride. Every 4*n + 1 frame count follows the same (f − 1) / 4 + 1 rule. The only output is model, which you wire straight into your sampler's model input.

The inputs that matter

You'll genuinely touch three of them:

  • context_frames (81) - the window size. 81 is the sweet spot; bigger windows eat proportionally more sampling VRAM.
  • context_overlap (32) - how much neighboring windows share. Must stay under context_frames, or the node raises an error rather than silently misbehaving.
  • pose_cache_mode (disabled / cpu_lru / gpu_lru) - where Animate2 pose activations get cached. cpu_lru is the safest for VRAM; gpu_lru can be faster if it fits; disabled has the lowest cache footprint and is the recommended start for very long renders.

context_schedule (default standard_static) is the window scheduling algorithm at each denoising step - the uniform variants actually use context_stride. cache_dtype (int8 default) is storage precision for that optional cache. The author's recommended starting set: standard_static, 81, stride 4, overlap 32, cache disabled, dtype int8.

Install

The pack has zero Python dependencies - it imports only ComfyUI's own modules - so install is trivial:

cd ComfyUI/custom_nodes
git clone https://github.com/FX-FeiHou/ComfyUI-FeiHou-WanAnimate2-Plus

Then restart ComfyUI. Manager users can search "FeiHou WanAnimate2 Plus". The README also suggests copying or symlinking the folder into custom_nodes, which matters if you run a portable Chinese ComfyUI distribution like the aki builds. The catch is the other direction: these nodes need a recent ComfyUI with native Wan Animate2 and the context-window modules - if the node isn't there after restart, update ComfyUI first.

Where people get burned

  • The other long-video strategy in this pack (FeiHou-WanAnimate2ToVideo) can't be stacked with this node - the two compete for the same sampler state, so bypass or delete this one before switching.
  • This node trims sampling VRAM. Encoding or decoding a very long source video can still exceed VRAM and needs chunked VAE encode/decode support, which the pack doesn't add.
  • Anything not of the form 4n+1 (or a multiple of 4 for stride/overlap) throws - that's Wan, not a bug.

Use this when you want one continuous long take from a pose video without babysitting segment boundaries. If a single short segment is all that fits in VRAM and you'd rather sample in hard segments, the pack's ToVideo node is the other path - but it's one or the other, never both.

CategoryFeiHou/WanAnimate2

Inputs (7)

NameTypeDefaultDescription
modelMODEL
context_scheduleCOMBOstandard_staticWindow scheduling algorithm used at each denoising step.
context_framesINT811–100000Context size in output video frames. Wan requires 4*n + 1; 81 frames becomes 21 latent frames internally.
context_strideINT44–100000Context stride in output video frames. Used by uniform schedules only.
context_overlapINT320–100000Overlap in output video frames. Must be smaller than context_frames.
pose_cache_modeCOMBOdisabledWhere Animate2 pose-branch activations are cached. cpu_lru is safest for VRAM.
cache_dtypeCOMBOint8Storage precision for the optional pose cache.

Outputs (1)

NameTypeDescription
modelMODEL