VACE Annotator - Flow
Optical flow for VACE — forward, backward, or bidirectional, from your frame batch
- images
- flow_maps
Depth tells you where things are. Optical flow tells you how they moved. If you're re-rendering or editing a video and you want the motion preserved - the sway of the camera, the movement of the subject - flow maps are how the model knows what to keep. VACE Annotator - Flow is the preprocessing node for exactly that: it computes optical flow between consecutive frames using the VACE RAFT checkpoint and hands you flow maps ready for the VACE conditioning stack.
Inputs: images is an IMAGE tensor of video frames - and the tooltip is explicit that you need at least 2 frames, because flow is always between frames; feed it a batch (the more frames, the more consecutive pairs get processed). resolution defaults to 512 (64–2048) with the same speed/detail trade as the depth node. flow_direction is the interesting one - forward, backward, or bidirectional. Forward measures where each pixel moves to in the next frame; backward measures where it came from; bidirectional does both, which is the right call when motion is fast or occludes itself and you want the model to have the full picture. For most editing work forward is the sensible default; reach for bidirectional when you're fighting motion blur or occlusion artifacts.
Optional model_path overrides the checkpoint location; default expects the VACE RAFT model at:
ComfyUI/models/vace_annotators/flow/ (e.g. raft.pth)
One output, flow_maps (IMAGE), which feeds the VACE conditioning stack alongside the depth and scribble outputs if you're layering controls. Under the hood it's the RAFT architecture - the recurrent all-pairs field transforms approach that's been the optical flow standard - running through torch with the same class-level model cache as the depth node, so a long batch only loads the model once.
Installing
Part of Swiss Army Knife:
- ComfyUI Manager: search "Swiss Army Knife", install, restart.
- Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/sammykumar/ComfyUI-SwissArmyKnife.git
cd ComfyUI-SwissArmyKnife
pip install -e .
Then grab the RAFT checkpoint from ali-vilab/VACE-Annotators on Hugging Face and drop it in models/vace_annotators/flow/.
Gotchas
- Fewer than 2 frames = error. This node can't run on a single still; it's video-only by construction.
- Missing model file fails immediately. Download the checkpoint first - the pack doesn't ship it.
- Flow is meaningless on static content. A locked-off camera on a still scene produces near-zero flow, which is correct but useless as a control signal. This node pays off when there's real motion to preserve.
- Bidirectional costs ~2x the compute of forward for roughly one control signal. Use it selectively.
Like its depth sibling, this is a specialist node for a specialist pipeline - it earns its place in a Wan + VACE workflow that conditions on motion. When that's the job, it's the preprocessing piece you'd otherwise be hunting for in four different repos.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | Input video frames (batch of at least 2 frames required) | |
| resolution | INT | 51264–2048 | Processing resolution (lower = faster, higher = more detail) |
| flow_direction | COMBO | forward | Direction of optical flow computation |
| model_pathopt | STRING | Custom path to model file (leave empty for default: models/vace_annotators/flow/) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| flow_maps | IMAGE | — |