Load RAFT Model
The 20MB optical-flow engine that holds Vid2Vid's frames together
- raft_model
Load RAFT Model is the feeder node for the SD-CN Animation Vid2Vid pipeline. Where Txt2Vid's motion backbone is FloweR (which predicts the future), Vid2Vid's is RAFT, which measures motion that already exists - the optical flow between consecutive frames of your input video. RAFT is the real research model here: "Recurrent All-Pairs Field Transforms" from Princeton, the kind of thing that dominated optical-flow benchmarks. This node just loads its weights and hands the Vid2Vid node a raft_model wire. It's the least glamorous node in the pack and one of the most important, because without real motion estimates, video stylization collapses back into frame-by-frame flicker.
Inputs and outputs
One input, one output. The model_name dropdown currently lists a single choice, raft-things.pth - that's the RAFT model trained on the FlyingThings dataset, which is what the original SD-CN-Animation script used and what this port kept. The output is a raft_model wire that goes into the SDCNVid2Vid node's raft_model input. That's the whole job. If you're just running Txt2Vid, you don't need this node at all.
Install and the auto-download
Weights go in ComfyUI/models/RAFT/, and they're fetched automatically: on first launch the pack checks that folder and, if empty, downloads raft-things.pth (~20MB) from the pxlpshr/ComfyUI-SD-CN-Animation Hugging Face repo. No manual download, no separate install script.
cd ComfyUI/custom_nodes
git clone https://github.com/pxl-pshr/ComfyUI-SD-CN-Animation
or install via ComfyUI Manager (search "ComfyUI-SD-CN-Animation") and restart. The pack's other dependencies (opencv-python, scikit-image, scipy) are shared with the rest of the pack.
Gotchas
The RAFT code itself is bundled inside the pack under a BSD 3-Clause license (separate from the pack's MIT), so this is one node where the license notes actually matter if you plan to redistribute something. If the model_name dropdown is ever empty, the weights didn't land in models/RAFT/ - check the folder and, if the auto-download failed silently (offline, HF unreachable), grab raft-things.pth manually from the Hugging Face repo. And a subtle behavior worth knowing: RAFT internally rounds frame dimensions down to multiples of 16 for its internal processing and estimates bidirectional flow (forward plus backward) to detect occlusion - which is precisely the signal Vid2Vid uses to decide what to regenerate. So if your input video has lots of fast occluding motion, that's the RAFT output working as intended, and the fixes live on the Vid2Vid node's mask knobs, not here.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 1 options: raft-things.pth |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| raft_model | RAFT_MODEL | — |