Downloads · 30 days
68
27% of all-time downloads
JoaoZaokk/Beyond-Reality-Z-Image-v2-W4A4-ConvRot
Beyond-Reality-Z-Image-v2-W4A4-ConvRot is a text-to-image model from JoaoZaokk. Use it when you need an image from a text prompt. It is set up for diffusion-single-file. The card lists the license as apache-2.0.
Quantized builds of the BeyondReality Z-Image v2 fine-tune in ComfyUI's native convrotw4a4 and asymw4a8int8 formats. Both files here are usable — which makes this repo the counterpart to the two next to it, where the…
Downloads · 30 days
68
27% of all-time downloads
All-time downloads
256
Public
Repo size
6.7 GB
Likes
1
Public
Click a slice to open those files.
.safetensors6.7 GB · 100%
From the Hugging Face model README
Quantized builds of the Beyond_Reality Z-Image v2 fine-tune in ComfyUI's native convrot_w4a4 and
asym_w4a8_int8 formats. Both files here are usable — which makes this repo the counterpart to
the two next to it, where the same format and the same converter destroyed the output.
11.46 GiB → 3.06 GiB, 3.74x lighter, and faster per step than the BF16 source.
Method, tools and the full measurement log: https://github.com/JoaoZaokk/comfy-quant-bench
| file | median effective error | format | GiB | latent divergence | s/step | verdict |
|---|---|---|---|---|---|---|
zimage-v2-w4a4.safetensors | 0.1241 | 170 × convrot_w4a4 | 3.06 | 0.7854 | 0.585 | good |
zimage-v2-mixed.safetensors | 0.0774 | 115 × 4-bit / 55 × 8-bit | 3.18 | 0.7216 | 0.637 | good |
Source: 11.46 GiB BF16, 8 steps, 1024×1024, two seeds. "Effective error" is, per layer, the measured relative error of the format that layer actually received, on the real activations it saw during sampling.
Both numbers are the median over 170 layers, recomputed from disk across nine independent calibrations of this source. The spread between calibrations is real and travels with the number: pure W4A4 lands in 0.1213–0.1285 and mixed in 0.0771–0.0839 — about 6% and 9%, driven by the calibration's own seed and step count. A single calibration is not a measurement here either.
Correction, 2026-09-01. An earlier version of this table put the 0.1241 next to the mixed build and left pure W4A4 blank. It is the other way round, in all nine calibrations. The error was caught by
tools/avaliar.py, which recomputes the median from the sidecar and the analysis file instead of quoting it, on its first full pass over this bench. Nothing else moves: 0.1241 is still a build that works, so the tolerated value in the table below is unchanged, and the mixed build was already labelled good on its picture.
Pure W4A4 is 4% smaller and 8% faster per step; mixed sits closer to the reference latent. Neither of those facts tells you which picture you prefer — see the warning below.
| seed | BF16 reference | pure W4A4 | mixed |
|---|---|---|---|
| 1 | ![]() | ![]() | ![]() |
| 2 | ![]() | ![]() | ![]() |
Re-measured over three seeds after an earlier single-run number was found to have the sign inverted:
ConvRot W4A4 is 1.83x–1.93x faster per step than the BF16 source on an RTX 3090 at 1024×1024.
That is the opposite of what the same format, the same converter and the same kernel do to HunyuanVideo 1.5, where W4A4 is slower and destroys the picture. The format is not the variable. The model is.
Measured across three architecture families, the per-layer error a model tolerates before its output breaks is not a property of the format:
| model | parameters | tolerated | not tolerated |
|---|---|---|---|
| Wan 2.1 VACE | 1.3 B | 0.0546 | 0.0793 |
| Z-Image v2 | ~6 B | 0.1421 | 0.1848 |
| HunyuanVideo 1.5 family | ~13 B | 0.1837 | 0.2147, and 0.2163 on capybara_v0.1 |
Monotone in the tolerated column. Three families make that a hypothesis, not a law.
The Z-Image cell was filled on 2026-09-03, and the mechanism that was going to fill it was
backwards. The only axis left was convrot_groupsize — the model was already 170/170 layers at
4 bits, so there was nothing left to promote. The written prediction was that a larger rotation
group would give more error ("coarser rotation, less able to spread outliers"). Measured over the
intersection of layers every value accepts, four points, monotone in the opposite direction: cg 16
0.1926, cg 64 0.1516, cg 256 0.1312, cg 1024 lower still. A Hadamard rotation of size N spreads each
outlier across N channels, so a larger N mixes more. The pre-written control — a smaller group must
reduce the error — is what caught it.
Rendered four arms, three seeds: BF16 good (the reference control), cg 256 (0.1216) good, cg 64 (0.1421) good, cg 16 (0.1848) destroyed in 3 of 3.
Note where that lands: 0.1848 destroys a ~6 B model while 0.1837 is tolerated on a ~13 B one. The bands do not overlap and they sit 0.6% apart, which is what you would expect if model size sets the line. Three families are still three families. Nothing was measured between 0.1421 and 0.1848, so the exact turning point is not a fact — the two ends are.
Z-Image's upper bound was empty until 2026-09-03, and 0.1241 remains the most conservative
value known to work — pure W4A4, every one of its 170 layers at 4 bits. The break is now measured
too; see the note below. An earlier version of this table filled that cell with 0.2163, credited
to capybara_v0.1 as a Z-Image checkpoint. Read from the file, capybara_v0.1 carries 1364 tensors
and 54 double_blocks — HunyuanVideo 1.5's architecture — against Z-Image's 453 tensors and zero.
The evidence was real; it was in the wrong row.
At 8 steps a tiny perturbation reroutes the sampler, and the destination is still a good image. Three seeds, comparing pure W4A4 against a mixed build free-running: 2–1, with both arms sitting 0.3–0.5 from BF16. That comparison measures chaos, not fidelity.
What does work is a matched-input comparison: record every (x, timestep) the BF16 arm was
called with, then replay exactly those into the quantized arm, so trajectory divergence cannot exist
by construction. Under that instrument the error is concentrated at high sigma — 6.17e-1 at
sigma 1.000 falling to 5.31e-2 at sigma 0.300 — so quantization damage lands hardest where structure
is decided and decays into texture.
Latent divergence is a distance, not a verdict. On HunyuanVideo 0.8255 was destroyed and 0.7173 was fine: a 15% gap separating unusable from shippable, so no cut on that axis decides anything.
The converter hard-refuses to run unless both quantize_convrot_w4a4_weight and
convrot_w4a4_linear resolve to comfy_kitchen.backends.cuda, because the eager backend declares
the same capabilities and would silently produce numbers describing dequantized math. Dispatch is
separately counted on a real load and a real forward: 340 quantized modules, 0 dequantize
calls on this model.
Built and verified with:
comfy-kitchen 0.2.31 ComfyUI c1739380 (0.33.0)
torch 2.13.0+cu130 CUDA 13.0
GPU RTX 3090 (sm_86)
Native INT4 MMA requires major == 8 (Ampere / Ada). Hopper and Blackwell are routed to an INT8
branch deliberately.
These files are remapped to ComfyUI's own module names and are not diffusers-named. That step is
not optional for Z-Image: ComfyUI fuses attention.to_{q,k,v} into attention.qkv at load and only
.weight is in that map, so weight_scale and comfy_quant would pass through unrenamed and the
layer would load with no scale and no error. The remap is derived from ComfyUI's own
z_image_to_diffusers table and its output is bit-identical in the latent.
Standard safetensors, ComfyUI-native, mixed precision in one file — the format's own behaviour, not
a trick played on it. Per quantized layer, <layer>.weight as an INT8 container holding packed
signed INT4 plus <layer>.weight_scale as FP32, and a per-layer entry in
__metadata__._quantization_metadata that ComfyUI turns into a <layer>.comfy_quant tensor at load
and dispatches on individually. convrot_groupsize 256. Every non-quantized tensor is preserved
byte for byte from the source and verified as such. The .quant.json sidecars carry full conversion
provenance.
Pair it with the quantized text encoder if you are tight on VRAM: Qwen3-4B-W4A4-ConvRot.
One prompt, two seeds for the image ladder, 1024×1024, 8 steps, one scheduler, one card. No
perceptual metric — "good" is the judgement of someone who looked. No SASS. Only
convrot_groupsize 256 here. BF16 is the reference, not ground truth: it was never itself validated
against float32. And the upper bound of what this model tolerates is unmeasured, as the table above
says.
Beyond Reality
Z-Image fine-tune these files are derived from, released under Apache 2.0, and mirrored at
Nurburgring/BEYOND_REALITY_Z_IMAGE.
This repo is a quantization of their work and would not exist without it.QuantizedTensor / Layout /
MixedPrecisionOps model this format plugs into, and the z_image_to_diffusers table the remap is
derived from.