File size: 6,902 Bytes
ba3e681 | 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 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 | ---
license: other
license_name: see-individual-model-repos
pipeline_tag: text-to-image
tags:
- w4a8
- quantized
- int4
- comfyui
- comfy-kitchen
- convrot
- low-vram
- safetensors
---
# Rebels W4A8 Collection
<table align="center">
<tr>
<td><img src="https://cdn-uploads.huggingface.co/production/uploads/68761990332d15464ccc8dee/SNhCJ0PXAiQ9eAD18Ywtt.png" width="300"/></td>
<td><img src="https://cdn-uploads.huggingface.co/production/uploads/68761990332d15464ccc8dee/89-J55SmjsVOtPH4gaUz-.png" width="300"/></td>
<td><img src="https://cdn-uploads.huggingface.co/production/uploads/68761990332d15464ccc8dee/UkEPjN6KJUsomhZiD8oc7.png" width="300"/></td>
</tr>
</table>
## Models
| Model | Params | Size | Notes |
|---|---|---|---|
| **Flux2-Klein-4B-w4a8** | 3.9 B | **2.46 GB** | Apache-2.0. Smallest here β runs on 6 GB cards |
| **Z-Image-Turbo-w4a8** | 6.2 B | **3.67 GB** | Distilled β 8 steps, CFG 1.0 |
| **Flux2-Klein-9B-w4a8** | 9.1 B | **5.62 GB** | Flux License |
| **Krea-2-Turbo-w4a8** | 12.8 B | **7.23 GB** | Turbo β CFG 1.0, not 4.0 |
| **SCAIL-2-14B-w4a8** | ~14 B | **_.__ GB** | Wan2.1-based video, NEEDS WORK |
| **Wan-Animate-2-TURBO-w4a8** | 16.4 B | **9.59 GB** | Video. **Reference image must match the driving video's opening pose** |
| **Qwen-Image-2512-w4a8** | ~20 B | **14.5 GB** | Full model β normal steps and CFG, not the Flash recipe, NEEDS WORK |
| **MiniMax-H3-REF2VA-w4a8** | 33.1 B | **24.5 GB** | Reference-to-video with audio. Mixed: `adaln_proj` at int8 β its 2688-wide rows can't use the w4a8 kernel |
All load with the stock **Load Diffusion Model** node. Base licenses carry over β check each source model before commercial use.
All load with the stock **Load Diffusion Model** node. Base licenses carry over β check each source model before commercial use.
**Four-bit weights. Eight-bit math. Native ComfyUI kernels. No custom nodes.**
W4A8 conversions of current diffusion and video models, quantized to run on ComfyUI's native `asym_w4a8_int8` path β where int8 tensor cores do the work instead of a dequantize-then-fp16 fallback.
Roughly **0.56 bytes per parameter**, and it *runs* at that size rather than merely storing at it.
---
<table align="center">
<tr>
<td><img src="https://cdn-uploads.huggingface.co/production/uploads/68761990332d15464ccc8dee/khVfxQbfqNsXy7ceyD8Y9.png" alt="INT8" width="150"/></td>
<td><img src="https://cdn-uploads.huggingface.co/production/uploads/68761990332d15464ccc8dee/hVnkIGDU8p8hh90cVhowJ.png" alt="w4a8" width="150"/></td>
</tr>
<tr>
<td align="center"><b>INT8</b></td>
<td align="center"><b>w4a8</b></td>
</tr>
</table>
## Why W4A8 instead of GGUF
GGUF is excellent and I ship plenty of it. But every GGUF forward pass unpacks weights back to fp16 before the matmul β the file is small, the math is not. W4A8 keeps compute in int8 end to end.
| | GGUF Q4_K_M | W4A8 |
|---|---|---|
| Storage | ~0.60 B/elem | ~0.56 B/elem |
| Compute path | dequant β fp16 GEMM | int8 GEMM |
| Loader | ComfyUI-GGUF node | **stock Load Diffusion Model** |
| Weight error (measured) | varies by tensor | ~7% relL2 |
The format comes from Kijai's `AsymW4A8Int8Layout` work in comfy-kitchen. This collection is about applying it correctly to models nobody has converted yet, and being explicit about what was verified.
---
## What's inside a file
Each quantized Linear stores five pieces:
| Tensor | Purpose |
|---|---|
| `weight` | int4 codes, two per byte |
| `weight_s_rel` | fp8 scale, one per group of 16 |
| `weight_s_channel` | one scale per output channel |
| `weight_codebook` | 16 Lloyd-Max levels, fit to the tensor |
| `comfy_quant` | layout config the loader reads |
Three ideas stacked: a **ConvRot Hadamard rotation** that flattens outliers so four bits go further, a **codebook** of non-uniform levels fit to the actual weight distribution instead of an even grid, and **per-group fp8 scales** preserving local dynamic range. Calibration-free β no activation dataset, so nothing in the conversion biases the model toward one kind of prompt.
---
## What I do differently
**Sensitive layers are never quantized.** Timestep embeddings, conditioning projections, patch projections, final output layers and rotary tables stay high precision. On a few-step model the timestep embedder has only a handful of sigma values to distinguish β crushing it to four bits corrupts every step of the schedule. Every file is checked after conversion to confirm those layers really are stored at F16/F32, because quantizers do not preserve them automatically.
**Mixed formats where the kernel demands it.** The fused W4A8 kernel accepts a ConvRot group of exactly 256, so any layer whose input dimension isn't divisible by 256 cannot use it. Rather than silently shipping a file that errors on load, those layers are written as `int8_tensorwise` β also native, no group constraint, ~1% error. Each model card states which layers took that path.
**Every file is measured.** Conversion reports per-layer reconstruction error against the original bf16 weights. Anything that doesn't land where it should doesn't get uploaded.
---
## Requirements
- **ComfyUI 0.30.0+** with `asym_w4a8_int8` in its native quant registry
- **comfy-kitchen** installed (ships the kernels)
- An NVIDIA GPU or AMD GPU.
On startup ComfyUI prints its available formats. You want `asym_w4a8_int8` in the **Native ops** list β under *emulated* it still runs, without the int8 speed advantage.
---
## Usage
1. Drop the `.safetensors` in `ComfyUI/models/diffusion_models`
2. Load it with **Load Diffusion Model** β the stock node, no custom loader
3. Text encoder, VAE and sampler settings are unchanged from the base model
Per-model notes (step counts, CFG, resolution) live in each model's card. Distilled models have fixed schedules that must be respected β base-model settings on them produce poor results regardless of quantization.
---
## Models
*Collection in progress. Each conversion has its own repo with exact sizes, measured error, and the list of layers kept at high precision.*
---
## Licensing
These are quantized derivatives. **Every original license and usage restriction carries over unchanged**, and each model repo states the license of its base model. Check the specific model's card before commercial use β several bases in this collection are not permissive.
---
## Credits
- **Kijai** β the W4A8 int8-codebook layout and kernels
- **Comfy-Org / comfyanonymous** β comfy-kitchen and the native quantization registry
- **city96** β ComfyUI-GGUF, which taught most of us how quantized loading works in ComfyUI
- Original model authors β all base licenses apply
Quantized by [RealRebelAI](https://huggingface.co/realrebelai) Β· [GitHub](https://github.com/RealRebelAI) Β· [X](https://x.com/realrebelai) |