SAM 3.1 in ComfyUI: image masks and video tracking
Learn native SAM 3.1 masking in ComfyUI with point coordinates, bounding boxes, mask subtraction and a video detect interval test from 1 to 5.
Player not loading? Watch on YouTube
This tutorial explains a native SAM 3.1 masking workflow in ComfyUI for still images and video. The setup uses the SAM 3.1 Multiplex FP16 checkpoint, which the presenter describes as roughly 1.75 GB, saved in the checkpoints models folder. An initial image example connects the model and text encoder to SAM 3 Detect and previews a mask selected with the prompt "boxer".
For objects that text prompts miss, the presenter uses Photoshop's pixel rulers and Info panel to read X and Y coordinates. Positive points select a bag without a text prompt. Negative points fail to exclude boxing gloves in this test, so the tutorial demonstrates Mask Subtract: the main selection goes into mask A, and a separate gloves mask goes into mask B. A bounding box with a red preview helps target a particular bag among similar objects.
The video section uses SAM 3 Video Track. The presenter reports an improved fire mask after changing detect interval from 1 to 5. Maximum object controls the selection count: 0 selects all matching objects, while examples use 1 and 3. The final section replaces the older SAM 3 Segment RMBZ custom node with native tracking and mask conversion nodes in an existing editing workflow.