Track Stabilize
Feed the sampler a motionless crop, not a moving shot
- images
- track_data
- images
- track_data
Generative models are terrible at motion. Feed an img2img pass frames where your subject is drifting sideways and you'll get smear, re-invented backgrounds, or both. The VFX-standard fix is to stabilize first - warp every frame so the region you care about sits perfectly still - do your generation on that rock-steady sequence, then put the motion back. Track Stabilize is the front half of that "stabilize → process → destabilize" round-trip, and it's the reason this pack exists.
How it works
Give it the source frames and the track_data from any tracker node. It warps each frame into reference-locked space using the stored homography: track a poster on a wall and have the camera pan past it, and every output frame has that poster frozen in place. The round-trip is exact by construction - the inverse warp on the way out uses the same stored matrix, so you don't accumulate error on the way there and back.
Two modes:
- crop_roi (default) - outputs a tight crop around the tracked region, plus
paddingpixels of context. This is the one you want as an img2img payload: it's small, it's motionless, and the model spends its entire budget on your subject instead of an empty room. - lock_full_frame - keeps the whole frame, with padding around the edges to hide the wobble when the camera moves. Use it when the whole shot needs locking, or when the tracked region is small relative to the frame.
padding (default 32) adds breathing room around the crop in both modes. If your stabilized frames clip at the edges, bump it.
Inputs and outputs
- images - your original frames.
- track_data - the TRACK_DATA object, almost always straight out of Planar Track, Point Track, or Face Track.
- mode and padding as above.
It returns the stabilized images and - the part people miss - a second track_data output with the stabilize info baked in. Feed that second output to Track Destabilize, not the original track. Destabilize needs the canvas transform that Stabilize chose, and it lives on the track this node hands you.
Installing it
Same as the whole pack: search PlateTrack in ComfyUI Manager, or clone the repo and pip install -r requirements.txt. OpenCV only, no GPU, no models to download.
Where people get burned
- Wiring Destabilize to the wrong
track_data. The stabilize info is attached by this node, so grab thetrack_dataoutput from Stabilize itself. - Setting
paddingto 0 incrop_roimode and wondering why the result has hard edges - the crop is tight to the ROI by default, and a little padding plus a feather on the way out covers the seam. - Expecting the output to look "flat." It won't, and shouldn't: the region is locked, the rest of the frame moves behind it. That's the point.
Stabilize + sampler + Destabilize is a three-node pipeline that turns "generate into this moving shot" from a coin flip into a near-certainty. The one real trap is remembering there's a second half.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | — | |
| track_data | PLATETRACK_DATA | — | |
| mode | COMBO | crop_roi | 2 options: lock_full_frame, crop_roi |
| padding | INT | 320–4096 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| track_data | PLATETRACK_DATA | — |