Load Optical Flow Model
RAFT optical flow for VOID
- OPTICAL_FLOW
Of everything in the loaders category, Load Optical Flow Model is the one you'll most likely never touch - and the one whose existence signals how far ComfyUI's video tooling has come. It loads an optical flow model: a network that measures how each pixel moves between two frames of video. That sounds academic until you learn its actual job here, which is warping noise along motion for the VOID video pipeline.
What it's for
Optical flow itself is a classic computer-vision problem - estimate the per-pixel motion field between consecutive frames. ComfyUI uses it in the VOID path (nodes_void), a video-generation technique where the noise you feed the sampler is warped to match the motion of a source video, giving much better temporal consistency than per-frame generation. If you've seen the "warped noise" trick used to keep video frames from swimming independently, this is the loader at the start of that chain.
The loader's own tooltip is refreshingly honest about its narrowness: "Files must be placed in the 'optical_flow' folder. Today only torchvision's raft_large.pth is supported." That's it. One model, one format, one consumer (the VOIDWarpedNoise node, which takes the optical flow model alongside the source video and the noise).
How it works
One input, model_name, listing files in models/optical_flow/. It loads the RAFT-large checkpoint via torchvision and wraps it. One output:
- OPTICAL_FLOW - the wrapped model, wired into VOIDWarpedNoise.
The mechanism is RAFT (Recurrent All-Pairs Field Transforms), the torchvision optical flow workhorse. It's the standard choice because it's solid, pretrained, and already available in the torchvision wheel - no custom architecture to ship.
The critical catch
ComfyUI never downloads optical flow weights. The source docstring says so explicitly - you must place the checkpoint in models/optical_flow/ yourself. That means grabbing raft_large.pth from a torchvision weights URL and dropping it in the folder. The node will happily list whatever you put there, but it will only actually work if that file is RAFT-large in the expected format - drop in the wrong checkpoint and you'll find out at inference time.
Should you use it?
Only if you're building VOID workflows - and if you are, this is mandatory and invisible, just a step on the way. It landed in core in May 2026 alongside the VOID model support, so it's brand new; there are no war stories yet, which is also a warning to expect the niche corners to be rough. For everyone else, this is the loaders list at its most specialized: a single-purpose loader for a single model, doing one specific job in one specific video pipeline. When you need it, it's exactly right. Most people never will.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | Optical flow model to load. Files must be placed in the 'optical_flow' folder. Today only torchvision's raft_large.pth is supported. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| OPTICAL_FLOW | OPTICAL_FLOW | — |