Planar Track
Mocha-style match moving, without leaving the graph
- images
- track_data
- preview
- roi_mask
This is the node the whole pack is built around. Point at a textured flat-ish region - a wall, a screen, a sign, a shirt - tell Planar Track where it is in one frame, and it follows that region through the whole shot, the way Mocha or Nuke's planar tracker would. Except you never leave ComfyUI. That matters more than it sounds: the reason AI video work keeps needing tracking is that you want to lock a face for replacement, propagate a mask for inpainting, or pin an insert onto a screen, and the production-grade option used to live in a compositor that costs thousands and sits outside your graph.
What you're actually getting
Under the hood it's classical computer vision, not a neural net. Features are detected inside your region, followed with pyramidal Lucas-Kanade optical flow, and the per-frame transform is fit with RANSAC/MAGSAC. The part that separates it from a toy is that every frame is ECC-refined against the reference frame, not just chained to its neighbor. Plain frame-to-frame tracking accumulates drift; refining against a fixed reference is what keeps a long shot from wandering off.
Each frame carries a confidence score, and the preview quad is colored green above 0.6, yellow below that, red below 0.3. So when the track starts to slip, you see it at a glance instead of discovering it in the final comp.
Inputs and outputs
The few that actually matter:
- roi_x, roi_y, roi_width, roi_height - where the region is in the reference frame. Typing these works, but the easier path is to Queue once, then drag the corner handles in the editor widget to place the region properly.
- reference_frame (default 0) - the frame your ROI is defined on.
- motion_model -
translation,similarity,affine, orhomography. Homography (the default) is a full perspective warp and right for a tilted screen or sign. If the region only moves around without deforming,similarityis more robust. Drop totranslationif it's genuinely just panning. - ecc_refine (default on) - the drift-killer. Turn it off only if you're benchmarking and want to see the difference.
Outputs are track_data (the TRACK_DATA object every other PlateTrack node eats), preview (annotated frames), and roi_mask - the ROI propagated as a mask through the shot, handy for "only inpaint inside this region."
The track_ui string is hidden state: your ROI, reference frame, and any keyframes, stored as JSON. It lives inside the workflow file, so your corrections survive a reload.
Fixing a bad track - the editor
This is what makes the pack production-usable. After you Queue once, the node carries a scrubber: drag the playhead, watch the confidence graph (dashed guide at 0.6), and hit ⚠ Worst to jump straight to the least-confident frame. Drag the four corner handles to where the region actually is, and you've written a keyframe - the tracker re-runs honoring your pin and blends the correction into the surrounding frames so it doesn't pop. Corrections persist forward, Mocha-style. Re-track is just re-queue.
Installing it
Search PlateTrack in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/edgarciavfx/comfyui-platetrack
pip install -r comfyui-platetrack/requirements.txt
The only hard dependency is OpenCV. Runs on CPU fine - no GPU needed. If another pack already installed opencv-python, skip the pip line; installing both OpenCV variants is the classic way to break this pack.
Where people get burned
- The ROI needs texture. If the tracker errors out about too few trackable features, you've pointed it at a blank wall - pick a region with contrast or enlarge the ROI. That's physics, not a bug.
- Fast motion and blur will lose features. Forward-backward validation and ECC are fighting that the whole way; when they lose, you'll see red quads and you pin.
- Don't expect it to follow a person's silhouette. It's a planar tracker, for planes. Non-flat subjects are what Mask Propagate's
gridmode or the Cutie node are for.
The honest framing for the wider workflow: treat the AI part like VFX, not image-to-video. Track and stabilize the region, generate the element separately, composite it back - the trap is feeding the whole moving plate to a video model and hoping it only changes what you care about. Planar Track is the first step of the version that actually works.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| roi_x | INT | 00–16384 | — |
| roi_y | INT | 00–16384 | — |
| roi_width | INT | 2568–16384 | — |
| roi_height | INT | 2568–16384 | — |
| reference_frame | INT | 00–99999 | — |
| motion_model | COMBO | homography | 4 options: translation, similarity, affine, homography |
| downscale | COMBO | auto | 4 options: auto, 1, 2, 4 |
| ecc_refine | BOOLEAN | true | — |
| track_uiopt | STRING | {} | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| track_data | PLATETRACK_DATA | — |
| preview | IMAGE | — |
| roi_mask | MASK | — |