Nodes/Zura Nodes/Zura Wan 2.2 Looped Chunks Sampler
ComfyUI Node

Zura Wan 2.2 Looped Chunks Sampler

Zura's Looped Chunks Sampler vs Wan's five-second wall

By ZURAVFX·Created a day ago·Updated about 13 hours ago· 0
Zura Wan 2.2 Looped Chunks Sampler
  • model
  • clip
  • vae
  • clip_vision
  • reference_image
  • footage
  • images
  • video
  • receipt
promptPreserve the character appearance and scene.
negative_promptflicker, warped hands, extra limbs, identity drift
steps6
cfg1.0
seed0
chunk_frames41
overlap_frames5
max_side1280
shot_modeDetect cuts
cut_threshold0.20
cut_frames

Wan 2.2's native context is 81 frames - about five seconds - and past that you get warps, looping and drift. Not a settings error; it's the field's actual constraint. The 2026 answer was to hide the stitching inside a single node, and SCAIL-2 Infinity and Bernini Infinity are the well-known versions of that trick. This is the same idea for stock Wan 2.2 Animate: one sampler that runs the 41-frame loop and muxes the audio.

What it is

One node that takes the prepared footage, the Wan model, CLIP, VAE, CLIP Vision and a reference image, and renders the whole clip in 4n+1 frame windows - sampling, decoding, joining and re-anchoring internally. It also assembles a finished VIDEO with the original audio and exact timing, so there's no separate finish/mux node at the end. Preview it or SaveVideo it.

Default chunk_frames is 41 - 1.7 seconds per pass. Small on purpose: cheaper to re-run while you tune a LoRA stack.

How the loop actually joins (the part that makes it good)

Every chunk after a shot's first is handed the previous chunk's real output frames as continue_motion - the native WanAnimateToVideo continuation mechanism. The next window starts on those exact frames with the source conditioning aligned to the same absolute frames, so the model samples motion it has genuinely seen instead of inventing a fresh take and having it faded in.

Then the join. A hand-built graph drops the frames the native node reports as trim_image, because they just repeat output you already emitted. Here they're kept as the cross-fade partner: they hold two renditions of the same absolute pixels, the predecessor's and this chunk's, the second made with the first in its context. The blend is a flat-ended Hann ramp, so the zone's first frame is exactly the predecessor's and its last is exactly this chunk's continuation. Nothing steps; any residual difference is spread across the zone.

Each chunk logs mean |real - rendition| as continuation_delta, also in the receipt. Near zero means the join is a true continuation. Large means the chunks disagree and you should raise overlap_frames.

The inputs that matter

  • footage - ZURA_FOOTAGE from Zura Mask. Nothing else supplies pose, face and mask tensors, and the node errors clearly if you wire something else in.
  • reference_image - your identity, from any LoadImage node.
  • chunk_frames (41) and overlap_frames (5) - both must be 4n+1, and overlap_frames at most half of chunk_frames. overlap_frames is the continuation anchor and the cross-fade zone; the tooltip suggests 9 for fast dance movement, and it costs no extra sampling because a continuation window is still exactly chunk_frames long.
  • shot_mode - Detect cuts (default), Continuous, Manual cuts. A window never spans a cut, so a cut stays a hard cut instead of the model smearing across it. cut_threshold (0.2) tunes detection - lower detects more, so raise it if flashes and whip pans keep being mistaken for edits. cut_frames takes comma-separated frame numbers for manual mode (frame 96 is 4 seconds).
  • steps / cfg - plain widgets, but the Turbo Switch node overrides both when it's connected.
  • prompt / negative_prompt - the defaults (preserve appearance; avoid flicker, warped hands, identity drift) are a sane Animate baseline, not a rule.
  • max_side (1280) - the render bound.

Outputs are images, video, and receipt. Wire receipt to a ShowText node - it's JSON with the chunk count, resolved shots, cuts, per-chunk timings and the continuation deltas. If a join looks wrong, that delta tells you whether the model disagreed with its own context or the blend is hiding something else.

Install

Manager → Zura Nodes, or:

cd ComfyUI/custom_nodes
git clone https://github.com/ZURAVFX/ComfyUI_zura_nodes
pip install -r ComfyUI_zura_nodes/requirements.txt

Restart. ffmpeg/ffprobe must be on PATH - the assembly and audio path run through them. The example workflow names the Wan 2.2 Animate UNet, UMT5 encoder, Wan VAE, CLIP Vision and three LoRAs explicitly: swap those widget values for your filenames, replace example_clip.mp4 and example_character.png, and install rgthree-comfy or substitute another LoRA loader for its Power Lora Loader.

From the author's own sweep: the official bf16 relight LoRA beats the resized fp16 conversion, Wan14B_RealismBoost lowers measured edge detail (taste knob, not quality knob), and LoRA wiring order made no measurable difference.

Where people get burned

  • Step counts that aren't 4n+1. 40 or 42 gets rejected. The reason is the Wan VAE's ~4× temporal compression: N frames become ((N-1)//4)+1 latents and decode back to (T-1)*4+1 frames, which is also why long clips occasionally come back a frame or two short. Round to the next 4n+1.
  • Cut detection firing on a strobe. Raise cut_threshold.
  • A visible seam at a join. Read continuation_delta first; if it's large, raise overlap_frames to 9.
  • Expecting the ~81-frame native window to have vanished. It hasn't, and identity drift across chunk boundaries is still the field's known failure mode. This node makes chunking ergonomic; it doesn't make it free.
  • Timing. Everything is 24fps, so a 10-second clip is 240 frames - six chunks at the default size, at minutes per chunk on a 14B model.
CategoryZura

Inputs (17)

NameTypeDefaultDescription
modelMODEL
clipCLIP
vaeVAE
clip_visionCLIP_VISION
reference_imageIMAGE
footageZURA_FOOTAGEPrepared footage from the Zura Mask node.
promptSTRINGPreserve the character appearance and scene.
negative_promptSTRINGflicker, warped hands, extra limbs, identity drift
stepsINT61–200Sampler steps. The Turbo Switch node overrides this when connected.
cfgFLOAT1.00–30Guidance scale. The Turbo Switch node overrides this when connected.
seedINT00–18446744073709550000
chunk_framesINT415–409Frames rendered per loop, in one pass of the sampler. Must be 4n+1 and at least twice the continuation frames.
overlap_framesINT55–405Continuation frames: the real tail of the previous chunk that the next chunk is told to carry on from, then cross-fades its own take onto. Deeper context holds motion tighter through fast movement (9 helps on quick dance); must be 4n+1.
max_sideINT1280256–1920
shot_modeCOMBODetect cutsWhere continuation restarts. Detect cuts (auto) and Manual cuts split the clip into shots: a new shot starts unconditioned, so the cut stays hard. Continuous treats the whole clip as a single shot.
cut_thresholdFLOAT0.200.01–1Lower values detect more cuts. Raise this if flashes or fast movements are mistaken for edits.
cut_framesSTRINGManual cuts: comma-separated frame numbers where a new shot begins. At 24 fps, frame 96 is 4 seconds.

Outputs (3)

NameTypeDescription
imagesIMAGE
videoVIDEO
receiptSTRING