Instructions to use Tongyi-MAI/Z-Image with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Tongyi-MAI/Z-Image 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", 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
- Local Apps
- Draw Things
- DiffusionBee
Regarding computer configuration
What computer configuration is needed to run this? How much video memory is required?20gb? 24gb?
I might not have the exact official numbers, but from what people are seeing so far, Z-Image Base needs a LOT of VRAM if you want to run the full model.
The full, unquantized model really wants around 24GB of VRAM or more to run comfortably.
20GB can work, but it’s tight and you may have to lower resolution or batch size.
If your GPU can’t handle the full model, you still have good options:
Use a GGUF / quantized version of the Base model
Q8 needs around 16–20GB VRAM
Q6 needs around 12–16GB VRAM
Q4 can run in 8–12GB VRAM (some quality loss)
Or just use Z-Image Turbo, which is made to run on lower VRAM cards (12–16GB) and is much easier to handle.
So if the full Base model won’t load, switch to a quantized GGUF version or Turbo instead of giving up. the turbo model is really really good i use it the most
thank you