ExtractFlowAndMixConsistencyMaps
The two-node pipeline in one box
- current_frame
- previous_frame
- Flow
- Motion edge mask
- Occlusion mask
- Border mask
- Flow preview
- Mixed consistency map
- Current frame
- Previous frame
If you've looked at a ComfyWarp sample workflow, you've seen the same two steps appear over and over: extract optical flow between two frames, then fold the three consistency masks into one compositing mask. This node is that sequence collapsed into a single box. Same RAFT call, same mask mixing - you just don't have to draw the wires between them yourself, and you get the flow and the mixed mask out of the same run.
That's genuinely worth it, because flow extraction is the expensive part of the pipeline. Splitting it across two nodes means RAFT runs once and produces the masks, then MixConsistencyMaps runs again to combine them. This node does both in one pass, which is fewer GPU round-trips and one less thing to miswire.
Inputs you'll actually touch
current_frame/previous_frame- the two source video frames, usually straight fromLoadFramePairFromDataset. Same resolution, same order as the pair node gives you.num_flow_updates(default 20) - RAFT refinement passes. Leave it alone unless fast motion is tearing the flow apart.blur(default 1) anddilate(default 2) - clean up the mixed mask. Blur softens it; dilate fattens it so you don't get hard compositing seams exactly on the moving edges.force_binary(default on) - snaps the mixed mask to pure 0/1. This is the classic WarpFusion behavior: a pixel is either "trust the warped style" or "take the current frame," no halfway. Turn it off if you want soft blends.missed_consistency_weight,overshoot_consistency_weight,edges_consistency_weight(all default 1) - how much each of the three masks gets to veto a pixel. Drop a weight to 0 and that mask stops contributing entirely.
Outputs
The node returns eight ports: Flow, Motion edge mask, Occlusion mask, Border mask, Flow preview, Mixed consistency map, plus pass-throughs of Current frame and Previous frame. The pass-throughs are the quietly useful part - they mean this one node can feed the whole flow-blend compositing chain (mixed mask + both frames) without you routing separate wires around.
The Mixed consistency map is the one that matters for output: it's what decides, per pixel, whether to blend the warped stylized frame with the raw current frame (consistent areas) or drop the warped content entirely (inconsistent areas - moving objects, occlusions). That's the "flow blend" deflickering pipeline from the README, and it's what kills the trails and ghosting that raw per-frame diffusion produces.
The tradeoff
You lose a little flexibility versus the two-node version: if you want to inspect each mask before mixing, or reuse one computed flow across several mask mixes, use ExtractOpticalFlow + MixConsistencyMaps separately. But for the default loopback workflow - pair in, mixed mask + warped frame out - this is the node that keeps the graph small and the iteration fast. It's the one I'd reach for first, and it's what most of the newer sample workflows ship with.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| current_frame | IMAGE | — | |
| previous_frame | IMAGE | — | |
| num_flow_updates | INT | 205–100 | — |
| blur | INT | 10–100 | — |
| dilate | INT | 20–100 | — |
| force_binary | BOOLEAN | true | — |
| missed_consistency_weight | FLOAT | 1.000–1 | — |
| overshoot_consistency_weight | FLOAT | 1.000–1 | — |
| edges_consistency_weight | FLOAT | 1.000–1 | — |
Outputs (8)
| Name | Type | Description |
|---|---|---|
| Flow | BACKWARD_FLOW | — |
| Motion edge mask | MASK | — |
| Occlusion mask | MASK | — |
| Border mask | MASK | — |
| Flow preview | IMAGE | — |
| Mixed consistency map | MASK | — |
| Current frame | IMAGE | — |
| Previous frame | IMAGE | — |