File size: 2,502 Bytes
32d2d50
 
2c265ff
 
 
 
 
 
 
32d2d50
2c265ff
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
---
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.