Mask Propagate
Turn one painted frame of roto into a whole shot
- video
- mask
- mask
Mask Propagate is the roto automation that saves you from painting a mask on 300 frames by hand. The idea is simple and genuinely powerful: you mask the subject on one frame, and this node carries that mask forward through the rest of the shot, warping it as the subject moves. In ComfyTV's keying flow it's the bridge between "I cut out the subject" and "I have a matte that follows it for the whole clip" - and unlike the video-generation trick of asking a diffusion model to guess, this is deterministic tracking: no model download, no hallucination, just math on your GPU.
ComfyTV is the canvas-style app layer on ComfyUI where every operation is its own node. Mask Propagate sits in VideoFX (it's really a roto/masking tool) and plugs naturally into the keying chain.
How it works. It takes a first-frame mask (the error message literally suggests feeding it a Split Part stage's SAM output) plus the video, then places a set of feature points inside the mask - up to max_points of them, chosen where there's local contrast to track. Those points are tracked through the clip with an optical tracker, and a robust transform is solved per frame between the tracked set and the original positions. That transform warps the reference mask forward. The model combo picks how strict the warp is: translation, similarity (translation + scale + rotation, the sensible default), or perspective (full homography for more flexible camera moves). t_ref picks which frame the mask is anchored to (0 = first frame); invert flips the matte.
The inputs that matter. The force_run_token, project_id and parent_output_id inputs are internal plumbing. The real set:
video- the footage (required).mask- aCOMFYTV_IMAGEfirst-frame mask (required - the node errors without one).model-translation/similarity/perspective.similarityis the right starting point for most shots; only goperspectivewhen the camera is clearly moving toward the subject.t_ref- reference time in seconds (0–3600). The frame your mask is painted on.max_points- 4–64, default 24. More points = more robust tracking but slower; drop it if tracking is noisy.invert- flip the matte.
The output is a mask that is actually a COMFYTV_VIDEO (a mask that moves through time) - wire it into Key Mix as the matte and your key now travels with the subject.
Install. Install the pack once:
cd ComfyUI/custom_nodes
git clone https://github.com/jtydhr88/ComfyTV
Restart ComfyUI (full restart, not a browser refresh) and the stage appears under ComfyTV → VideoFX. ComfyUI Manager - search "ComfyTV" - works too. Zero Python dependencies (the pack's pyproject.toml dependency list is empty) and crucially no model files - point tracking is classic vision, not a learned model. Desktop/multi-install users: clone into the running instance's path from the startup log or the node won't register.
Where people get burned. The mask anchor matters more than anything else: t_ref must match the frame your mask is actually painted on, or the warp is solved against the wrong starting pose and the mask walks off the subject. Second: tracking fails silently when the subject has no local contrast inside the mask (a flat, textureless region gives the tracker nothing to hold) - if the mask drifts, reduce max_points or paint a slightly larger mask that includes some textured edge. And perspective over-used will happily shear the mask into nonsense on a static shot; stay on similarity unless the camera clearly moves. Expect to eyeball the result on a few frames - this is roto, and roto always deserves a QC pass.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| force_run_token | INT | 00–2147483647 | Internal — bumped on Run to invalidate ComfyUI's input cache. |
| project_id | STRING | Internal — populated by the projectStore on the frontend. | |
| parent_output_id | INT | 00–2147483647 | Internal — lineage parent set by spawn handlers on the frontend. |
| model | COMBO | similarity | 3 options: translation, similarity, perspective |
| t_ref | FLOAT | 0.000–3600 | — |
| max_points | INT | 244–64 | — |
| invert | BOOLEAN | false | — |
| videoopt | COMFYTV_VIDEO | — | |
| maskopt | COMFYTV_IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | COMFYTV_VIDEO | — |