CaoTurkey commited on
Commit
2c265ff
Β·
verified Β·
1 Parent(s): 32d2d50

Upload folder using huggingface_hub

Browse files
README.md CHANGED
@@ -1,3 +1,77 @@
1
  ---
2
  license: apache-2.0
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
+ base_model:
4
+ - Tongyi-MAI/Z-Image-Turbo
5
+ pipeline_tag: text-to-image
6
+ library_name: diffusers
7
+ tags:
8
+ - comfyui
9
+ - w4a8
10
  ---
11
+
12
+ # Z-Image-Turbo W4A8
13
+
14
+ W4A8 (4-bit weight, 8-bit activation) quantized weights for
15
+ [Z-Image-Turbo](https://huggingface.co/Tongyi-MAI/Z-Image-Turbo), made for
16
+ [ComfyUI](https://github.com/comfyanonymous/ComfyUI) using ComfyUI's native
17
+ `asym_w4a8_int8` quantized-diffusion format (Comfy Kitchen).
18
+
19
+ Both the diffusion model and the Qwen3-4B text encoder are quantized, so the
20
+ whole pipeline fits in low VRAM.
21
+
22
+ ## Files
23
+
24
+ | File | Size | Notes |
25
+ | --- | --- | --- |
26
+ | `z_image_turbo_w4a8.safetensors` | 3.5 GB | Diffusion model, `asym_w4a8_int8`, group_size 16 + ConvRot |
27
+ | `qwen_3_4b_w4a8.safetensors` | 2.8 GB | Qwen3-4B text encoder, `asym_w4a8_int8`, group_size 16 + ConvRot |
28
+
29
+ Original BF16 sizes: diffusion 12.3 GB, text encoder 8.0 GB.
30
+
31
+ ## Usage (ComfyUI)
32
+
33
+ Place the files in your ComfyUI `models` directory:
34
+
35
+ ```
36
+ ComfyUI/
37
+ β”œβ”€β”€ models/
38
+ β”‚ β”œβ”€β”€ diffusion_models/
39
+ β”‚ β”‚ └── z_image_turbo_w4a8.safetensors
40
+ β”‚ β”œβ”€β”€ text_encoders/
41
+ β”‚ β”‚ └── qwen_3_4b_w4a8.safetensors
42
+ β”‚ └── vae/
43
+ β”‚ └── flux1-vae.safetensors
44
+ ```
45
+
46
+ Then use the standard Z-Image-Turbo text-to-image workflow with a `Load Diffusion
47
+ Model` node pointed at `z_image_turbo_w4a8.safetensors` and a `Load CLIP` node
48
+ pointed at `qwen_3_4b_w4a8.safetensors`.
49
+
50
+ Both files are detected automatically by ComfyUI (`.comfy_quant` metadata keys);
51
+ no custom nodes are required. The text encoder must be loaded through the
52
+ Qwen3-4B / Z-Image CLIP path (it does not need the pooled output).
53
+
54
+ ## Quality & Speed
55
+
56
+ Verified on an 8 GB VRAM GPU (RTX 4060 Laptop) at 1024x1024, 8 sampling steps:
57
+
58
+ | Model | Steps | Sample time |
59
+ | --- | --- | --- |
60
+ | BF16 | 8 | ~14 s |
61
+ | W4A8 (this repo) | 8 | ~7 s |
62
+ | int8_convrot (official) | 8 | ~6 s |
63
+
64
+ Image quality is visually identical between BF16, W4A8 and the official
65
+ int8_convrot checkpoint.
66
+
67
+ ## Quantization format
68
+
69
+ Per quantized Linear layer the file stores:
70
+
71
+ - `<key>.weight` β€” int8, ConvRot-rotated packed int4 `[N, K/2]`
72
+ - `<key>.weight_s_rel` β€” fp8 e4m3fn group scale `[N, K/group_size]`
73
+ - `<key>.weight_s_channel` β€” fp32 channel scale `[N]`
74
+ - `<key>.weight_codebook` β€” fp32 Lloyd-Max codebook `[16]`
75
+ - `<key>.comfy_quant` β€” uint8 JSON `{"format": "asym_w4a8_int8", "group_size": 16, "convrot_groupsize": ...}`
76
+
77
+ 1D norms, biases, the embedding table and `cap_embedder.1` are kept in BF16.
qwen_3_4b_w4a8.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:953a3a40dd7ab0d17150174325e106f7b7484a89e01acd14260d6dd9d84247f2
3
+ size 2826663336
z_image_turbo_w4a8.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e5f510fb97c871337121617f0c85827399887d5d6c22da8931a04c32785677cd
3
+ size 3485672904