Slapshot — Motion Vectors
The boring-important data your video never told you about
- video
- mask
Motion vectors are the data your video doesn't advertise. Every frame, the camera and the subjects move, and something has to describe how much each pixel moved between frames. That per-pixel displacement field is a motion vector map, and it's the quietly load-bearing stuff behind motion blur, optical-flow warping, retiming, and a dozen compositing tricks. You don't see it in the final render; you just notice when it's missing and everything looks stiff.
Slapshot_Motion_Vectors generates that map for you, in the cloud, and hands it back as an EXR file. No local flow model, no VRAM, no wrestling with the DeepFlow-of-the-week node. It's the same deal as the rest of the Slapshot pack: upload a video, submit a job, poll until done, download the result.
Why you'd reach for it
This is the VFX handoff corner of ComfyUI - the place where people usually give up and go open a compositor. If you want accurate motion data for a shot (say, to drive motion blur on an AI-generated clip, or to warp and retime footage), local ComfyUI options are patchy and half-maintained. Motion vectors are also what a matchmove or stabilization pass eats for breakfast. And because the result is EXR, it slots straight into the scene-linear, float-based world that Nuke and After Effects actually live in - the KB's own words: hand an sRGB PNG to a comp and the color blows out, but EXR float is what the pros carry.
If you've never needed a motion vector map, you almost certainly don't need this node yet. It's a tool you reach for when a compositing problem demands one.
How it works
Same pattern as every node in the pack. The node copies your video to a temp file, checks the frame count, uploads it to Slapshot's storage via a presigned URL, and submits a job with the service type smart_vectors. A background thread polls every 60 seconds until inference completes, then the Download Motion Vectors button enables and the file comes down as EXR. The node records the job_id, so you can re-download later via the job ID field and Download Previous Job Result - but only the format the job was submitted with, so don't expect a different export later.
The inputs, and the one that bites
video- any node outputting aVIDEOsocket (.mp4or.mov, max 3500 frames). No way around the extension check.mask(labeled ROI Mask) - optional. A black image with the region of interest colored in. It tells the service "only care about motion inside here."
Here's the part that will bite you: the ROI mask's filename is the keyframe. The node walks your graph, finds the Load Image node feeding the mask, and reads its filename. 00018.png means keyframe 19 (frame index plus one). No 5-digit frame number in the name, or no resolvable Load Image behind the socket, and the node fails with "Could not determine the ROI mask filename" before anything is uploaded. So name your mask files like 00018.png, not mask1.png. That's not a style preference - it's the actual mechanism.
Install and API key
Install via ComfyUI Manager (search Slapshot) or:
cd ComfyUI/custom_nodes
git clone https://github.com/slapshot-ai/comfyui-slapshot
Restart after. Dependencies are requests, opencv-python-headless, and imageio[ffmpeg] - the README only mentions requests, but the frame counting genuinely uses OpenCV, so let Manager install the real list.
Every Slapshot node needs a key: sign up at app.slapshot.ai, Profile → INTEGRATIONS → ComfyUI, generate one, and set it in ComfyUI's root .env (SLAPSHOT_API_KEY=your-key-here) or in custom_nodes/comfyui-slapshot/config.ini under [API]. Restart. .env wins if both exist.
Gotchas
- The free tier is 1000 frames total, counting all your prior Slapshot inference. Over it, jobs refuse to run.
- 3500-frame cap per video.
- The mask keyframe must point at a real frame. The node checks it against the video's frame count and errors if it's out of range.
- The whole video and mask leave your machine and live on Slapshot's servers for the job's duration. Not the tool for confidential footage.
Honest reputational note, same as the rest of this pack: it's brand new, vendor-published (MIT), and there's essentially zero community discussion of it yet - the r/comfyui crowd does video generation and these nodes are aimed at the compositing crowd instead. For a 5-minute cost, read the repo before you hand it your key; that's good hygiene for any node that phones home.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| video | VIDEO | — | |
| maskopt | IMAGE | — |
Outputs (0)
No outputs