Instructions to use mlx-community/Z-Image-Turbo-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/Z-Image-Turbo-bf16 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir Z-Image-Turbo-bf16 mlx-community/Z-Image-Turbo-bf16
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
mlx-community/Z-Image-Turbo-bf16
MLX (bf16) conversion of Tongyi-MAI/Z-Image-Turbo (Apache-2.0) for Apple Silicon — a 6.15B single-stream S3-DiT text-to-image model (Qwen3-4B thinking-template conditioning → single-stream DiT → FLUX.1-dev AE decode). Turbo tier: distilled 8-step at guidance 0 (no CFG), scheduler static shift 3.0 — ~13 s @1024² int4. Note: low seed variance is a model trait.
Standard diffusers-tree snapshot (transformer/ text_encoder/ vae/ tokenizer/ scheduler/) with the
transformer stored at bf16. Loaded by the Swift/MLX port; int8/int4 are produced at load time
(correct resident footprint — a q4 pipeline ≈ 6 GB fits a 16 GB Mac).
Parity (Swift port vs PyTorch goldens, fp32/CPU stream)
- Full 6.15B S3-DiT: cosine ≥0.9999999 (both aligned + padded token cases)
- FLUX.1-dev AE decode: 118 dB · Qwen3-4B encoder: token ids exact, features cosine 1.0000000
- Full pipeline e2e: 105–108 dB (256²/CPU)
Use (Swift / MLXEngine)
import MLXZImage
import MLXToolKit
let package = ZImageTurboT2IPackage(configuration: .turbo(quant: .int4, snapshotPath: "<this repo dir>"))
try await package.load()
let r = try await package.run(T2IRequest(prompt: "a lighthouse at dusk, photorealistic",
width: 1024, height: 1024, seed: 42)) as! T2IResponse
Hardware compatibility
Log In to add your hardware
Quantized
Model tree for mlx-community/Z-Image-Turbo-bf16
Base model
Tongyi-MAI/Z-Image-TurboCollection including mlx-community/Z-Image-Turbo-bf16
Collection
Alibaba Tongyi Z-Image (Apache-2.0) S3-DiT text-to-image, MLX bf16 snapshots for Apple Silicon. Swift port: https://github.com/xocialize/z-image-swift • 2 items • Updated