Instructions to use Tongyi-MAI/Z-Image-Turbo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Tongyi-MAI/Z-Image-Turbo with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Tongyi-MAI/Z-Image-Turbo", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Inference
- Notebooks
- Google Colab
- Kaggle
- AMD Developer Cloud
- Local Apps Settings
- Draw Things
- DiffusionBee
Run Z-Image-Turbo (11B DiT) in <1GB VRAM via PhobosStream
#167
by martianacdemy - opened
Hi everyone,
Z-Image-Turbo is an incredible single-stream Diffusion Transformer, but standard 1024x1024 loading requires ~23.5 GB VRAM when combined with the 7.5GB Qwen text encoder and attention buffers.
We open-sourced PhobosStream and ComfyUI-PhobosStream to stream DiT weights block-by-block directly from NVMe SSD on consumer hardware:
π GitHub: https://github.com/martianacademy/phobos-stream
π¨ ComfyUI Custom Node: https://github.com/martianacademy/ComfyUI-PhobosStream
Benchmark on Apple Silicon Metal GPU:
- Pure sampling latency: 4.79s / step (8 steps = 38.33s @ 1024x1024 resolution)
- Peak memory footprint: ~920 MB (down from ~23.5 GB monolithic baseline)
- Enables running Z-Image-Turbo on 8GB/12GB RTX GPUs and 16GB Macs without OOM crashes.
Feedback and PRs welcome!