Commit Β·
b383a43
0
Parent(s):
Duplicate from realrebelai/Rebels_w4a8s
Browse filesCo-authored-by: Rebel AI <realrebelai@users.noreply.huggingface.co>
- .gitattributes +35 -0
- FLUX/Flux2-Klein-4B-w4a8.safetensors +3 -0
- FLUX/Flux2-Klein-9B-w4a8.safetensors +3 -0
- KREA/Krea-2-Turbo-w4a8.safetensors +3 -0
- LTX/ENCODERS/gemma4-12b-ltx25-w4a8-v2.safetensors +3 -0
- LTX/ENCODERS/gemma4-12b-ltx25-w4a8.safetensors +3 -0
- LTX/LTX-2.5-Distilled-w4a8-audiofix.safetensors +3 -0
- LTX/LTX-2.5-Distilled-w4a8.safetensors +3 -0
- MiniMax/MiniMax-H3-REF2VA-w4a8.safetensors +3 -0
- MiniMax/MiniMax-Music-3-w4a8.safetensors +3 -0
- QWEN/Qwen-Image-2512-w4a8.safetensors +3 -0
- README.md +148 -0
- SCAIL/SCAIL-2-14B-w4a8.safetensors +3 -0
- Wan/Wan-Animate-2-TURBO-w4a8.safetensors +3 -0
- Z-Image/Z-Image-Turbo-w4a8.safetensors +3 -0
- Z-Image/z_image_base_w4a8-mixed.safetensors +3 -0
- config.json +8 -0
.gitattributes
ADDED
|
@@ -0,0 +1,35 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
*.7z filter=lfs diff=lfs merge=lfs -text
|
| 2 |
+
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
+
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
+
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
+
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
+
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
+
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
+
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
+
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
+
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
+
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
+
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
+
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
+
*.npy filter=lfs diff=lfs merge=lfs -text
|
| 15 |
+
*.npz filter=lfs diff=lfs merge=lfs -text
|
| 16 |
+
*.onnx filter=lfs diff=lfs merge=lfs -text
|
| 17 |
+
*.ot filter=lfs diff=lfs merge=lfs -text
|
| 18 |
+
*.parquet filter=lfs diff=lfs merge=lfs -text
|
| 19 |
+
*.pb filter=lfs diff=lfs merge=lfs -text
|
| 20 |
+
*.pickle filter=lfs diff=lfs merge=lfs -text
|
| 21 |
+
*.pkl filter=lfs diff=lfs merge=lfs -text
|
| 22 |
+
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
+
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
+
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
+
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
+
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
+
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
+
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
+
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
+
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
+
*.wasm filter=lfs diff=lfs merge=lfs -text
|
| 32 |
+
*.xz filter=lfs diff=lfs merge=lfs -text
|
| 33 |
+
*.zip filter=lfs diff=lfs merge=lfs -text
|
| 34 |
+
*.zst filter=lfs diff=lfs merge=lfs -text
|
| 35 |
+
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
FLUX/Flux2-Klein-4B-w4a8.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:ddb9566f8ff12df0b72794901b252e28c938bb9abf8ade716d804a21c33aff2e
|
| 3 |
+
size 2464248722
|
FLUX/Flux2-Klein-9B-w4a8.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:de83a64b5617325a9ca39a112cb72dd131127dc2174dfe2c5bbdc9e7200d1839
|
| 3 |
+
size 5623109192
|
KREA/Krea-2-Turbo-w4a8.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:468bf97902559bfab6566b71fe10601a6098b221b27a9cd1aaaef49c14cef056
|
| 3 |
+
size 7226824858
|
LTX/ENCODERS/gemma4-12b-ltx25-w4a8-v2.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:94dc5813f8ea6863bcb28fa055fa5e39324bc67389e5dfaa25bd257f38f6ba84
|
| 3 |
+
size 8441692051
|
LTX/ENCODERS/gemma4-12b-ltx25-w4a8.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:323a6294aef6e87f1f0af3d79ae94b9420a341d8c8c273e1400528c3e76330c3
|
| 3 |
+
size 8441694015
|
LTX/LTX-2.5-Distilled-w4a8-audiofix.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:4adc072ff3bc4bbf0daf7f186edc1d6c954678d953e03ebd5dd94b396ab996c7
|
| 3 |
+
size 15153292760
|
LTX/LTX-2.5-Distilled-w4a8.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:6b07a9df6a2f16cec62012850aa805ee84708827e94481dec82183c416b5e89a
|
| 3 |
+
size 12520544200
|
MiniMax/MiniMax-H3-REF2VA-w4a8.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1475de170900a18c2a5881d378d695ae4bb11a3a296f5c42132c7bf583bc7b76
|
| 3 |
+
size 24482659432
|
MiniMax/MiniMax-Music-3-w4a8.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:501ac0f83e3df90157909b2cebfa9fda8115640ff897f78963c273bdf5f65e5e
|
| 3 |
+
size 1510463731
|
QWEN/Qwen-Image-2512-w4a8.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:bb97a56152e6ea6bd03ec1f14c318cc815f38b5483741aec75a680e13e31c367
|
| 3 |
+
size 14545127544
|
README.md
ADDED
|
@@ -0,0 +1,148 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
license_name: see-individual-model-repos
|
| 4 |
+
pipeline_tag: text-to-image
|
| 5 |
+
tags:
|
| 6 |
+
- w4a8
|
| 7 |
+
- quantized
|
| 8 |
+
- int4
|
| 9 |
+
- comfyui
|
| 10 |
+
- comfy-kitchen
|
| 11 |
+
- convrot
|
| 12 |
+
- low-vram
|
| 13 |
+
- safetensors
|
| 14 |
+
---
|
| 15 |
+
|
| 16 |
+
# Rebels W4A8 Collection
|
| 17 |
+
|
| 18 |
+
|
| 19 |
+
<table align="center">
|
| 20 |
+
<tr>
|
| 21 |
+
<td><img src="https://cdn-uploads.huggingface.co/production/uploads/68761990332d15464ccc8dee/SNhCJ0PXAiQ9eAD18Ywtt.png" width="300"/></td>
|
| 22 |
+
<td><img src="https://cdn-uploads.huggingface.co/production/uploads/68761990332d15464ccc8dee/89-J55SmjsVOtPH4gaUz-.png" width="300"/></td>
|
| 23 |
+
<td><img src="https://cdn-uploads.huggingface.co/production/uploads/68761990332d15464ccc8dee/UkEPjN6KJUsomhZiD8oc7.png" width="300"/></td>
|
| 24 |
+
</tr>
|
| 25 |
+
</table>
|
| 26 |
+
|
| 27 |
+
|
| 28 |
+
|
| 29 |
+
## Models
|
| 30 |
+
|
| 31 |
+
| Model | Params | Size | Notes |
|
| 32 |
+
|---|---|---|---|
|
| 33 |
+
| **Flux2-Klein-4B-w4a8** | 3.9 B | **2.46 GB** | Apache-2.0. Smallest here β runs on 6 GB cards |
|
| 34 |
+
| **Z-Image-Turbo-w4a8** | 6.2 B | **3.67 GB** | Distilled β 8 steps, CFG 1.0 |
|
| 35 |
+
| **Flux2-Klein-9B-w4a8** | 9.1 B | **5.62 GB** | Flux License |
|
| 36 |
+
| **Krea-2-Turbo-w4a8** | 12.8 B | **7.23 GB** | Turbo β CFG 1.0, not 4.0 |
|
| 37 |
+
| **SCAIL-2-14B-w4a8** | ~14 B | **_.__ GB** | Wan2.1-based video, NEEDS WORK |
|
| 38 |
+
| **Wan-Animate-2-TURBO-w4a8** | 16.4 B | **9.59 GB** | Video. **Reference image must match the driving video's opening pose** |
|
| 39 |
+
| **Qwen-Image-2512-w4a8** | ~20 B | **14.5 GB** | Full model β normal steps and CFG, not the Flash recipe, NEEDS WORK |
|
| 40 |
+
| **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 |
|
| 41 |
+
|
| 42 |
+
All load with the stock **Load Diffusion Model** node. Base licenses carry over β check each source model before commercial use.
|
| 43 |
+
|
| 44 |
+
All load with the stock **Load Diffusion Model** node. Base licenses carry over β check each source model before commercial use.
|
| 45 |
+
|
| 46 |
+
**Four-bit weights. Eight-bit math. Native ComfyUI kernels. No custom nodes.**
|
| 47 |
+
|
| 48 |
+
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.
|
| 49 |
+
|
| 50 |
+
Roughly **0.56 bytes per parameter**, and it *runs* at that size rather than merely storing at it.
|
| 51 |
+
|
| 52 |
+
---
|
| 53 |
+
<table align="center">
|
| 54 |
+
<tr>
|
| 55 |
+
<td><img src="https://cdn-uploads.huggingface.co/production/uploads/68761990332d15464ccc8dee/khVfxQbfqNsXy7ceyD8Y9.png" alt="INT8" width="150"/></td>
|
| 56 |
+
<td><img src="https://cdn-uploads.huggingface.co/production/uploads/68761990332d15464ccc8dee/hVnkIGDU8p8hh90cVhowJ.png" alt="w4a8" width="150"/></td>
|
| 57 |
+
</tr>
|
| 58 |
+
<tr>
|
| 59 |
+
<td align="center"><b>INT8</b></td>
|
| 60 |
+
<td align="center"><b>w4a8</b></td>
|
| 61 |
+
</tr>
|
| 62 |
+
</table>
|
| 63 |
+
|
| 64 |
+
|
| 65 |
+
## Why W4A8 instead of GGUF
|
| 66 |
+
|
| 67 |
+
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.
|
| 68 |
+
|
| 69 |
+
| | GGUF Q4_K_M | W4A8 |
|
| 70 |
+
|---|---|---|
|
| 71 |
+
| Storage | ~0.60 B/elem | ~0.56 B/elem |
|
| 72 |
+
| Compute path | dequant β fp16 GEMM | int8 GEMM |
|
| 73 |
+
| Loader | ComfyUI-GGUF node | **stock Load Diffusion Model** |
|
| 74 |
+
| Weight error (measured) | varies by tensor | ~7% relL2 |
|
| 75 |
+
|
| 76 |
+
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.
|
| 77 |
+
|
| 78 |
+
---
|
| 79 |
+
|
| 80 |
+
|
| 81 |
+
|
| 82 |
+
|
| 83 |
+
## What's inside a file
|
| 84 |
+
|
| 85 |
+
Each quantized Linear stores five pieces:
|
| 86 |
+
|
| 87 |
+
| Tensor | Purpose |
|
| 88 |
+
|---|---|
|
| 89 |
+
| `weight` | int4 codes, two per byte |
|
| 90 |
+
| `weight_s_rel` | fp8 scale, one per group of 16 |
|
| 91 |
+
| `weight_s_channel` | one scale per output channel |
|
| 92 |
+
| `weight_codebook` | 16 Lloyd-Max levels, fit to the tensor |
|
| 93 |
+
| `comfy_quant` | layout config the loader reads |
|
| 94 |
+
|
| 95 |
+
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.
|
| 96 |
+
|
| 97 |
+
---
|
| 98 |
+
|
| 99 |
+
## What I do differently
|
| 100 |
+
|
| 101 |
+
**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.
|
| 102 |
+
|
| 103 |
+
**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.
|
| 104 |
+
|
| 105 |
+
**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.
|
| 106 |
+
|
| 107 |
+
---
|
| 108 |
+
|
| 109 |
+
## Requirements
|
| 110 |
+
|
| 111 |
+
- **ComfyUI 0.30.0+** with `asym_w4a8_int8` in its native quant registry
|
| 112 |
+
- **comfy-kitchen** installed (ships the kernels)
|
| 113 |
+
- An NVIDIA GPU or AMD GPU.
|
| 114 |
+
|
| 115 |
+
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.
|
| 116 |
+
|
| 117 |
+
---
|
| 118 |
+
|
| 119 |
+
## Usage
|
| 120 |
+
|
| 121 |
+
1. Drop the `.safetensors` in `ComfyUI/models/diffusion_models`
|
| 122 |
+
2. Load it with **Load Diffusion Model** β the stock node, no custom loader
|
| 123 |
+
3. Text encoder, VAE and sampler settings are unchanged from the base model
|
| 124 |
+
|
| 125 |
+
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.
|
| 126 |
+
|
| 127 |
+
---
|
| 128 |
+
|
| 129 |
+
## Models
|
| 130 |
+
|
| 131 |
+
*Collection in progress. Each conversion has its own repo with exact sizes, measured error, and the list of layers kept at high precision.*
|
| 132 |
+
|
| 133 |
+
---
|
| 134 |
+
|
| 135 |
+
## Licensing
|
| 136 |
+
|
| 137 |
+
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.
|
| 138 |
+
|
| 139 |
+
---
|
| 140 |
+
|
| 141 |
+
## Credits
|
| 142 |
+
|
| 143 |
+
- **Kijai** β the W4A8 int8-codebook layout and kernels
|
| 144 |
+
- **Comfy-Org / comfyanonymous** β comfy-kitchen and the native quantization registry
|
| 145 |
+
- **city96** β ComfyUI-GGUF, which taught most of us how quantized loading works in ComfyUI
|
| 146 |
+
- Original model authors β all base licenses apply
|
| 147 |
+
|
| 148 |
+
Quantized by [RealRebelAI](https://huggingface.co/realrebelai) Β· [GitHub](https://github.com/RealRebelAI) Β· [X](https://x.com/realrebelai)
|
SCAIL/SCAIL-2-14B-w4a8.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:1b9f3df6bdd644b18a94eccd5c98d197fa2184de3ba9f37b679ce3d0effc91fa
|
| 3 |
+
size 9592737504
|
Wan/Wan-Animate-2-TURBO-w4a8.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:fd39bf0df36c4656f0a05b299d82e8c0cb1e3521e9e35da0ed8606e2235702b2
|
| 3 |
+
size 9588609960
|
Z-Image/Z-Image-Turbo-w4a8.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:2e35a61d1ebe2e4f8f6c059c6f5bb45b20cc0701208a1c3d51a394d8d17605d9
|
| 3 |
+
size 3667086492
|
Z-Image/z_image_base_w4a8-mixed.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e0847681fbfc3154b2233244a61e18928a48f859043d5609d89c68eda91a8bd7
|
| 3 |
+
size 4339705712
|
config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"quantization": "asym_w4a8_int8",
|
| 3 |
+
"format": "w4a8",
|
| 4 |
+
"weight_bits": 4,
|
| 5 |
+
"activation_bits": 8,
|
| 6 |
+
"loader": "comfyui",
|
| 7 |
+
"library": "comfy-kitchen"
|
| 8 |
+
}
|