HunyuanDiT-v1.2
Tencent Hunyuan's open-weight 1.5B bilingual Diffusion Transformer for text-to-image synthesis, offering fine-grained Chinese and English prompt comprehension, flexible multi-resolution framing, and multi-turn conversational refinement.
What you can do
- Chinese cultural aesthetic illustration
- Bilingual marketing poster design
- Multi-turn iterative image refinement
Input & output
- Input
- Chinese or English text prompts, including Chinese idioms, poetic descriptions, or multi-turn modification instructions.
- Output
- Multi-resolution RGB images (such as 1024×1024 or 1280×768) in PNG/JPEG format.
Try a prompt like this
国风工笔重彩插画,江南雨夜的青石板古巷,两侧悬挂暖黄色纸灯笼,一位撑油纸伞的少女驻足回眸,水面细腻倒影,构图考究。
Things to know
Requires ~11–16GB VRAM with Diffusers pipeline (add extra VRAM if enabling the optional multi-turn dialogue MLLM refiner); governed by Tencent Hunyuan Community License.
All listed models publish open weights for self-hosted deployment; check each repository's license before commercial use.
Call it through the API
The platform exposes an OpenAI-compatible API. Use an official SDK or any HTTP client, then set the gateway URL, API key, and model ID.
- Endpoint
POST/v1/images/generations- Model repo ID
Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers
import os
from openai import OpenAI
client = OpenAI(
base_url=os.environ["API_BASE_URL"],
api_key=os.environ["API_KEY"],
)
result = client.images.generate(
model="Tencent-Hunyuan/HunyuanDiT-v1.2-Diffusers",
prompt="国风工笔重彩插画,江南雨夜的青石板古巷,两侧悬挂暖黄色纸灯笼,一位撑油纸伞的少女驻足回眸,水面细腻倒影,构图考究。",
size="1024x1024",
)
print(result.data[0].url)Before running a sample, set the API_BASE_URL (gateway URL) and API_KEY environment variables.
Read the full API guide