Wan VACE Multi-Ref To Video
Multi-ref VACE for Wan 2.1, without the node soup
- positive
- negative
- vae
- control_video
- start_image
- positioned_frames
- end_image
- extra_reference_images
- inpaint_mask
- positive
- negative
- latent
- trim_latent
This is the main event of the Tessiiiz Wan Video Toolkit for people still on Wan 2.1. WanVaceMultiRefToVideo (displayed as "Wan VACE Multi-Ref To Video") is, in the author's own words, a cleaner replacement for ComfyUI's built-in WanVaceToVideo - same output shape, but with start/end frame pinning, positioned middle frames, multi-reference image batches, and control-video frame filtering bolted on.
The pitch is simple: you throw in a start frame, a handful of reference images pinned to specific frames, an end frame, and optionally a control video, and out the other side you get positive, negative, latent, and trim_latent - wired to your sampler exactly like any other Wan VACE graph. The idea is that pinning a few frames lets you hold a character or object across the clip instead of hoping the model keeps it together for all 81 frames.
How it works
Like its 2.2 sibling, this node builds a pinned frame timeline and then expands - via ComfyUI's GraphBuilder - into the stock WanVaceToVideo node. Concretely it:
- Allocates
lengthframes, pre-filled withempty_frame_levelgray (default 0.5). - Stamps the
control_video(filtered byframes_to_keep_in_control_video, offset bycontrol_start_frame) atcontrol_mask_valuestrength - leave that at 1.0 unless you deliberately want weaker control. - Pins
start_image(heldstart_frame_holdframes), eachpositioned_framesref at its position (heldpositioned_frame_hold), andend_imageat the very end (heldend_frame_hold). - Hands the timeline plus its mask to
WanVaceToVideoascontrol_video/control_masks.
There's one compatibility constraint worth knowing before you design a workflow around it: only one primary reference frame is passed through the internal reference_image path, for Wan VACE runtime compatibility. It's the first available of start → positioned → end → extra refs. So the pinned timeline isn't a gimmick - it's the mechanism. If you want multiple references to actually anchor the clip, they have to go in positioned_frames with positions, not all dumped into extra_reference_images. That's the README's explicit guidance and it's the thing that most people get wrong on first pass.
Inputs and outputs that matter
vae,positive,negative- required. Wire the same sources you'd use for any Wan VACE workflow.length- total clip length in frames (default 81, the Wan native context).positions_of_positioned_frames- default20 30 50 90, space-separated 1-based frame numbers.L/ENDmeans the last frame; negatives count back from the end. Pairs one-to-one with yourpositioned_framesbatch in order.frames_to_keep_in_control_video- a frame filter for the control video.1 20 30keeps three frames,1:16keeps a range. Empty = keep everything.inpaint_mask- optional; multiplies into the timeline mask if you want to restrict where VACE conditioning applies.
Outputs: positive, negative, latent feed your sampler as usual. trim_latent is an INT worth understanding - it's how many latent frames the reference-image prepend added. The stock WanVaceToVideo prepends the reference as extra latent frames, so after sampling you feed trim_latent into ComfyUI's TrimVideoLatent node to strip them back off. Skip that and you get a latent that doesn't match your expected frame count.
Installing and running it
Same story as the rest of this pack: it's glue, not weights. Manager search "ComfyUI-Tessiiiz-WanVideoToolkit", or:
cd ComfyUI/custom_nodes
git clone https://github.com/Tessiiiz/ComfyUI-Tessiiiz-WanVideoToolkit
Restart ComfyUI. You still need a Wan 2.1 VACE model (14B or 1.3B) loaded through ComfyUI's normal Wan loaders - this pack ships nothing. And remember VACE is slow: 14B clips run 15-40 minutes on a 4090 without a distillation LoRA like CausVid.
Common gotchas
- Positions vs. frames mismatch - extra refs beyond your position tokens are silently dropped. Count them.
- The off-by-one - positions are 1-based.
- Don't expect
extra_reference_imagesto do multi-ref lifting - only the first becomes the primary reference. Positioned frames are the real multi-ref path. - Trim the latent - wire
trim_latentintoTrimVideoLatent, or your clip will be the right video with the wrong length.
If your whole pipeline is Wan 2.2 native nodes, use Wan22VaceMultiRefEncode instead - this one is for the 2.1 WanVaceToVideo graph shape.
Inputs (23)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| width | INT | 83216–8192 | — |
| height | INT | 48016–8192 | — |
| length | INT | 811–4096 | — |
| batch_size | INT | 11–4096 | — |
| strength | FLOAT | 1.000–1000 | — |
| control_start_frame | INT | 11–4096 | — |
| frames_to_keep_in_control_video | STRING | — | |
| positions_of_positioned_frames | STRING | 20 30 50 90 | — |
| start_frame_hold | INT | 11–240 | — |
| positioned_frame_hold | INT | 11–240 | — |
| end_frame_hold | INT | 11–240 | — |
| empty_frame_level | FLOAT | 0.500–1 | — |
| control_mask_value | FLOAT | 1.000–1 | — |
| resize_mode | COMBO | stretch | 2 options: stretch, crop |
| control_videoopt | IMAGE | — | |
| start_imageopt | IMAGE | — | |
| positioned_framesopt | IMAGE | — | |
| end_imageopt | IMAGE | — | |
| extra_reference_imagesopt | IMAGE | — | |
| inpaint_maskopt | MASK | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |
| trim_latent | INT | — |