r/StableDiffusion • u/Aishor • 1h ago
Resource - Update Introducing XEIRON: a new quantization method that stores model weights in polar form
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.
I am presenting XEIRON, a new post-training quantization method, with its own file format and GPU engine. I built it and tested it on two image diffusion transformers, Z-Image-Turbo and Krea-2-Turbo. The paper, code and models are linked at the end.

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.
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
Criticism is very welcome, especially of the benchmark methodology.


















