FL Wan Vace To Video Multi Reference
FL_WanVaceToVideoMultiRef — drive Wan VACE with a whole reference video, not one image
- positive
- negative
- vae
- control_video
- control_masks
- reference_video
- positive
- negative
- latent
- trim_latent
VACE is Alibaba's video-control framework for Wan - the thing that lets you drive a Wan generation with a control video (pose, depth) while holding a character's identity from reference images. The stock WanVaceToVideo node takes a single reference image. This one takes a multi-frame reference video and encodes up to N frames of it as your reference. That's the whole pitch: condition on a moving reference instead of a still.
Why that matters. A single reference image shows the model one pose, one angle, one lighting. Feed it several frames - the same character from a few viewpoints, or a short clip of the look you want held - and you're giving VACE more to anchor on, which is the same reasoning behind the reference-to-video mode everyone got excited about in the Wan ecosystem: "we see the dress from the front and the back, and all it took was feeding it two images." This node generalizes that to as many reference frames as you set.
Fair warning up front: it lives in the pack's WIP category, so treat it as a capable prototype, not a frozen contract.
How it works
It sits in the conditioning-prep slot of a Wan VACE workflow. It takes your positive/negative conditioning, a VAE, and the video/mask inputs, VAE-encodes up to max_reference_frames of the reference video, and prepends those encoded frames to the latent it builds. It hands back modified conditioning, the prepared latent for your sampler, and a trim_latent count - the number of latent frames at the front that are the reference, which you trim off after sampling so they don't show up in your final video.
The inputs and outputs
positive/negative(CONDITIONING) andvae- the usual Wan pipeline connections.width/height/length- output dimensions and frame count.lengthdefaults to 81 (about 5 seconds at 16fps, Wan's comfortable native window) and steps by 4 - keep it on the 4n+1 grid.control_video+control_masks(optional) - the VACE control signal that drives motion.reference_video(optional) - the multi-frame reference to encode.max_reference_frames(1–100, default 10) - how many reference frames to encode and prepend.strength- VACE conditioning strength.
Outputs: positive / negative (feed your sampler), latent (feed KSampler), and trim_latent (an INT - use it downstream to drop the prepended reference frames).
How to install it
Part of filliptm's Fill-Nodes. ComfyUI Manager → search ComfyUI_Fill-Nodes → Install → restart, or:
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
pip install -r ComfyUI_Fill-Nodes/requirements.txt
No model download for the node itself, but it's useless without the rest of a Wan VACE setup - the Wan 2.1/2.2 model, a compatible VAE, and a sampler. That's the heavy part.
Common issues & troubleshooting
Don't forget to trim. The reference frames get prepended to the latent, so if your output starts with a second of "reference" before the real motion, you skipped the trim_latent step. Wire that INT into whatever crops the front of your latent/video.
Frame count has to be legal. length steps by 4 and Wan wants a 4n+1 count (81, 61, 41…). Off-grid values misbehave. The Wan VAE compresses time roughly 4x, which is where the 4n+1 rule comes from.
Reference count costs VRAM and coherence. More max_reference_frames gives the model more to hold onto but eats memory and can muddy things if the reference frames disagree with each other. Start around the default 10 and only push it if identity is drifting.
It's WIP. This is an experimental node in a fast-moving pack. If a Fill-Nodes update changes its behavior, that's expected - pin your workflow or note the version that worked.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| vae | VAE | — | |
| width | INT | 83216–16384 | — |
| height | INT | 48016–16384 | — |
| length | INT | 811–16384 | — |
| batch_size | INT | 11–4096 | — |
| strength | FLOAT | 1.000–1000 | — |
| max_reference_frames | INT | 101–100 | Maximum number of reference frames to use from the reference_video |
| control_videoopt | IMAGE | — | |
| control_masksopt | MASK | — | |
| reference_videoopt | IMAGE | Video frames to use as reference (instead of single image). All frames will be encoded and prepended. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| latent | LATENT | — |
| trim_latent | INT | — |