LocateAnything Model Loader
Loading NVIDIA's LocateAnything-3B
- model
Every LocateAnything workflow starts here, and this node does two jobs: it downloads the NVIDIA LocateAnything-3B checkpoint if you don't have it, then loads it into a runtime the Grounding node can use. The download is the part you'll feel - roughly 7.8 GB the first time, into ComfyUI/models/LocateAnything/nvidia--LocateAnything-3B. Plan for it, go make coffee, come back.
The loader is where the pack's compatibility magic actually lives. NVIDIA's checkpoint is a remote-code model, meaning loading it executes Python files shipped inside the Hugging Face repo (trust_remote_code=True - the node handles that for you). The catch with remote-code models is they're frozen against the transformers version they shipped with, and transformers moves. This node patches the known API mismatches at load time - a Qwen2ForCausalLM weights-key change, an attention-implementation signature shift - so the model keeps loading without you hand-editing files in your HF cache. That's genuinely the difference between this pack working in six months and becoming a GitHub issue graveyard.
Inputs that matter
You can honestly leave most of these alone. The ones a beginner touches:
- model_source - Hugging Face repo ID (
nvidia/LocateAnything-3Bby default) or a local directory if you've already got a snapshot. - download_model - on by default. Disables cleanly if you want to place the files yourself and skip the network.
- device -
auto(uses ComfyUI's device),cuda,cpu, ormps. NVIDIA CUDA is the recommended path; CPU is exposed for compatibility but will be painfully slow for a 3B VL model. - dtype -
autopicks bfloat16/float16 on CUDA and float32 on CPU. Just leave it. - attention -
eager(the default) is the conservative, compatibility-first path;sdpacan be faster but less stable on some setups. If the Grounding node acts up and you see "reload with attention=eager" in the log, this is the knob.
The deeper knobs - use_batch_runtime, runtime_attention, scheduler, group_size, strict_attn - control NVIDIA's optional hybrid batch runtime for multi-frame batches. use_batch_runtime is off by default for good reason: it needs the newer snapshot files (batch_utils/ and kernel_utils/) that aren't always present in a downloaded snapshot, and it depends on optional attention backends like MagiAttention for full speed. Leave it off for your first runs. If you do flip it on and get an import error about batch_utils, the message tells you the fix: update the snapshot or turn it back off.
Output
One output: model, of type LOCATEANYTHING_MODEL. That single wire goes into the model input of LocateAnything Grounding, and optionally through LocateAnything Unload Model at the end.
Install
Search ComfyUI-LocateAnything in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/alisson-anjos/ComfyUI-LocateAnything.git
cd ComfyUI-LocateAnything
pip install -r requirements.txt
Restart ComfyUI, then load the node. The dependencies are reasonable for a VL-model pack - transformers (pinned <5), accelerate, timm, huggingface-hub, numpy, Pillow. Nothing exotic, which is the good news. The heavy lifting is the model download, not the pip install.
Issues and gotchas
- The license. Read it before you run. The LocateAnything-3B checkpoint is under NVIDIA's license - academic and non-commercial research only. The pack's integration code is GPL-3.0. That matters if you have any thought of shipping something.
- Remote code is a trust decision. The node executes Python from the HF repo. That's normal for this class of model, but it's worth knowing what you're agreeing to.
- First load is slow even after the download. A 3B model has to map in; subsequent loads are faster, and the Unload node frees VRAM when you're done.
- trust_remote_code failures or transformer errors on an old snapshot usually mean your local copy is stale -
download_model+ a freshmodel_sourcepull fixes it. - Two runtimes, one decision: if you're doing single-image grounding, the default serial path is right. The batch runtime is a speed optimization for video-frame batches on supported NVIDIA GPUs, and it's strictly optional - the node falls back to serial inference when it's unavailable.
It's not a glamorous node - it's the plumbing. But it's also the part that determines whether this whole pack runs on your machine or eats your afternoon. Set it to defaults, let it download, and go.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| model_source | STRING | nvidia/LocateAnything-3B | Hugging Face repo ID or local snapshot directory. |
| download_model | BOOLEAN | true | Download missing model files into models/LocateAnything. |
| device | COMBO | auto | Execution device. auto uses the device selected by ComfyUI; cuda is recommended when available. |
| dtype | COMBO | auto | Model precision. auto selects bfloat16 or float16 on CUDA and float32 on CPU. |
| attention | COMBO | eager | Eager is the conservative compatibility path. SDPA can be faster but may be less stable on some setups. |
| use_batch_runtime | BOOLEAN | false | Use the official hybrid batch runtime from the model snapshot when available. |
| runtime_attention | COMBO | la_flash | Attention backend for the optional official batch runtime. |
| vision_attention | COMBO | auto | Vision attention backend for the optional official batch runtime. |
| scheduler | COMBO | pipeline | Hybrid batch scheduler used by the official batch runtime. |
| group_size | INT | 00–1024 | Batch runtime hybrid grouping. 0 keeps the upstream default. |
| strict_attn | BOOLEAN | false | Require the configured batch attention backend instead of allowing runtime fallback. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | LOCATEANYTHING_MODEL | Loaded LocateAnything runtime shared with grounding nodes. |