Team Ai
Modelpublic

andrevp/Z-Image-Turbo-MLX

sourceHugging Faceapache-2.0updated 7mo agoView on Hugging Face
0likes
Model Card

Z-Image-Turbo — MLX (Full Precision (float16))

MLX conversion of Tongyi-MAI/Z-Image-Turbo for Apple Silicon.

This is the full-precision float16 MLX conversion.

Model size: 20.54 GB

All Available MLX Variants

VariantSizeQuantizationLink
Full Precision (fp16)20.54 GBNoneandrevp/Z-Image-Turbo-MLX
8-bit11.37 GB8-bit, group_size=64andrevp/Z-Image-Turbo-MLX-8bit
4-bit6.48 GB4-bit, group_size=64andrevp/Z-Image-Turbo-MLX-4bit
2-bit4.04 GB2-bit, group_size=64andrevp/Z-Image-Turbo-MLX-2bit

About Z-Image-Turbo

Z-Image is an efficient 6B-parameter image generation foundation model using a Scalable Single-Stream Diffusion Transformer (S3-DiT) architecture. Z-Image-Turbo is the distilled variant with only 8 NFEs (Number of Function Evaluations), achieving sub-second inference latency.

Key Features

  • —Photorealistic image generation with state-of-the-art quality
  • —Bilingual text rendering (English & Chinese)
  • —Strong instruction adherence
  • —8-step inference — distilled via Decoupled-DMD + Reinforcement Learning (DMDR)
  • —No CFG required — guidance_scale=0.0

Architecture

ComponentArchitectureParameters
Text EncoderQwen3 (36 layers, hidden_size=2560, GQA with 32/8 heads)~7.8 GB (fp16)
TransformerZImageTransformer2DModel (30 layers, dim=3840, 30 heads)~12.3 GB (fp16)
VAEAutoencoderKL (from Flux, 16 latent channels)~160 MB (fp16)
TokenizerQwen2Tokenizer (vocab_size=151,936)—
SchedulerFlowMatchEulerDiscreteScheduler—

The S3-DiT architecture concatenates text tokens, visual semantic tokens, and image VAE tokens at the sequence level as a unified input stream, maximizing parameter efficiency compared to dual-stream approaches.

Component Sizes

ComponentOriginal (bf16)This Variant (Full Precision (float16))
Text Encoder7.8 GB~8.0 GB
Transformer24.6 GB~12.3 GB
VAE160 MB160 MB
Total~32.6 GB20.54 GB

Original Model

Original Usage (PyTorch/CUDA)

python
import torch
from diffusers import ZImagePipeline

pipe = ZImagePipeline.from_pretrained(
    "Tongyi-MAI/Z-Image-Turbo",
    torch_dtype=torch.bfloat16,
)
pipe.to("cuda")

prompt = "Young Chinese woman in red Hanfu, intricate embroidery, ancient temple backdrop"

image = pipe(
    prompt=prompt,
    height=1024,
    width=1024,
    num_inference_steps=9,   # Results in 8 DiT forwards
    guidance_scale=0.0,      # No CFG for Turbo models
    generator=torch.Generator("cuda").manual_seed(42),
).images[0]

image.save("example.png")

Conversion Details

  • —Converted using MLX {0.30.6} on Apple Silicon
  • —Weights converted from bfloat16 to float16
  • —SafeTensors format (MLX-compatible)
  • —All weight keys preserved and verified
  • —VAE kept at float16 across all quantization levels
  • —Verified: no NaN/Inf values, all shapes consistent, all index files valid

Citation

bibtex
@article{z-image2025,
    title={Z-Image: An Efficient Image Generation Foundation Model with Scalable Single Stream Diffusion Transformer},
    author={Tongyi MAI Team},
    journal={arXiv preprint arXiv:2511.22699},
    year={2025}
}

@article{decoupled-dmd2025,
    title={Decoupled Consistency Model Distillation},
    author={Liu et al.},
    journal={arXiv preprint arXiv:2511.22677},
    year={2025}
}

@article{dmdr2025,
    title={DMDR: Fusing DMD with Reinforcement Learning},
    author={Jiang et al.},
    journal={arXiv preprint arXiv:2511.13649},
    year={2025}
}