Z Image Turbo

提供商Tongyi-MAI
分类text-to-image
许可证apache-2.0
下载量758.3K
星标2.4K

简介

Z Image Turbo 是由阿里通义团队推出的高性能文本生成图像模型。它主打“快”与“准”,通过优化推理效率,在保证画面质量的同时极大地缩短了出图时间,非常适合需要快速迭代视觉方案的开发者和设计师。该模型对中文语义理解到位,能精准还原复杂的提示词细节,上手门槛低,无需复杂的参数调优即可获得商用级别的图像效果,是目前追求生产力效率的理想之选。

核心亮点

  • 极速出图,大幅提升视觉创作迭代效率
  • 深度优化中文语义,精准理解复杂指令
  • 画质细腻且稳定,满足多种商用场景
  • Apache-2.0 协议,部署与集成更加灵活

使用方法

安装依赖
# 安装 Hugging Face transformers
pip install transformers torch
SDK 使用
# 使用 transformers 加载模型
from transformers import AutoModel, AutoTokenizer

model = AutoModel.from_pretrained("Tongyi-MAI/Z-Image-Turbo")
tokenizer = AutoTokenizer.from_pretrained("Tongyi-MAI/Z-Image-Turbo")

Hugging Face 下载

我们推荐使用命令行或者 Hugging Face Hub SDK 来进行模型的下载。

操作指引:在下载前,请先通过如下命令安装 huggingface_hub:

操作指引
pip install -U huggingface_hub

命令行下载

下载完整模型库

下载完整模型库
huggingface-cli download Tongyi-MAI/Z-Image-Turbo

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)

下载单个文件到指定本地文件夹(以下载 config.json 到当前路径下 ./dir 目录为例)
huggingface-cli download Tongyi-MAI/Z-Image-Turbo config.json --local-dir ./dir

更多命令行下载选项,可参见官方文档

SDK 下载

SDK 下载
# 模型下载
from huggingface_hub import snapshot_download
model_dir = snapshot_download('Tongyi-MAI/Z-Image-Turbo')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://huggingface.co/Tongyi-MAI/Z-Image-Turbo

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://huggingface.co/Tongyi-MAI/Z-Image-Turbo

模型文件托管在 Hugging Face Hub,使用 HF CLI / SDK / Git 直接下载,不经过本站。

PyTorch / Transformers 使用

安装 Transformers

安装 Transformers
pip install -U transformers torch

模型加载和推理

模型加载和推理
from transformers import AutoModelForCausalLM, AutoTokenizer

model = AutoModelForCausalLM.from_pretrained('Tongyi-MAI/Z-Image-Turbo')
tokenizer = AutoTokenizer.from_pretrained('Tongyi-MAI/Z-Image-Turbo')

模型下载

我们推荐使用命令行或者 ModelScope SDK 来进行模型的下载。

操作指引:在下载前,请先通过如下命令安装 ModelScope:

操作指引
pip install modelscope

命令行下载

下载完整模型库

下载完整模型库
modelscope download --model Tongyi-MAI/Z-Image-Turbo

下载单个文件到指定本地文件夹(以下载 README.md 到当前路径下 dir 目录为例)

下载单个文件到指定本地文件夹(以下载 README.md 到当前路径下 dir 目录为例)
modelscope download --model Tongyi-MAI/Z-Image-Turbo README.md --local_dir ./dir

更多更丰富的命令行下载选项,可参见具体文档

SDK 下载

SDK 下载
# 模型下载
from modelscope import snapshot_download
model_dir = snapshot_download('Tongyi-MAI/Z-Image-Turbo')

Git 下载

请确保 lfs 已经被正确安装

Git 下载
git lfs install
git clone https://www.modelscope.cn/Tongyi-MAI/Z-Image-Turbo.git

如果您希望跳过 lfs 大文件下载,可以使用如下命令

跳过 LFS
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/Tongyi-MAI/Z-Image-Turbo.git

ModelScope 模型页直接下载模型文件;无需将模型文件放在本站服务器。

Notebook 快速开发

下载并安装 ModelScope library

下载并安装 ModelScope library
pip install "modelscope[audio,cv,nlp,multi-modal,science]" -f https://modelscope.oss-cn-beijing.aliyuncs.com/releases/repo.html

模型加载和推理

模型加载和推理
from modelscope.pipelines import pipeline
from modelscope.utils.constant import Tasks

p = pipeline('text-generation', 'Tongyi-MAI/Z-Image-Turbo')

完整文档

来源: HuggingFace

---
license: apache-2.0
language:

  • en

pipeline_tag: text-to-image
library_name: diffusers
---

<h1 align="center">⚡️- Image<br><sub><sup>An Efficient Image Generation Foundation Model with Single-Stream Diffusion Transformer</sup></sub></h1>

<div align="center">

