WanVaceReplace
Swap one VACE context without re-encoding everything
- positive
- negative
- vae
- control_video
- control_masks
- reference_image
- positive
- negative
Here's the workflow puzzle WanVaceReplace solves: you've chained a few VACE nodes together and the conditioning is now carrying several VACE contexts. You want to change just one of them - swap the control video on context #2, or lift its strength - without redoing the whole chain. That's the surgical edit this node does: it reaches into existing conditioning, finds the VACE context you point at with context_index, and replaces its control video, reference image, and/or strengths in place.
How it works
The node's replace_vace walks your conditioning, locates the VACE context at context_index (0 = the first one added), and does exactly what you asked and nothing else:
control_video- a new control video, VAE-encoded and dropped in to replace the existing one. If you provide a video,control_masksis required (the tooltip is explicit: "New masks (required if control_video provided)").reference_image- a new reference image replacing the existing one.vace_strength/vace_ref_strength- new strengths for the control and reference frames respectively. The default is-1.0, and that's a sentinel:-1.0means "leave the strength that's already baked into the embedding alone." Only set a real value if you actually want to change it.
So the node has two personalities: leave strengths at -1.0 and it's a pure content swap (new video, new reference, same intensity); set strengths and it's a pure intensity tweak (no video/reference needed). Both at once works too, obviously.
Inputs are positive (required), negative, vae (needed for encoding whatever new video/reference you feed it), plus the fields above. Outputs are positive and negative - same conditioning types, mutated in place.
When you'd actually use it
Honestly, this is an advanced-organizational node. Its natural habitat is a big chained workflow where VACE contexts accumulate from several encode nodes and you want to iterate on a single context's input without rebuilding the graph each time - think a character shot where you're trying a new pose video but keeping the same identity reference and strength balance. If you're on a single-VACE-node workflow, this adds nothing; just change the input on that node. It also plays with the chaining rules from the README: contexts accumulate as you chain, and this node is your way to reach back and edit one of those accumulated entries.
Install
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/drozbay/ComfyUI-WanVaceAdvanced
# restart ComfyUI
or ComfyUI Manager → "ComfyUI-WanVaceAdvanced". No extra dependencies beyond the pack's numpy + scipy. Two practical gotchas: keep context_index small (0–10) and count contexts in the order they were added to the conditioning, because that's what the index refers to; and don't expect this node to patch the model for you - it's conditioning-only, so pair it with a V2 node or VaceAdvancedModelPatch if you're using per-frame strength lists. Small, surgical, and completely skippable until the day your workflow gets big enough to need surgery.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| positive | CONDITIONING | — | |
| negativeopt | CONDITIONING | — | |
| vaeopt | VAE | — | |
| control_videoopt | IMAGE | New control video to encode and replace existing | |
| control_masksopt | MASK | New masks (required if control_video provided) | |
| reference_imageopt | IMAGE | New reference image to encode and replace existing | |
| context_indexopt | INT | 00–10 | Which VACE context to modify (0 = first context) |
| vace_strengthopt | FLOAT | -1.00-1–1000 | Strength for control frames. Use -1.0 to preserve existing strengths from the embedding. |
| vace_ref_strengthopt | FLOAT | -1.00-1–1000 | Strength for reference frames. Use -1.0 to preserve existing strengths from the embedding. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |