Video Stabilizer — RAFT Flow (deprecated)
RAFT-flow stabilization is now one dropdown — this node is deprecated
- frames
- stabilized_frames
- padding_mask
- info
Same story as its siblings, stated plainly: VideoStabilizerFlowMEC is deprecated. The pack's description is unambiguous - "DEPRECATED - use VideoStabilizerMEC (method=raft_flow) instead." The node still exists for backward compatibility, prints a warning, and forwards to the unified VideoStabilizerMEC node. New workflows should use that node.
But "raft_flow" is worth understanding, because it's the backend this whole stabilizer family leans on for the hard cases - and it's the most demanding of the three.
What the RAFT flow backend does
Where the classic backend tracks sparse points, raft_flow computes dense optical flow - a per-pixel motion estimate for every frame - using RAFT (Recurrent All-Pairs Field Transforms), the model that's been the workhorse of optical-flow research since ECCV 2020. Dense flow gives you a complete motion field, which makes camera-motion estimation far more robust on footage where sparse feature tracking starves: flat walls, clear skies, clean studio backgrounds. That's the whole reason this backend exists.
The trade-offs are real: RAFT wants a GPU, it eats VRAM, and it's slower than feature tracking. The node's two flow-specific knobs acknowledge that:
raft_iters(INT, default 12) - the number of RAFT refinement iterations. More = more accurate flow, more compute. 12 is a good default; drop it for speed on long clips.use_half(BOOLEAN, default true) - run the flow model in fp16. Halves VRAM and speeds things up at negligible quality cost on modern GPUs; turn it off if you see flow artifacts.
The rest of its inputs match the classic node (framing_mode, transform_mode, camera_lock, strength, smooth, keep_fov, padding_color), and its outputs are the same trio: stabilized_frames, padding_mask, info.
What to use instead
VideoStabilizerMEC, the unified node. Set method=raft_flow when your footage is texture-poor, method=classic for fast textured handheld clips, or method=auto and let the node choose based on clip length and free VRAM. The presets bundle the tuning knobs (handheld_light, handheld_heavy, vehicle, tripod_lock), and preset=manual hands control back to you. The padding_mask output is the same - and it's the output you want, because it lets you feed the introduced border regions into the pack's InpaintCropProMEC and fill them instead of settling for gray edges.
Installing the pack
cd ComfyUI/custom_nodes
git clone https://github.com/Code2Collapse/ComfyUI-CustomNodePacks.git
restart ComfyUI or use Manager → "CustomNodePacks". The RAFT flow model loads on first use - have a GPU handy and an internet connection for that first run. If you're installing the pack's other requirements, comment out what ComfyUI already bundles to avoid clobbering its torch/numpy.
Bottom line
This node is the flat-footage specialist of the old trio, now folded into a dropdown. If an old workflow references it, it still runs; if you're building new, VideoStabilizerMEC with method=raft_flow is the same thing without the warning. Only reach for flow over classic when the footage actually needs it - on well-textured handheld clips, feature tracking is faster and just as good.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| frames | IMAGE | — | |
| frame_rate | FLOAT | 16.0 | — |
| framing_mode | COMBO | crop_and_pad | 3 options: crop, crop_and_pad, expand |
| transform_mode | COMBO | similarity | 3 options: translation, similarity, perspective |
| camera_lock | BOOLEAN | false | — |
| strength | FLOAT | 0.700–1 | — |
| smooth | FLOAT | 0.500–1 | — |
| keep_fov | FLOAT | 0.600–1 | — |
| padding_color | STRING | 127, 127, 127 | — |
| raft_iters | INT | 124–32 | — |
| use_half | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| stabilized_frames | IMAGE | — |
| padding_mask | MASK | — |
| info | STRING | — |