Nodes/ComfyUI-Fantastic-MiniMaxH3-PromptBuilder/Fantastic H3 Object Mask (SAM 3.1)
ComfyUI Node

Fantastic H3 Object Mask (SAM 3.1)

Used by the Media Loader's Mask for editing panel: finds an object or person in a loaded clip with SAM 3.1 (core ComfyUI's SAM 3 nodes) and saves its mask beside the clip. You don't need to place this node yourself.

By Adudeguyman·Created 2 months ago·Updated 3 days ago· 260
Fantastic H3 Object Mask (SAM 3.1)
  • model
  • clip
    ◄video►
    ◄text►
    ◄points►
    ◄start0.000►
    ◄end0.000►
    ◄threshold0.50►
    ◄max_objects4►
    ◄modereplace►
    ◄base►
    ◄every_framefalse►
    Categoryconditioning/video_models

    Inputs (12)

    NameTypeDefaultDescription
    modelMODELSAM 3.1, from Load Checkpoint.
    clipCLIPSAM 3.1's text encoder, from the same Load Checkpoint.
    videoSTRINGA Media Loader file, e.g. minimax_h3/clip.mp4 [input].
    textSTRINGWhat to find, e.g. phone. Commas for several.
    pointsSTRINGClicked points as JSON: {"frames": [{"time": seconds, "positive": [{"x", "y"}], "negative": [...]}]}, x and y from 0 to 1 on the source frame.
    startFLOAT0.0000–36000Trim start in seconds: only the kept span is masked.
    endFLOAT0.0000–36000Trim end in seconds; 0 is the end of the clip.
    thresholdFLOAT0.500.05–0.95—
    max_objectsINT41–16—
    modeoptCOMBOreplaceWhat to do with the clip's current mask: replace it, add what's found to it, or take what's found out of it.
    baseoptSTRINGThe layer's current mask file, for add and subtract.
    every_frameoptBOOLEANfalseWith dots and a name: also look for the name on every frame, and use what it finds wherever tracking lost the object (after a cut, say). Can pick up look-alikes.

    Outputs (0)

    No outputs