☁️BizyAir Text Guided SAM
BizyAir Text Guided SAM — ComfyUI Node Guide
- image
- IMAGE
- MASK
What it is
This node lets you select an object in an image by just typing its name - "the red dress," "the dog" - instead of painting a mask by hand. It's the combined pipeline the KB describes as targeted masking: a text-prompted detector finds the object's bounding box, and Segment Anything (SAM) turns that box into a precise pixel mask. Under the hood this is the same GroundingDINO-plus-SAM pattern the wider ComfyUI ecosystem uses for exactly this job (it's literally what the README's changelog calls "text_guided_segment-anything" from BizyAir's own examples), bundled into one node here rather than two.
Reach for it whenever you need a mask for a specific named thing rather than the whole foreground - feeding a targeted inpaint, isolating an object for compositing, or building an automated pipeline that needs to find "the person" or "the car" without a human clicking points on every image.
How it works
The text-guided detector reads your prompt, scans the image, and proposes a bounding box for whatever you named - that's the GroundingDINO half of the pipeline. SAM then takes that box and generates a tight, pixel-accurate mask around the actual object inside it, rather than just returning the rectangle. Both stages have their own confidence thresholds, which is why this node exposes two separate threshold parameters instead of one.
Inputs and outputs that matter
image is your source picture. prompt is the text description of what to find - keep it short and specific ("the coffee cup," not "a nice looking mug on the table somewhere"), since detection prompts work better as noun phrases than full sentences. box_threshold (default 0.3) is the detector's confidence cutoff for accepting a bounding box - raise it if you're getting false-positive boxes on the wrong object, lower it if the correct object isn't being detected at all. text_threshold (default 0.3) is a related but separate cutoff, governing how closely the detected region needs to match your text description; the two thresholds work together and it's worth adjusting them one at a time so you know which one actually fixed a bad detection.
Two outputs: IMAGE, likely a visualization or cropped version of the detected region, and MASK, the actual segmentation mask you'll feed into inpainting, compositing, or any other mask-consuming node downstream.
Installing it
Install through ComfyUI Manager (search "BizyAir") or git clone https://github.com/siliconflow/BizyAir.git into custom_nodes, then restart. As with every node in this pack, a BizyAir API key is required before it'll run - the login prompt on first launch gets you set up.
Common issues
If nothing gets detected, lower box_threshold before you assume the node is broken - a threshold set too aggressively is by far the most common reason a valid object goes unfound. If the mask captures the wrong thing entirely - a common failure with grounded detection generally - try being more specific in prompt; vague descriptions ("the animal") on images with multiple candidate objects tend to grab whichever one scores highest by chance, not necessarily the one you meant. And if you're chaining this into an inpaint step, remember the mask from grounded detection tends to hug the object tightly - pad or dilate it before inpainting if you need the fill to blend into surrounding context rather than leaving a visible hard edge.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| 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 | — |