r/StableDiffusion • u/Aishor • 21h ago
Resource - Update Introducing XEIRON: a new quantization method that stores model weights in polar form
Update: several of you asked about int8convrot. I measured it, and the results are at the bottom (short version: it is faster, XEIRON at 4 bits is much smaller and uses less VRAM).
I would like to share XEIRON, a new way of quantizing models that I built with one goal: keeping the image as close as possible to the original while making generation faster and lighter on memory.
In my tests, the improvement shows in both: images that stay faithful to the original model, and less waiting for each one. Don't just take my word for it: look at the comparisons below, try it yourself, and tell me what you think.

The idea
GGUF and most other methods store each weight as a small integer on a uniform scale. XEIRON stores weights in pairs, in polar form: an angle and a radius. Four weights give two angles, which is a point on the Clifford torus.

- A sine and a cosine rebuild each weight on the GPU, right before the multiplication, so the full model is never expanded in memory.
- The matrix multiplications run in int8 on the tensor cores.
- Bits are allocated per tensor according to how much its error damages the output.
- The
.xeironfile is signed (Ed25519) and carries SHA-256 hashes and per-tensor quality figures.
Quality vs GGUF
RTX 5090, 100 generations per model (95 distinct prompts), PSNR against the original bf16 image, paired per prompt, 95% confidence intervals.
| Model: XEIRON vs GGUF | Bits/weight | PSNR (dB) | Difference |
|---|---|---|---|
| Z-Image A4-L vs Q4_K_M | 4.79 / 5.01 | 21.99 / 22.60 | -0.61 (worse) |
| Z-Image A5-S vs Q4_K_M | 5.28 / 5.01 | 23.56 / 22.60 | +0.96 (better) |
| Z-Image A6-L vs Q6_K | 6.75 / 7.00 | 27.89 / 27.64 | +0.26 (not significant) |
| Z-Image A8-S vs Q8_0 | 8.22 / 9.39 | 31.21 / 31.07 | +0.14 (not significant) |
| Krea-2 A4-S vs Q4_K_M | 4.48 / 4.67 | 19.86 / 19.80 | +0.06 (not significant) |
| Krea-2 A4-L vs Q4_K_M | 4.82 / 4.67 | 21.36 / 19.80 | +1.55 (better) |
| Krea-2 A6-S vs Q6_K | 6.28 / 6.61 | 24.58 / 24.16 | +0.42 (not significant) |
| Krea-2 A8-S vs Q8_0 | 8.23 / 8.55 | 27.06 / 26.58 | +0.48 (not significant) |


Speed and memory
At 4 and 6 bits, each image is generated 1.5x to 1.9x faster than with GGUF (1.8x to 2.4x with fused kernels applied to both).
RTX 5090, time per image, no fusion:
| Model and level | Original bf16 | XEIRON | GGUF |
|---|---|---|---|
| Z-Image A4-L vs Q4_K_M | 2.84 s | 2.34 s | 4.19 s |
| Z-Image A5-S vs Q4_K_M | 2.84 s | 2.37 s | 4.19 s |
| Z-Image A6-L vs Q6_K | 2.84 s | 2.61 s | 4.07 s |
| Z-Image A8-S vs Q8_0 | 2.84 s | 3.04 s | 3.10 s |
| Krea-2 A4-S vs Q4_K_M | 6.30 s | 5.21 s | 8.44 s |
| Krea-2 A4-L vs Q4_K_M | 6.30 s | 5.22 s | 8.44 s |
| Krea-2 A6-S vs Q6_K | 6.30 s | 5.41 s | 8.90 s |
| Krea-2 A8-S vs Q8_0 | 6.30 s | 6.68 s | 7.09 s |
RTX 5090, with fused kernels applied to all three formats:
| Model and level | Original bf16 | XEIRON | GGUF |
|---|---|---|---|
| Z-Image A4-L vs Q4_K_M | 2.04 s | 1.78 s | 3.75 s |
| Z-Image A5-S vs Q4_K_M | 2.04 s | 1.80 s | 3.75 s |
| Z-Image A6-L vs Q6_K | 2.04 s | 2.02 s | 3.63 s |
| Z-Image A8-S vs Q8_0 | 2.04 s | 2.41 s | 2.47 s |
| Krea-2 A4-S vs Q4_K_M | 5.09 s | 4.28 s | 7.52 s |
| Krea-2 A4-L vs Q4_K_M | 5.09 s | 4.28 s | 7.52 s |
| Krea-2 A6-S vs Q6_K | 5.09 s | 4.46 s | 7.99 s |
| Krea-2 A8-S vs Q8_0 | 5.09 s | 5.65 s | 5.76 s |
RTX 5070 Ti (16 GB), no fusion:
| Model and level | Original bf16 | XEIRON | GGUF Q4_K_M |
|---|---|---|---|
| Z-Image A5-S | 6.91 s | 5.69 s | 10.70 s |
| Krea-2 A4-L | 39.66 s (RAM offload) | 10.85 s | 19.60 s |

