GetTrackRange
Slice your tracking data down to the window you're sampling
- tracks
- TRACKS
If you're doing per-object tracking for a video workflow - InstanceDiffusion-style boxes that move across frames - you often end up with more tracking data than you're sampling in one go. Maybe you built the full track for a 200-frame clip but you're rendering it in 24-frame windows, or you're testing a segment in the middle before committing to the whole thing. GetTrackRange is the slicer: give it your full tracks and a window, and it hands back just that slice, correctly offset so it lines up with whatever sub-range you're actually about to sample.
It's a small, mechanical node, but it's the kind of thing that quietly prevents an entire class of bug - tracking data that's technically present but off-by-N frames from the images it's supposed to condition.
The inputs and outputs that matter
tracks- your full tracking data, the kind built by the pack's InstanceDiffusion tracking nodes.start_index(default 24) - where the window begins. This isn't a frame you have to hit exactly by trial and error; it should match whatever your sampling window's actual starting frame is elsewhere in the graph.num_frames(default 10, up to 10000) - how many frames wide the slice is, again matching your sampling window.
The output is a single TRACKS object - the same type as the input, just windowed - so it drops straight back into any node downstream that was expecting the full tracking data, like DrawInstanceDiffusionTracking for a visual check or whatever conditioning node consumes tracks directly.
How it works
Conceptually it's a list slice: take the tracking data, cut out the segment starting at start_index running for num_frames, and re-index it so frame 0 of the output is start_index of the input. That re-indexing is the actual value - without it, you'd have tracking data that's correct in absolute terms but misaligned with a sampler that thinks it's starting fresh at frame 0.
How to install it
Via ComfyUI Manager: search "KJNodes for ComfyUI," install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-KJNodes
pip install -r ComfyUI-KJNodes/requirements.txt
then restart ComfyUI. No special dependencies for this one - it's pure data manipulation.
Common issues & troubleshooting
Your instance conditioning looks right in isolation but wrong once you're batching windows. This is exactly the bug this node exists to prevent - double-check start_index actually matches the frame your image batch starts at for that pass, not the frame it started at in your original full-length plan.
This is a genuinely under-documented corner of the pack. Tracking-and-windows workflows for InstanceDiffusion are one of the older, more niche features here, predating the video-control approaches (VACE for Wan, IC-LoRA adapters for LTX) most people reach for now, and the author's own README points to node tooltips rather than a written guide as the documentation. If the tracking data format itself is unclear, read the tooltip on the node that produced your tracks object first - this node just slices whatever shape it's handed.
Empty or malformed output. If tracks coming out looks empty, check that start_index plus num_frames doesn't run past the end of your actual tracking data - asking for a window that doesn't exist in the source is the most common cause.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| tracks | TRACKS | — | |
| start_index | INT | 24-10000–10000 | — |
| num_frames | INT | 101–10000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| TRACKS | TRACKS | — |