π§© DinoModel Loader
The half that reads your prompt
- GROUNDING_DINO_MODEL
In a SAM + GroundingDINO pair, SAM gets all the name recognition and GroundingDINO does the actual finding. SDVN DinoModelLoader is the node that brings that text-reading half into your graph: pick a GroundingDINO checkpoint, get a GROUNDING_DINO_MODEL object out, and wire it into SDVN DinoSAMSegment. Without it, SAM has no idea where to look - SAM is a segmentation model, not an object detector, and it needs the boxes GroundingDINO proposes from your words.
The one input: two checkpoints
- GroundingDINO_SwinT_OGC (694MB) - the standard workhorse. This is the checkpoint most GroundingDINO workflows use, and it's the one to start with. OGC stands for the Open-Grounding training regime that lets it handle arbitrary text prompts instead of a fixed class list.
- GroundingDINO_SwinB (938MB) - a beefier Swin-B backbone. A bit more accurate on hard images, a bit slower, a bit fatter. Only reach for it if the smaller one is clearly missing things.
GroundingDINO is quietly everywhere in this space - the community's text-grounded masking work is built on it (the inpainting KB doc calls it out alongside SAM as the standard way to get a mask from a description instead of painting one), and it's the same engine the old sd-webui-segment-anything extension used. It's infrastructure, not a topic: steady background usage, nobody argues about it, it just works.
What the loader does behind the curtain
Three downloads, actually. On first run it pulls the .cfg.py config and the .pth weights into ComfyUI/models/grounding-dino/, and it needs bert-base-uncased as the text encoder - that comes down separately through the transformers library into ~/.cache/huggingface. If you'd rather keep it inside ComfyUI, the README shows the layout: drop the bert files into ComfyUI/models/bert-base-uncased/ (config.json, model.safetensors, tokenizer files) and the loader detects them and uses those instead. That's the fix when the huggingface hub download is slow or blocked, and the README's other answer is proxy env vars (HTTP_PROXY / HTTPS_PROXY) for slow links. All of it happens on first use, silently.
The gotcha that actually bites
The config and weights are matched pairs, and the code loads them by their stock filenames. Don't rename groundingdino_swint_ogc.pth or its config, or you'll get a loader error or a model that doesn't load its weights cleanly. Beyond that there's little to go wrong - one dropdown, one output, no sliders. If segmentation later finds nothing, that's usually the prompt or the threshold/text_threshold inputs on DinoSAMSegment, not this loader.
Wire it once, reuse it everywhere
Like its SAM sibling, the GROUNDING_DINO_MODEL output can fan out to multiple SDVN DinoSAMSegment nodes. One 694MB model, one load, several segment steps - that's the argument for using the modular loader pair over the pack's all-in-one node, and it matters more on the DINO side because a 694MB + 440MB-bert first download is exactly the kind of thing you don't want to repeat.
Install is the pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/StableDiffusionVN/SDVN_Segment_Anything
cd SDVN_Segment_Anything
pip install -r requirements.txt
Restart, let the first run eat a gigabyte or two of downloads, and this node becomes the invisible text-reader behind every mask you pull.
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 | β |