Views
No views yet





| Aspect | Z-Image | Z-Image-Turbo |
|---|---|---|
| CFG | ✅ | ❌ |
| Steps | 28~50 | 8 |
| Fintunablity | ✅ | ❌ |
| Negative Prompting | ✅ | ❌ |
| Diversity | High | Low |
| Visual Quality | High | Very High |
| RL | ❌ | ✅ |
pip install git+https://github.com/huggingface/diffusers1pip install -U huggingface_hub
2HF_XET_HIGH_PERFORMANCE=1 hf download Tongyi-MAI/Z-Image1import torch
2from diffusers import ZImagePipeline
3
4# Load the pipeline
5pipe = ZImagePipeline.from_pretrained(
6 "Tongyi-MAI/Z-Image",
7 torch_dtype=torch.bfloat16,
8 low_cpu_mem_usage=False,
9)
10pipe.to("cuda")
11
12# Generate image
13prompt = "两名年轻亚裔女性紧密站在一起,背景为朴素的灰色纹理墙面,可能是室内地毯地面。左侧女性留着长卷发,身穿藏青色毛衣,左袖有奶油色褶皱装饰,内搭白色立领衬衫,下身白色裤子;佩戴小巧金色耳钉,双臂交叉于背后。右侧女性留直肩长发,身穿奶油色卫衣,胸前印有“Tun the tables”字样,下方为“New ideas”,搭配白色裤子;佩戴银色小环耳环,双臂交叉于胸前。两人均面带微笑直视镜头。照片,自然光照明,柔和阴影,以藏青、奶油白为主的中性色调,休闲时尚摄影,中等景深,面部和上半身对焦清晰,姿态放松,表情友好,室内环境,地毯地面,纯色背景。"
14negative_prompt = "" # Optional, but would be powerful when you want to remove some unwanted content
15
16image = pipe(
17 prompt=prompt,
18 negative_prompt=negative_prompt,
19 height=1280,
20 width=720,
21 cfg_normalization=False,
22 num_inference_steps=50,
23 guidance_scale=4,
24 generator=torch.Generator("cuda").manual_seed(42),
25).images[0]
26
27image.save("example.png")1@article{team2025zimage,
2 title={Z-Image: An Efficient Image Generation Foundation Model with Single-Stream Diffusion Transformer},
3 author={Z-Image Team},
4 journal={arXiv preprint arXiv:2511.22699},
5 year={2025}
6}