GroundingDinoModelLoader (segment anything plus)
The half of this pack that actually understands your prompt
- GROUNDING_DINO_MODEL
Here's the trick that makes this whole pack different from a one-click background remover: the thing deciding what to cut out isn't a fixed list of classes, it's a sentence. GroundingDINO is an open-vocabulary object detector - you give it text, it draws boxes around whatever that text describes. This node is the loader for that detector, and it's the sibling of SAMModelLoader: SAM is the "where exactly are the edges" half, GroundingDINO is the "what is it and where is it roughly" half. Most workflows wire both loaders into the same GroundingDinoSAMSegment node, which is where the real work happens.
The dropdown and what's behind it
Two checkpoints, and honestly the choice is mostly about GPU headroom:
GroundingDINO_SwinT_OGC(694MB) - the default and the one you'll use 95% of the time. Good accuracy, reasonable memory, and it's what most shared workflows assume.GroundingDINO_SwinB(938MB) - a bigger backbone. Slightly better on small or ambiguous objects, noticeably slower, and it wants more VRAM. For the sort of "find the cat / find the person" prompts this pack is built around, the gain is marginal. Pick SwinB if SwinT keeps missing your target, not as a default.
The GROUNDING_DINO_MODEL output plugs into the grounding_dino_model input on GroundingDinoSAMSegment. There's no other consumer for it in this pack - it's the quiet half of a duo.
What actually happens when it loads
The node downloads two things into ComfyUI/models/grounding-dino/: a config file (GroundingDINO_SwinT_OGC.cfg.py or the SwinB equivalent) and the matching .pth weights. The names have to stay exactly as downloaded, because the loader matches config to weights by filename - rename anything and the whole thing breaks in confusing ways.
Then there's a third, easy-to-miss download: the text encoder. GroundingDINO turns your prompt into vectors with bert-base-uncased, and that comes down through the transformers library on first run into ~/.cache/huggingface/ unless you've placed it in ComfyUI/models/bert-base-uncased/ yourself. If you're on a slow connection, that's a ~440MB surprise on top of the detector. You can pre-download it with the layout the README shows:
# ComfyUI/models/bert-base-uncased/
# config.json, model.safetensors, tokenizer_config.json, tokenizer.json, vocab.txt
Installing
Same pack as all the others in "ComfyUI Segment Anything" - ComfyUI Manager (search the pack title) or:
cd ComfyUI/custom_nodes
git clone https://github.com/un-seen/comfyui_segment_anything_plus
Dependencies are segment-anything, timm, addict, yapf, installed by the pack's install.py. Restart ComfyUI and you're set.
Where people get burned
- First run downloads a lot. ~694MB detector + ~440MB BERT, both auto-fetched. If it stalls, set
HTTP_PROXY/HTTPS_PROXYand retry - the README calls this out explicitly. - You can't skip this node.
GroundingDinoSAMSegmentrequires aGROUNDING_DINO_MODELinput, so this loader is mandatory, not optional, in any workflow that uses this pack. - The detector, not SAM, is usually your speed problem. DINO runs the whole text + image pass before SAM ever sees a box. On a big image expect it to be the laggy step.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| model_name | COMBO | 2 options: GroundingDINO_SwinT_OGC (694MB), GroundingDINO_SwinB (938MB) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| GROUNDING_DINO_MODEL | GROUNDING_DINO_MODEL | — |