Image-Text-to-Text
Transformers
Safetensors
English
qwen3_5
chart
infographic
scene-graph
image2scenegraph
conversational
Instructions to use ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph") 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)# Load model directly from transformers import AutoProcessor, AutoModelForMultimodalLM processor = AutoProcessor.from_pretrained("ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph") model = AutoModelForMultimodalLM.from_pretrained("ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph", device_map="auto") 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?"} ] }, ] inputs = processor.apply_chat_template( messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors="pt", ).to(model.device) outputs = model.generate(**inputs, max_new_tokens=40) print(processor.decode(outputs[0][inputs["input_ids"].shape[-1]:])) - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph", "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/ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph
- SGLang
How to use ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph 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 "ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph" \ --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": "ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph", "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 "ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph" \ --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": "ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph", "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 ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph with Docker Model Runner:
docker model run hf.co/ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph
Download inference_spec.json from ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph: direct link, hf CLI and curl.
- Browser
- Download file 1.6 kB
-
https://huggingface.co/ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph/resolve/main/inference_spec.json
- Command line
-
hf download hf://ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph/inference_spec.json
-
curl -L -o inference_spec.json https://huggingface.co/ChartGalaxyPP/ChartGalaxyPlusPlus-Image2SceneGraph/resolve/main/inference_spec.json
1.6 kB
| { | |
| "system_prompt": "You produce a complete structured design description from an image. Return only valid JSON in the requested full schema.", | |
| "user_prompt": "Generate the complete JSON containing high_level_description, style_description, elements.background, and elements.layout. Every layout item must contain type, label, parent, bbox in xyxy_1000 coordinates, and desc. When exact visible text is available for an item of type \"text\", include it in the text field. Also include style_description.color_palette and preserve the full annotation schema: layout items include node_kind, color_palette, and role or role_family when applicable. The type value is the group_type or element_type of the node. Use null for unavailable style descriptions and [] for empty color palettes.", | |
| "enable_thinking": false, | |
| "max_model_len": 32768, | |
| "max_new_tokens": 20000, | |
| "max_pixels": 2359296, | |
| "gpu_memory_utilization": 0.82, | |
| "seed": 42, | |
| "temperature": 0.0, | |
| "top_p": 1.0, | |
| "top_k": 0, | |
| "repetition_penalty": 1.0, | |
| "frequency_penalty": 0.0, | |
| "dtype": "bfloat16", | |
| "tensor_parallel_size": 1, | |
| "max_num_seqs": 1, | |
| "gdn_prefill_backend": "triton", | |
| "compilation_config": { | |
| "mode": 0, | |
| "cudagraph_mode": 2, | |
| "cudagraph_capture_sizes": [ | |
| 128, | |
| 192, | |
| 256 | |
| ] | |
| }, | |
| "environment": { | |
| "VLLM_USE_DEEP_GEMM": "0", | |
| "VLLM_MOE_USE_DEEP_GEMM": "0", | |
| "VLLM_USE_FLASHINFER_SAMPLER": "0" | |
| }, | |
| "upstream_validated_runtime": { | |
| "python": "3.11", | |
| "vllm": "0.20.2" | |
| }, | |
| "output_bbox_format": "xyxy_1000", | |
| "output_nodes_path": "elements.layout" | |
| } | |