Image-Text-to-Text
Transformers
Safetensors
English
Chinese
groundinganything
text-generation
visual-grounding
object-detection
referring-expression-comprehension
pointing
ocr
document-layout
custom-code
diffusion-language-model
conversational
custom_code
Instructions to use GroundingPI/GroundAnything with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GroundingPI/GroundAnything with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="GroundingPI/GroundAnything", trust_remote_code=True) messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("GroundingPI/GroundAnything", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use GroundingPI/GroundAnything with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GroundingPI/GroundAnything" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GroundingPI/GroundAnything", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/GroundingPI/GroundAnything
- SGLang
How to use GroundingPI/GroundAnything with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "GroundingPI/GroundAnything" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GroundingPI/GroundAnything", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "GroundingPI/GroundAnything" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GroundingPI/GroundAnything", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use GroundingPI/GroundAnything with Docker Model Runner:
docker model run hf.co/GroundingPI/GroundAnything
Download checksums.sha256 from GroundingPI/GroundAnything: direct link, hf CLI and curl.
- Browser
- Download file 2.36 kB
-
https://huggingface.co/GroundingPI/GroundAnything/resolve/main/checksums.sha256
- Command line
-
hf download hf://GroundingPI/GroundAnything/checksums.sha256
-
curl -L -o checksums.sha256 https://huggingface.co/GroundingPI/GroundAnything/resolve/main/checksums.sha256
2.36 kB
| c419c191a33774f4e1f834b3fb36033dc84e8ba316a3d1935eed1fa529884a74 LICENSE | |
| 3189f325228af1f532159028f03b81c1ad871e163e47737a9e70e1d68ed3772d README.md | |
| 669bb095cca2e86ddc821926f4c3b42dd7389f2ad3ec49c8edca8fe6294aae7f added_tokens.json | |
| a0bc6f6fc7a29a80017a433e8f03a1cc1236e838a944a2d034295a60c4f2fddb chat_template.jinja | |
| 22c369e2bdac19723fe7db7e4c64b224462744b1f1aae7bd5daf05307db3b9fd config.json | |
| 7ad33532c846fdd81dd41a6ba54db54e3c47cada50472d732ba91eaede725323 configuration_groundinganything.py | |
| 6b255ff08426effe581833b3809bf2232cac9eb93d1e5cf83fff76ce62791e38 configuration_groundinganything_vision.py | |
| 42e0cb3d5a6a9e5c93c20555739f1038753ba1adb139c5c82a3a9f3b39ed5eab generation_config.json | |
| 33cb222671104ec4f0d3d234a3db7561b94d11543089d5f250c14a2f1b8651c3 image_processing_groundinganything.py | |
| 78403540328f9847d6b7ebc5c44eb2e6a752863de0afb7d0710728bb161dc60d media_utils.py | |
| 8831e4f1a044471340f7c0a83d7bd71306a5b867e95fd870f74d0c5308a904d5 merges.txt | |
| 3cf09355cde8cf4877cdc76e0a72301d572c1d6263b2831f8a03368285bb65e2 model.safetensors | |
| 86ba0522e32bcf5d512f8e7dcc529abd22a39f10d55fa8327efcb65cbd758a67 modeling_groundinganything.py | |
| a839e10631620ae5fe70ec3aa9d009af521f7ea03faa66b32adce287105003be modeling_groundinganything_vision.py | |
| 11ddb518de0bcafe3f46f49310887bf7424b4f533d300c5f4749052c9d6465d1 preprocessor_config.json | |
| 90e533272ff79d068ce922e9156e5d83f3cf2cc9e565af37b135c09e9fe57b81 processing_groundinganything.py | |
| 534931ef99997dec0735da46a570a45696cfee6dace291cc9fa9a2da24420685 requirements.txt | |
| d948513463b339ae85d6be6c99ecee787cc9c7a96be09180aa521a32a216eff4 special_tokens_map.json | |
| 5d9a9d7525aeecc0360ffd43f891ce9d2220297df5092a293a98e2fd31e9d99d streammind_gate.py | |
| 7e0398aca93659140fd6345deb335db2330dee89a2aad1228d8604c1952f6dc8 tokenizer.json | |
| 2aa39a017b159c2ac86edb3baf6a78a77549fc7b26ea3cee9c37128b31fec589 tokenizer_config.json | |
| ca10d7e9fb3ed18575dd1e277a2579c16d108e32f27439684afa0e10b1440910 vocab.json | |
| cfc7749b96f63bd31c3c42b5c471bf756814053e847c10f3eb003417bc523d30 LICENSE-Apache-2.0 | |
| 20c797ce19af0c17de52c6afb144644768a591c521655f5ebf5712c9850f2887 LICENSE-Kimi-K3 | |
| cddaec9f528f9ebf5ac627850eefcb3f14ee55e168776a1b650f91353ce8293e assets/demo.mp4 | |
| 3c282238bb1598093c078e57dcc1db4b3ce8fb1f39db6c09ca90e0686f1043a2 assets/demo-poster.jpg | |
| e0f0bbfa420324807403cfffe5ce664a33675c4e569de71b82cac7fb3b750f3e assets/fig1-teaser.png | |