Instructions to use Runware/hunyuan-image with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Runware/hunyuan-image with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="Runware/hunyuan-image", trust_remote_code=True)# pip install -U transformers accelerate # Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("Runware/hunyuan-image", trust_remote_code=True, device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use Runware/hunyuan-image with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "Runware/hunyuan-image" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Runware/hunyuan-image", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/Runware/hunyuan-image
- SGLang
How to use Runware/hunyuan-image 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 "Runware/hunyuan-image" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Runware/hunyuan-image", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "Runware/hunyuan-image" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "Runware/hunyuan-image", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use Runware/hunyuan-image with Docker Model Runner:
docker model run hf.co/Runware/hunyuan-image
Commit History
-
Upload 2 files
Verified signature7b6ea50 -
Delete tokenizer_wrapper.py
Verified signaturec333b3a -
Delete system_prompt.py
Verified signature3417784 -
Delete siglip2.py
Verified signaturef277f76 -
Delete image_processor.py
Verified signatureae0b038 -
Delete hunyuan_image_3_pipeline.py
Verified signaturebfb84fc -
Delete hunyuan.py
Verified signatureb4eb253 -
Delete configuration_hunyuan.py
Verified signaturedeedb2e -
Delete autoencoder_kl_3d.py
Verified signatureb601c17 -
Upload HunyuanImage3ForCausalMM
Verified signatureff68ff6 -
initial commit
Verified signatured1bbb99