Instructions to use CuTIsolation/Z-Image-Turbo-W4A8 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use CuTIsolation/Z-Image-Turbo-W4A8 with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("CuTIsolation/Z-Image-Turbo-W4A8", 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 Settings
- Draw Things
- DiffusionBee
| license: apache-2.0 | |
| base_model: | |
| - Tongyi-MAI/Z-Image-Turbo | |
| pipeline_tag: text-to-image | |
| library_name: diffusers | |
| tags: | |
| - comfyui | |
| - w4a8 | |
| # Z-Image-Turbo W4A8 | |
| W4A8 (4-bit weight, 8-bit activation) quantized weights for | |
| [Z-Image-Turbo](https://huggingface.co/Tongyi-MAI/Z-Image-Turbo), made for | |
| [ComfyUI](https://github.com/comfyanonymous/ComfyUI) using ComfyUI's native | |
| `asym_w4a8_int8` quantized-diffusion format (Comfy Kitchen). | |
| Both the diffusion model and the Qwen3-4B text encoder are quantized, so the | |
| whole pipeline fits in low VRAM. | |
| ## Files | |
| | File | Size | Notes | | |
| | --- | --- | --- | | |
| | `z_image_turbo_w4a8.safetensors` | 3.5 GB | Diffusion model, `asym_w4a8_int8`, group_size 16 + ConvRot | | |
| | `qwen_3_4b_w4a8.safetensors` | 2.8 GB | Qwen3-4B text encoder, `asym_w4a8_int8`, group_size 16 + ConvRot | | |
| Original BF16 sizes: diffusion 12.3 GB, text encoder 8.0 GB. | |
| ## Usage (ComfyUI) | |
| Place the files in your ComfyUI `models` directory: | |
| ``` | |
| ComfyUI/ | |
| βββ models/ | |
| β βββ diffusion_models/ | |
| β β βββ z_image_turbo_w4a8.safetensors | |
| β βββ text_encoders/ | |
| β β βββ qwen_3_4b_w4a8.safetensors | |
| β βββ vae/ | |
| β βββ flux1-vae.safetensors | |
| ``` | |
| Then use the standard Z-Image-Turbo text-to-image workflow with a `Load Diffusion | |
| Model` node pointed at `z_image_turbo_w4a8.safetensors` and a `Load CLIP` node | |
| pointed at `qwen_3_4b_w4a8.safetensors`. | |
| Both files are detected automatically by ComfyUI (`.comfy_quant` metadata keys); | |
| no custom nodes are required. The text encoder must be loaded through the | |
| Qwen3-4B / Z-Image CLIP path (it does not need the pooled output). | |
| ## Quality & Speed | |
| Verified on an 8 GB VRAM GPU (RTX 4060 Laptop) at 1024x1024, 8 sampling steps: | |
| | Model | Steps | Sample time | | |
| | --- | --- | --- | | |
| | BF16 | 8 | ~14 s | | |
| | W4A8 (this repo) | 8 | ~7 s | | |
| | int8_convrot (official) | 8 | ~6 s | | |
| Image quality is visually identical between BF16, W4A8 and the official | |
| int8_convrot checkpoint. | |
| ## Quantization format | |
| Per quantized Linear layer the file stores: | |
| - `<key>.weight` β int8, ConvRot-rotated packed int4 `[N, K/2]` | |
| - `<key>.weight_s_rel` β fp8 e4m3fn group scale `[N, K/group_size]` | |
| - `<key>.weight_s_channel` β fp32 channel scale `[N]` | |
| - `<key>.weight_codebook` β fp32 Lloyd-Max codebook `[16]` | |
| - `<key>.comfy_quant` β uint8 JSON `{"format": "asym_w4a8_int8", "group_size": 16, "convrot_groupsize": ...}` | |
| 1D norms, biases, the embedding table and `cap_embedder.1` are kept in BF16. | |