☁️BizyAir GroundingDinoSAMSegment
Describe the object, get a mask
- grounding_dino_model
- sam_predictor
- image
- IMAGE
- MASK
This is the pairing the wider ecosystem has used for years to mask a specific named object rather than a generic foreground/background split: GroundingDINO reads your text prompt and proposes a bounding box for whatever you named, and SAM turns that box into a pixel-accurate mask. One node, text in, mask out - no painting required.
How it works
Type a description - "the necklace," "her left hand," "the car" - and it does what you'd otherwise do by hand-painting a mask: find the thing, outline it precisely. This is exactly the pattern the 2026 crop-and-stitch style of inpainting workflow leans on for hands-free masking: ground an object with a detector, derive the mask from the box, and skip the painting step entirely before handing the result to an inpainting or compositing pass.
The inputs and outputs that matter
grounding_dino_model(GROUNDING_DINO_MODEL) - from BizyAir_GroundingDinoModelLoader.sam_predictor(SAM_PREDICTOR) - from a SAM predictor loader elsewhere in the pack.image- the source image.prompt(STRING, required) - the object description. This is a required input with no default, so leaving it blank isn't an option.box_threshold(default 0.3, 0-1) - how confident GroundingDINO needs to be that a proposed region is an object at all before it counts. Raise it if you're getting false-positive boxes on the wrong thing; lower it if a real object isn't being detected.text_threshold(default 0.3, 0-1) - how well a candidate region needs to match your specific wording. Lower this one specifically if your description is unusual, or the object is only loosely/partially visible.
Outputs: IMAGE and MASK - the located object and its precise mask.
How to install it
ComfyUI Manager: search BizyAir, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/siliconflow/BizyAir
then restart. BizyAir wants an account and API key set up on first use per the README. You'll also need BizyAir_GroundingDinoModelLoader and a SAM predictor loader wired in ahead of this node - it doesn't load either model itself.
Common issues & troubleshooting
Mask is tighter than you need. Grounding boxes tend to come back hugging the named object itself and missing the context around it - the cup but not the saucer, per the community's experience with this exact detector pairing. If you're feeding the mask straight into inpainting, pad it before use rather than trusting the raw edge.
Wrong object gets masked. Raise box_threshold if the detector is grabbing something that clearly isn't what you described; make your prompt more specific first before assuming the thresholds are the problem.
Nothing gets detected at all. Lower text_threshold first - an unusual phrasing or an object that's only partially visible is the most common cause, more often than the object simply not being in frame.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| grounding_dino_model | GROUNDING_DINO_MODEL | — | |
| sam_predictor | SAM_PREDICTOR | — | |
| image | IMAGE | — | |
| prompt | STRING | — | |
| box_threshold | FLOAT | 0.300–1 | — |
| text_threshold | FLOAT | 0.300–1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |
| MASK | MASK | — |