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
Commit History
Yesterday
-
Fix Chinese emphasis rendering in the model overview (#12)
- Fix Chinese emphasis rendering in the model overview (64aa66c726bf57536033f048a514ded82a9df4ab) Co-authored-by: Qize Yu <Skywalker0410@users.noreply.huggingface.co>bce44c7 -
Harmonize the paper link and live upvote badge (#11)
- Harmonize the paper link and live upvote badge (cb51cb5d4e78547abaf13b75e5a07a87e63481f5) Co-authored-by: Qize Yu <Skywalker0410@users.noreply.huggingface.co>eb13709 -
Update model links, paper badges, and release news (#10)
- Update model links, paper badges, and release news (5dfc464ad30684a1338f962f5a4e33b4b189b7c4) Co-authored-by: Qize Yu <Skywalker0410@users.noreply.huggingface.co>1acaec6 -
Add ModelScope weights and release news (#9)
- Add ModelScope weights and release news (0daaeaddbe84429dbb578f00c26cd9129224d350) Co-authored-by: Qize Yu <Skywalker0410@users.noreply.huggingface.co>f9dcf33
11 days ago
-
Add Chinese model card and language navigation (#8)
- Add Chinese model card and language navigation (9ab922c992372dee77dede047f9ca1e9ce027155) Co-authored-by: Qize Yu <Skywalker0410@users.noreply.huggingface.co>e44e8f1 -
Add October 4 project webpage release to model card (#7)
- Add October 4 project webpage release to model card (5a659266ebfb1c1858ca9f36744e9df3126be5c5) Co-authored-by: Qize Yu <Skywalker0410@users.noreply.huggingface.co>27d5f1e
12 days ago
-
Add October 3 GitHub code release to model card (#6)
- Add October 3 GitHub code release to model card (b719b92f15aae851532a2157322075a088454e81) Co-authored-by: Qize Yu <Skywalker0410@users.noreply.huggingface.co>216da73 -
Replace teaser with updated ICLR artwork (#5)
- Replace teaser with updated ICLR artwork (50e7b1cf10f2a34b66b140df74a8eeb531ea6834) - Point model card to the new teaser (c968bb552b913d2785c4f0e6ae20a629f0e3e7c8) - Respect PDF crop box to remove teaser white margins (d926c66e5f0be4cad6f263fbef5cbcbe98102a42) - Remove teaser spacing and pin tightly cropped artwork (87a397a09b02a43e8eb60267d288e51c8eea010d) Co-authored-by: Qize Yu <Skywalker0410@users.noreply.huggingface.co>d1819bb -
Update main demo video and prepared cover (#4)
- Update main demo video and prepared cover (20fda7044a5850df0c773831bd3b94ce9cf1b127) - Publish demo and project links, revised citations, and simplified quick links (49d50056a8088fa62855805ec6e107165f30823b) Co-authored-by: Qize Yu <Skywalker0410@users.noreply.huggingface.co>3a691af
13 days ago
-
Keep inline title logos compact without image margins (#3)
- Keep inline title logos compact without image margins (373677f0989e03f61263ac96fe5ac915f9b2fe39) Co-authored-by: Qize Yu <Skywalker0410@users.noreply.huggingface.co>8d7db02 -
Simplify model card layout and evaluation; clarify license scope (#2)
- Simplify model card layout and evaluation; clarify license scope (9fcbd5896742ab3fdac42d97c1db0902064e1e6d) Co-authored-by: Qize Yu <Skywalker0410@users.noreply.huggingface.co>a09c563 -
Publish model weights, paper figures, and complete model card (#1)
- Add model card title and related repository links (b44d8144920b89be341dcf9d592947f696ad9bb8) - Upload model files with empty README (ba4cb9a56590b15e2ef94e2b3d84be1ec6e39b0b) - Add paper figures, logos, and updated demonstration videos (e52f61cdfc1539e03d5ca4b3d38a073ba135ac2e) - Preserve original embedded demo cover (0f8e30894c3ca86378d01ae51ec69c217c78151b) - Document architecture, inference, evaluation, and paper results (f879290cf53cb4eba3e083d77c0f68c0fa9801c3) - Document architecture, inference, evaluation, and paper results (252a2efc380197280edd921dc6b240102dd50b6c) - Align model card and license metadata with retained Kimi K3 terms (74c5d461c0f59852b0c04ead2d4508078c83bbab) Co-authored-by: Qize Yu <Skywalker0410@users.noreply.huggingface.co>37f388f
15 days ago
-
initial commit
Verified signatureea1a104