LiteTracker: Track
Following Points Through Video, One Frame at a Time
- tracker
- image
- points_tensor
- segm_mask
- tracker
- coords
- visibility
- preview
- video_path
This is the node you came for. LiteTracker: Load Model gets the weights; LiteTracker: Track does the work. It takes a video's frames and a set of query points, then follows those points forward through time, frame by frame. It's the mechanism behind a surprising amount of modern video tooling: motion transfer (driving a still image with a reference video, the Wan-Move style trick), point-controlled generation, and keeping a specific object consistent across a clip. The community calls these CoTracker-class point trackers, and this pack is a LiteTracker implementation of exactly that idea.
The core mental model: in ComfyUI, video isn't a file - it's an IMAGE tensor whose batch dimension is time ([T, H, W, C] frames). So you feed this node the image from a video loader like VHS_LoadVideo, not a path. Feed it the tracker from LiteTracker: Load Model, and it returns, for every frame, where each query point moved to.
How it works is the whole pitch. LiteTracker is built for low-latency, online processing: it walks the frames one at a time, keeping a sliding temporal window (the window_len you set at load time, default 16) and using only past frames to predict the current one. No looking ahead, no re-processing the whole clip. That temporal causality is why a model built for real-time surgical tracking slots into video workflows so cleanly - it's fast, and it can emit results before the clip is even finished. On CUDA it runs bf16 under autocast; on Apple Silicon it falls back through MPS.
The inputs that matter:
trackerandimageare required.image= your frames.reset- default false. Query points are built on the first run and reused after that. Swap in a different video or change the points and it keeps tracking the old setup unless you set this true. This is the classic "why is it tracking my other video" gotcha.use_grid(true) withgrid_size(default 10) - the easiest mode: a 10×10 grid, 100 points across the whole frame.grid_query_frame(default 0) is the frame those points are defined on.points_text- hand-typed points as"x,y;x,y;..."or newline-separated. Loses topoints_tensorif both are connected.points_tensor- where you plug the[N,2]tensor from RectEditor (the Grid Editor node). This is the "track just the face / hand / product" path.segm_mask- an optional binary segmentation mask (IMAGE) that constrains tracking to a region, and it's also required forvis_compensate_for_camera_motionto do anything.batch_is_sequence- true means treat the batch dimension as the timeline, which is what you want with a video. Leave it true.preview_mode-simpledraws green dots,visualizerrenders the pretty CoTracker-style rainbow tracks,noneskips drawing for speed.
The outputs, and where they go:
tracker- the bundle passed back through, so you can chain another Track call or keep state.coords- a TENSOR of shape[T, N, 2]: the (x, y) position of each of your N points on each of the T frames. This is the data you actually want for motion transfer or driving a downstream model.visibility- a[T, N]TENSOR of per-point, per-frame visibility confidence. Occluded points go near zero. Filter on this before trusting a coordinate.preview- the IMAGE with tracks drawn, ready for a PreviewImage or VHS_VideoCombine.video_path- a STRING path to a saved .mp4, but only whenvis_also_save_fileis true. It's false by default; the visualizer previews on screen without writing files.
Install is the pack's shared story: ComfyUI Manager (search "comfyui-lite-tracker") or the clone-plus-pip in the README - requirements are just opencv-python, requests and torchvision, and the ~100 MB checkpoint downloads on the Load Model node's first run. The repo's example workflow is a sane template to steal: VHS_LoadVideo feeds frames, SAM2 supplies the mask, RectEditor defines the points, and VHS_VideoCombine writes the result.
Where people get burned: forgetting reset after changing inputs; expecting points_text to win over points_tensor (it won't); and enabling vis_compensate_for_camera_motion without a segm_mask - the node just prints a warning and silently disables it. And remember the preview is a diagnostic, not a finished render. If you want a clean tracked video, save the raw frames and draw your own overlay later.
Inputs (24)
| Name | Type | Default | Description |
|---|---|---|---|
| tracker | LITETRACKER | — | |
| image | IMAGE | — | |
| resetopt | BOOLEAN | false | — |
| use_gridopt | BOOLEAN | true | — |
| grid_sizeopt | INT | 101–256 | — |
| grid_query_frameopt | INT | 00–99999 | — |
| points_textopt | STRING | — | |
| points_tensoropt | TENSOR | — | |
| segm_maskopt | IMAGE | — | |
| batch_is_sequenceopt | BOOLEAN | true | — |
| preview_modeopt | COMBO | visualizer | 3 options: simple, visualizer, none |
| vis_also_save_fileopt | BOOLEAN | false | — |
| vis_save_diropt | STRING | /tmp/ComfyUI/custom_nodes/comfyui-lite-tracker/results | — |
| vis_filenameopt | STRING | — | |
| vis_fpsopt | FLOAT | 24.001–240 | — |
| vis_modeopt | COMBO | rainbow | 3 options: rainbow, cool, optical_flow |
| vis_linewidthopt | INT | 21–12 | — |
| vis_show_first_frameopt | INT | 00–100 | — |
| vis_tracks_leave_traceopt | INT | 0-1–200 | — |
| vis_pad_valueopt | INT | 00–64 | — |
| vis_grayscaleopt | BOOLEAN | false | — |
| vis_opacityopt | FLOAT | 1.000–1 | — |
| vis_query_frameopt | INT | 00–99999 | — |
| vis_compensate_for_camera_motionopt | BOOLEAN | false | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| tracker | LITETRACKER | — |
| coords | TENSOR | — |
| visibility | TENSOR | — |
| preview | IMAGE | — |
| video_path | STRING | — |