SAM3 - Video Masking via Text Prompts

SAM 3 lets you mask objects in a video just by typing a short phrase like "red car" or "person" — no frame-by-frame rotoscoping. It finds every matching instance, tracks them across frames with stable IDs, and outputs per-frame masks ready for compositing, blurring, or replacement.

About

This workflow demonstrates text-driven video masking with the SAM3 Video Masking node (ID: 9cea40bb-b0cf-4b40-a758-8935cfe8d52f). You load a clip with VHS_LoadVideo, describe the target in plain language (for example, "red car", "person", "coffee cup"), and the node finds every matching instance and tracks them across frames with stable IDs. It produces three parallel outputs: a preview overlay (colored masks drawn over the original frames), a raw binary/gray mask stream, and a cut-out stream where only the masked pixels are kept.

What you provide

  • Reading the workflow

Runs in ComfyUI. This workflow can't run on this page. Open it in Comfy Cloud with everything loaded, or download it for your own ComfyUI.

Try in Cloud
Output
Example
Sample output

Questions & answers