Nodes/ComfyTV/Motion Track
ComfyUI Node

Motion Track

Click points on your clip and get track data you can pin things to

By jtydhr88·Created 3 months ago·Updated about 16 hours ago· 725
Motion Track
  • video
  • track
force_run_token0
project_id
parent_output_id0
points
point_x0
point_y0
solvenone
t_start0.00
t_end-1.00
pattern12
search24

Motion Track is the node you reach for when something in your footage moves and you need to stick something to it - a title that follows the car, a corner pin that holds to the table, a stabilization that uses one point instead of a full optical-flow pass. You click points directly on the node's video preview, hit ▶ Run, and it follows those points frame by frame. Simple premise, and for a lot of ComfyUI users it's the first time point tracking feels approachable, because there's no separate tracking tool to learn - it's a node with a video in it.

How it works

Under the hood it's classic template-matching tracking: you pick a patch of pixels (the pattern), and each frame the tracker looks for that patch within a search radius and reports where it moved. On Run it returns the tracked paths as text data - the output type is COMFYTV_TEXT (JSON), not a video, which trips people up the first time. You're not getting a transformed clip; you're getting coordinates to drive something else.

Optionally, the solve dropdown fits a single motion transform to those points - translation, similarity, or perspective corners - so downstream stages can pin, stabilize, or corner-pin against the motion instead of hand-keyframing it.

The inputs that matter

  • video (optional) - the clip to track. Click points on its preview.
  • points - JSON [{x,y},...] of the track points; point_x / point_y are the raw coordinate values. The card's click-to-place UI writes these, so usually you won't type them.
  • solve - which transform to fit: none (just track), translation, similarity, or perspective.
  • pattern - the template half-size in pixels (default 12, range 4–64). Bigger patch = more context, less drift; too big and it stops being specific.
  • search - the search radius in pixels (default 24, range 8–128). If your subject moves fast between frames, raise this or the tracker loses it.
  • t_start / t_end - the time window to track (end of -1 means to the end of the clip).

The single output, track (COMFYTV_TEXT), wires into stages that accept track data - think of it as the motion backbone for titles, corner pins, and stabilizers. Native ComfyUI nodes can't read it directly; that's what the pack's Bridge nodes are for.

Where it fits

The pack puts Motion Track in the same roto/tracking family as Roto Mask, Mask Propagate (optical-flow mask tracking), and Paint Strokes. The clean division of labor: Mask Propagate moves a mask, Motion Track moves points and solves a transform. If you're doing a screen-replacement shot, this is the stage you start with.

Install

It's the pack-wide install:

cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV

Restart ComfyUI (fully - Desktop/macOS users: clone into the running instance's custom_nodes by absolute path, verify __init__.py is top-level). ComfyUI Manager finds it as "ComfyTV". No extra Python dependencies.

The realistic failure mode isn't installation, it's tracking quality: a small pattern on a low-texture region drifts, a fast-moving subject outruns search, and footage with motion blur is simply hard. Start with the defaults, and when a point wanders, kill it and re-click rather than trying to coax it back - one clean point beats three flaky ones.

CategoryComfyTV/Video

Inputs (12)

NameTypeDefaultDescription
force_run_tokenINT00–2147483647Internal — bumped on Run to invalidate ComfyUI's input cache.
project_idSTRINGInternal — populated by the projectStore on the frontend.
parent_output_idINT00–2147483647Internal — lineage parent set by spawn handlers on the frontend.
pointsSTRINGJSON [{x,y},...] track points
point_xFLOAT00–8192
point_yFLOAT00–8192
solveCOMBOnone4 options: none, translation, similarity, perspective
t_startFLOAT0.000–3600
t_endFLOAT-1.00-1–3600
patternINT124–64pattern half-size (px)
searchINT248–128search radius (px)
videooptCOMFYTV_VIDEO

Outputs (1)

NameTypeDescription
trackCOMFYTV_TEXT