Text-to-Image
Diffusers
Safetensors
English
ZImagePipeline
quanto
int8
z-image
transformer-quantization
Instructions to use ixim/Z-Image-INT8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use ixim/Z-Image-INT8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ixim/Z-Image-INT8", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps
- Draw Things
- DiffusionBee
Update README.md
Browse files
README.md
CHANGED
|
@@ -92,7 +92,7 @@ if torch.cuda.is_available():
|
|
| 92 |
elif torch.backends.mps.is_available():
|
| 93 |
# Apple Silicon
|
| 94 |
device = "mps"
|
| 95 |
-
dtype = torch.
|
| 96 |
else:
|
| 97 |
# CPU fallback (functional but very slow for this model)
|
| 98 |
device = "cpu"
|
|
@@ -104,6 +104,8 @@ pipe = ZImagePipeline.from_pretrained(
|
|
| 104 |
low_cpu_mem_usage=True,
|
| 105 |
)
|
| 106 |
|
|
|
|
|
|
|
| 107 |
if device == "cuda":
|
| 108 |
pipe.enable_model_cpu_offload()
|
| 109 |
else:
|
|
|
|
| 92 |
elif torch.backends.mps.is_available():
|
| 93 |
# Apple Silicon
|
| 94 |
device = "mps"
|
| 95 |
+
dtype = torch.bfloat16
|
| 96 |
else:
|
| 97 |
# CPU fallback (functional but very slow for this model)
|
| 98 |
device = "cpu"
|
|
|
|
| 104 |
low_cpu_mem_usage=True,
|
| 105 |
)
|
| 106 |
|
| 107 |
+
pipe.enable_attention_slicing()
|
| 108 |
+
|
| 109 |
if device == "cuda":
|
| 110 |
pipe.enable_model_cpu_offload()
|
| 111 |
else:
|