Nodes/ComfyUI-Wan22FMLF/Wan Multi-Frame Reference
ComfyUI Node

Wan Multi-Frame Reference

As many anchor images as you want

By wallen0322·Created 10 months ago·Updated 6 months ago· 566
Wan Multi-Frame Reference
  • positive
  • negative
  • vae
  • ref_images
  • clip_vision_output
  • positive_high
  • positive_low
  • negative
  • latent
width832
height480
length81
batch_size1
modeNORMAL
ref_positions
ref_strength_high0.80
ref_strength_low0.20
end_frame_strength_high1.00
end_frame_strength_low1.00
structural_repulsion_boost1.00

The pack's other nodes (first-middle-last, four-frame) hard-code how many reference images you get and where they land. This one doesn't. Feed it a batch of any number of images and a position string, and it builds the conditioning to hit all of them. It's the node to reach for once you've outgrown three checkpoints and want five, six, or a dozen.

Where this fits

Same underlying problem as the rest of the pack - Wan 2.2 I2V only really understands "start here," and a single 5-second clip drifts fast if you're not steering it. The first-middle-last node covers the 90% case of "beginning, middle, end." This node exists for the other 10%: a music-video-style sequence with several distinct poses, a product shot that needs to hit five specific angles, anything where three anchors aren't enough. It builds the same kind of high-noise/low-noise conditioning split as the rest of the family, just generalized to N images instead of 3.

Inputs and outputs that matter

Required: the usual positive, negative, vae, width, height, length, batch_size - plus ref_images, which is required here (unlike the optional per-slot images on the simpler nodes). This is a batch of reference images, fed in as one IMAGE input.

The interesting part is ref_positions (STRING, defaults to empty). This is where you tell the node where each reference frame lands in the timeline, and it accepts several formats:

  • Leave it blank - the recommended default. Positions get spread evenly across length. Three images at length 81 land at frames 0, 40, 80.
  • Ratios, "0, 0.5, 1.0" - position as a fraction of total length. Easiest to reason about if you're changing length a lot.
  • Absolute frame indices, "0, 20, 40, 60, 80" - exact frame numbers.
  • JSON array, "[0, 0.25, 0.5, 0.75, 1.0]" - same as ratios/absolute, just typed as a literal array; ratios and absolutes can even be mixed in one array.

A few mechanical rules worth knowing before you fight the node: positions auto-align to the nearest multiple of 4 (Wan's latent stride - frame 15 becomes frame 12), adjacent positions get forced at least 4 frames apart if you specify two too close together, and positions are not auto-sorted - list them in ascending order yourself. If you give fewer positions than images, the last position repeats for the extras; more positions than images, and the extras get silently dropped.

Beyond that:

  • ref_strength_high (0.8) / ref_strength_low (0.2) - how hard the reference frames are enforced in the high-noise vs. low-noise pass. Same logic as everywhere else in the pack: strong early, loose late, to avoid mid-clip flicker.
  • fade_frames (0-8, default 2) - a soft transition window around each reference point instead of a hard cut in constraint strength.
  • end_frame_strength_high / end_frame_strength_low (both default 1.0) - separate, stricter enforcement specifically for whichever reference lands at the very end of the clip.
  • structural_repulsion_boost (1.0-2.0) - the same high-noise-only motion-punch-up as the rest of the pack.
  • clip_vision_output - one optional CLIP Vision output, shared across all reference frames (unlike the per-frame CLIP Vision inputs on the simpler nodes).

Outputs: positive_high, positive_low, negative, latent - feed the two conditioning streams into your high/low-noise KSampler pair as usual.

Installing it

ComfyUI Manager: search "ComfyUI-Wan22FMLF". Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/wallen0322/ComfyUI-Wan22FMLF

Restart. Same model requirements as the rest of the pack - Wan 2.2 I2V-A14B high/low checkpoints, the matching VAE, official rather than quantized weights if you want the frame-anchoring to behave.

Common issues

"My images aren't landing where I expect." Almost always a ref_positions formatting mismatch - mixing ratios and absolutes without realizing 1 means "100%, i.e. the last frame" while 1.0 vs. plain 1 sometimes reads differently than people expect from a spreadsheet mindset. When in doubt, leave the field blank and let it auto-distribute; that's the pack author's own recommended default and it's one less thing to get wrong.

Positions collide or look bunched. Remember the auto-4-frame-spacing rule - if you asked for frames 16 and 18, the node silently moved one of them to keep 4 frames of separation. If your output looks like two reference images fought over the same few frames, check whether your requested positions were actually that close.

Six or more references and the clip still feels chaotic. More anchors means more constraint fights during sampling, and cranking ref_strength_high past the default to compensate tends to backfire into visible stutters at each anchor rather than smoother tracking. If you're going past four or five references, dropping ref_strength_low even further (toward 0, per the pack's own "complex scenes" guidance) usually reads better than pushing the high-noise strength up.

Reaching for this when the simpler node would do. If you genuinely just want a beginning, middle and end, WanFirstMiddleLastFrameToVideo is less to configure and has per-frame CLIP Vision slots this node doesn't. Save this one for when three anchors aren't enough.

CategoryComfyUI-Wan22FMLF

Inputs (16)

NameTypeDefaultDescription
positiveCONDITIONING
negativeCONDITIONING
vaeVAE
widthINT83216–8192
heightINT48016–8192
lengthINT811–8192
batch_sizeINT11–4096
ref_imagesIMAGE
modeoptCOMBONORMAL2 options: NORMAL, SINGLE_PERSON
ref_positionsoptSTRING
ref_strength_highoptFLOAT0.800–1
ref_strength_lowoptFLOAT0.200–1
end_frame_strength_highoptFLOAT1.000–1
end_frame_strength_lowoptFLOAT1.000–1
structural_repulsion_boostoptFLOAT1.001–2
clip_vision_outputoptCLIP_VISION_OUTPUT

Outputs (4)

NameTypeDescription
positive_highCONDITIONING
positive_lowCONDITIONING
negativeCONDITIONING
latentLATENT