Compared with bf16, weights take 70% less space (A4-L) and peak VRAM drops by 59 to 63%.
Where it does not win
- Against GGUF there is little or no memory advantage at similar quality, except at 8 bits.
- At 8 bits, quality and speed are about the same as Q8_0, although XEIRON uses fewer bits.
- Z-Image A4-L loses to Q4_K_M.
- Only two image models, two Blackwell GPUs, Linux, no FlashAttention. The only measured comparison here is against GGUF.
- PSNR measures closeness to the original model's image, not how good the picture is.
Update: comparison with int8convrot
First, context: this is not the same league. int8convrot is 8-bit INT8 with a rotation. XEIRON's target is maximum quality with the lowest VRAM and the highest speed possible at 6, 4, 3 and even 2 bits, and my original yardstick was GGUF and other 4-bit quantizers.
RTX 5070 Ti (16 GB), Windows 11, ComfyUI 0.47, torch 2.14.1, Triton 3.9. 1024x1024, 8 steps, seed 4386, 10 prompts, same embeddings, noise and sigmas. Transformer time only.
| Model and variant | File size | Seconds per image | GPU VRAM |
|---|---|---|---|
| Z-Image-Turbo int8convrot | 5.87 GiB | 2.94 | 8.2 GiB |
| Z-Image-Turbo XEIRON A4-L | 3.43 GiB | 4.28 | 6.1 GiB |
| Krea-2-Turbo int8convrot | 12.57 GiB | 5.71 | 15.2 GiB* |
| Krea-2-Turbo XEIRON A4-L | 7.20 GiB | 9.69 | 10.4 GiB |
*int8convrot uses ComfyUI's DynamicVRAM, which takes the free memory it finds, so this is not its minimum.


- int8convrot is 1.46x faster on Z-Image and 1.70x faster on Krea-2 than XEIRON A4-L.
- XEIRON A4-L is about 42% smaller on disk and uses roughly 2 GiB less VRAM on Z-Image and 5 GiB less on Krea-2.
- At 8 bits XEIRON has no advantage.
- My ComfyUI plugin is not optimized or integrated enough yet, and my ComfyUI and its environment were outdated in the first tests (with torch 2.9 / Triton 3.5 XEIRON was up to 30% slower). Part of the gap may come from that, and part from my kernel decoding the packed bits on every call. I have not separated the two.
- I have not measured quality against a bf16 reference yet, only looked at the images by eye. One GPU, Windows only.
Status and what is coming
- The converter is not included yet. The repository currently contains only the inference side, so you cannot build your own
.xeironfiles for now. This is on purpose: at this early stage the goal is to test inference on many different computers, and releasing the converter now would fill the place with badly built versions of models. I want to see the community's test results first. - Planned soon: the Qwen text encoders used by Z-Image and Krea-2, as
.xeironfiles for these DiT models. - Planned soon: Qwen 3.8 27B.
- Work in progress: Qwen4-35B-A3B.
If you try it, I would love to know your GPU and how it goes.
Links
- Paper (English and Spanish): https://zenodo.org/records/24864290 (DOI 10.5281/zenodo.24864290)
- Code: https://github.com/Aishor/xeiron (v1.0.0)
- Models: https://huggingface.co/Xeiron
Full HTML Evaluations: Inside each model repository on Hugging Face under the evaluations/ folder (full metric tables and comparison images; download the entire folder to open locally in a browser).
Criticism is very welcome, especially of the benchmark methodology.
56
u/Apprehensive_Sky892 20h ago
Thanks for sharing this.
But the one comparison that is most relevant to us ComfyUI users is (as few people uses GGUF with ComfyUI):
How does it compare against int8convrot in terms of speed, quality, and VRAM usage?
11
u/level10orc 20h ago
Just a nitpick..can we name things according to what they actually do? I think most people prefer reading either real words or acronyms that mean something.
5
u/metal079 19h ago
This is very cool! Did you do any comparisons with int8convrot? I believe thats the most popular quantization right now.
4
u/Zalakat 20h ago
Interesting, checking out the paper now.
10
u/leomozoloa 21h ago
Absolute AI slop description, the actual interesting data point is completely buried, it's the fact that on a 5090 it seems to generate at 2x the speed compared to GGUFs at comparable quality SOMETIMES, should have started by that and only put example and left the AI fluff tech talk to the github
2
u/metal079 18h ago
u/Aishor I dont see a way to create the models in the repo, I wanted to try it out, https://github.com/Aishor/xeiron is that coming soon or am i missing something?
1
u/J6j6 2h ago
Can comfy apply dynamic vram with this?cos in gguf it can't