![Official Site](https://tongyi-mai.github.io/Z-Image-blog/)&#160;
![GitHub](https://github.com/Tongyi-MAI/Z-Image)&#160;
![Hugging Face](https://huggingface.co/Tongyi-MAI/Z-Image-Turbo)&#160;
![Hugging Face](https://huggingface.co/spaces/Tongyi-MAI/Z-Image-Turbo)&#160;
![Hugging Face](https://huggingface.co/spaces/akhaliq/Z-Image-Turbo)&#160;
![ModelScope Model](https://www.modelscope.cn/models/Tongyi-MAI/Z-Image-Turbo)&#160;
![ModelScope Space](https://www.modelscope.cn/aigc/imageGeneration?tab=advanced&versionId=469191&modelType=Checkpoint&sdVersion=Z_IMAGE_TURBO&modelUrl=modelscope%3A%2F%2FTongyi-MAI%2FZ-Image-Turbo%3Frevision%3Dmaster)&#160;
![Art Gallery PDF](assets/Z-Image-Gallery.pdf)&#160;
![Web Art Gallery](https://modelscope.cn/studios/Tongyi-MAI/Z-Image-Gallery/summary)&#160;
<a href="https://arxiv.org/abs/2511.22699" target="_blank"><img src="https://img.shields.io/badge/Report-b5212f.svg?logo=arxiv" height="21px"></a>

Welcome to the official repository for the Z-Image(造相)project!

</div>

✨ Z-Image

Z-Image is a powerful and highly efficient image generation model family with 6B parameters. Currently there are four variants:

  • 🚀 Z-Image-Turbo – A distilled version of Z-Image that matches or exceeds leading competitors with only 8 NFEs (Number of Function Evaluations). It offers ⚡️sub-second inference latency⚡️ on enterprise-grade H800 GPUs and fits comfortably within 16G VRAM consumer devices. It excels in photorealistic image generation, bilingual text rendering (English & Chinese), and robust instruction adherence.
  • 🎨 Z-Image – The foundation model behind Z-Image-Turbo. Z-Image focuses on high-quality generation, rich aesthetics, strong diversity, and controllability, well-suited for creative generation, fine-tuning, and downstream development. It supports a wide range of artistic styles, effective negative prompting, and high diversity across identities, poses, compositions, and layouts.
  • 🧱 Z-Image-Omni-Base – The versatile foundation model capable of both generation and editing tasks. By releasing this checkpoint, we aim to unlock the full potential for community-driven fine-tuning and custom development, providing the most "raw" and diverse starting point for the open-source community.
  • ✍️ Z-Image-Edit – A variant fine-tuned on Z-Image specifically for image editing tasks. It supports creative image-to-image generation with impressive instruction-following capabilities, allowing for precise edits based on natural language prompts.

📥 Model Zoo

| Model | Pre-Training | SFT | RL | Step | CFG | Task | Visual Quality | Diversity | Fine-Tunability | Hugging Face | ModelScope |
| :--- | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: | :---: |
| Z-Image-Omni-Base | ✅ | ❌ | ❌ | 50 | ✅ | Gen. / Editing | Medium | High | Easy | *To be released* | *To be released* |
| Z-Image | ✅ | ✅ | ❌ | 50 | ✅ | Gen. | High | Medium | Easy | ![Hugging Face](https://huggingface.co/Tongyi-MAI/Z-Image) <br> ![Hugging Face Space](https://huggingface.co/spaces/Tongyi-MAI/Z-Image) | ![ModelScope Model](https://www.modelscope.cn/models/Tongyi-MAI/Z-Image) <br> ![ModelScope Space](https://www.modelscope.cn/aigc/imageGeneration?tab=advanced&versionId=569345&modelType=Checkpoint&sdVersion=Z_IMAGE&modelUrl=modelscope%3A%2F%2FTongyi-MAI%2FZ-Image%3Frevision%3Dmaster) |
| Z-Image-Turbo | ✅ | ✅ | ✅ | 8 | ❌ | Gen. | Very High | Low | N/A | ![Hugging Face](https://huggingface.co/Tongyi-MAI/Z-Image-Turbo) <br> ![Hugging Face Space](https://huggingface.co/spaces/Tongyi-MAI/Z-Image-Turbo) | ![ModelScope Model](https://www.modelscope.cn/models/Tongyi-MAI/Z-Image-Turbo) <br> ![ModelScope Space](https://www.modelscope.cn/aigc/imageGeneration?tab=advanced&versionId=469191&modelType=Checkpoint&sdVersion=Z_IMAGE_TURBO&modelUrl=modelscope%3A%2F%2FTongyi-MAI%2FZ-Image-Turbo%3Frevision%3Dmaster) |
| Z-Image-Edit | ✅ | ✅ | ❌ | 50 | ✅ | Editing | High | Medium | Easy | *To be released* | *To be released* | | *To be released* |

🖼️ Showcase

📸 Photorealistic Quality: Z-Image-Turbo delivers strong photorealistic image generation while maintaining excellent aesthetic quality.

!Showcase of Z-Image on Photo-realistic image Generation

📖 Accurate Bilingual Text Rendering: Z-Image-Turbo excels at accurately rendering complex Chinese and English text.

!Showcase of Z-Image on Bilingual Text Rendering

💡 Prompt Enhancing & Reasoning: Prompt Enhancer empowers the model with reasoning capabilities, enabling it to transcend surface-level descriptions and tap into underlying world knowledge.

!reasoning.jpg

🧠 Creative Image Editing: Z-Image-Edit shows a strong understanding of bilingual editing instructions, enabling imaginative and flexible image transformations.

!Showcase of Z-Image-Edit on Image Editing

🏗️ Model Architecture

We adopt a Scalable Single-Stream DiT (S3-DiT) architecture. In this setup, text, visual semantic tokens, and image VAE tokens are concatenated at the sequence level to serve as a unified input stream, maximizing parameter efficiency compared to dual-stream approaches.

!Architecture of Z-Image and Z-Image-Edit

📈 Performance

According to the Elo-based Human Preference Evaluation (on *Alibaba AI Arena*), Z-Image-Turbo shows highly competitive performance against other leading models, while achieving state-of-the-art results among open-source models.

<p ali