Nodes/Experimental DLSS Neural Rendering/DLSS 5 RAFT Motion Guide
ComfyUI Node

DLSS 5 RAFT Motion Guide

Real motion vectors, RAFT's way — the quality video path

By HECer·Created 4 days ago·Updated a day ago· 9
DLSS 5 RAFT Motion Guide
  • images
  • motion_vectors
model
chunk_size2

If the Optical Flow node in this pack is the "it'll do" motion guide, this one is the one you actually want for video. It computes dense current-to-previous optical flow with RAFT, the recurrent learned optical-flow model from the TorchVision model zoo, and it's what gives the DLSS runtime the motion history it needs to keep a clip stable frame after frame. The Easy pipeline reaches for exactly this node when you pick a quality scenario - RAFT Large for "Short video / best quality," RAFT Small for the long-clip memory-efficient path - which tells you everything about where it sits in the pack's hierarchy.

How it works

Under the hood it's torchvision.models.optical_flow: raft_large or raft_small with the official pretrained weights, downloaded automatically on first use (that first run can stall for a bit while PyTorch fetches them - normal). It runs on CUDA when available, pads frames up to a multiple of eight for the network, computes flow in chunks, and rescales the result back to your exact frame size.

The output encoding matters and it's the pack's standard: motion comes back as an IMAGE where R and G hold the X/Y displacement and 0.5 means zero motion. This is the convention every DLSS pipeline node in the pack expects, and it's the thing to check if you ever feed in motion from some other optical-flow pack - vectors that mean "0.5 = zero" are not universal, and getting the convention wrong produces smearing that you'll waste an hour blaming on the runtime.

Inputs

  • model - RAFT Large (best) or RAFT Small (fast). Large is the quality pick for anything up to a few minutes. Small trades accuracy for speed and memory, which is exactly why the Easy node assigns it to long clips.
  • chunk_size (default 2) - frames processed per inference pass. Raise it if you have VRAM to spare and want fewer passes; lower it if you're getting out-of-memory on a long clip. The Easy "memory efficient" scenario runs Small at chunk 4.

That's the whole input surface - three things, two of which you'll rarely touch. The single motion_vectors output feeds the motion_vectors input on the Super Resolution and Full Pipeline nodes, and it's also what the Temporal Depth Stabilizer consumes to warp previous depth into the current frame. The canonical good-video graph, straight from the pack's recommended workflow, is RAFT here, a temporal depth source (Video Depth Anything is the modern choice), and the Full Pipeline at the end.

Where it fits

Two honest caveats. First, RAFT flow is estimated from pixels, not engine motion vectors, so fast motion, large parallax, and heavy occlusion will defeat it - if the DLSS output ghost on fast camera pans, this is usually the link. Second, motion quality is the part of a DLSS pipeline beginners least suspect, because the failure looks like a rendering artifact rather than a "motion field" problem. When in doubt, eyeball the RAFT output on its own before you blame the upscaler.

Pack-level ground rules still apply: Windows + NVIDIA, runtime installed via DLSS Runtime Setup (One Click), health checked with DLSS 5 Runtime Status, and the pack installed through ComfyUI Manager from https://github.com/HECer/ComfyUI-DLSS5. The RAFT weights themselves are one of the pack's few auto-downloads that don't need a Hugging Face token or a license dance - they just work on first run.

Categoryimage/NVIDIA DLSS 5/guides

Inputs (3)

NameTypeDefaultDescription
imagesIMAGE
modelCOMBO2 options: RAFT Large (best), RAFT Small (fast)
chunk_sizeINT21–16

Outputs (1)

NameTypeDescription
motion_vectorsIMAGE