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
- Local Apps
- Draw Things
- DiffusionBee
fix: typo on import line (#7)
Browse files- fix: typo on import line (7678e425cf3fa111fb254ef93d29f20b522ae5a9)
Co-authored-by: Alexandre Girard <alxgirard@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -95,7 +95,7 @@ pip install git+https://github.com/huggingface/diffusers
|
|
| 95 |
|
| 96 |
```python
|
| 97 |
import torch
|
| 98 |
-
from diffusers import ZImagePipeline
|
| 99 |
|
| 100 |
# 1. Load the pipeline
|
| 101 |
# Use bfloat16 for optimal performance on supported GPUs
|
|
|
|
| 95 |
|
| 96 |
```python
|
| 97 |
import torch
|
| 98 |
+
from diffusers import ZImagePipeline
|
| 99 |
|
| 100 |
# 1. Load the pipeline
|
| 101 |
# Use bfloat16 for optimal performance on supported GPUs
|