Summary (Overview)

  • OrbitQuant is a calibration-free weight-activation quantizer for diffusion transformers (DiTs) that replaces per-timestep range calibration with a single distributional codebook applied in a shared, rotated, normalized basis.
  • It uses a randomized permuted block-Hadamard (RPBH) rotation to map activations into a fixed, known marginal distribution fdN(0,1/d)f_d \approx \mathcal{N}(0,1/d) regardless of timestep, prompt, or guidance branch, enabling a single Lloyd–Max codebook per input dimension to be applied across all layers and denoising steps.
  • The rotation is folded into weight rows offline and cancels in the linear layer matrix product; only a forward RPBH rotation on activations is needed at runtime, adding negligible overhead.
  • State-of-the-art PTQ results are achieved on image DiTs (FLUX.1, Z-Image-Turbo) and video DiTs (Wan 2.1, CogVideoX) at low bit-widths, including the first practical PTQ at W2A4 where prior methods collapse.
  • The same recipe transfers from image to video without per-modality tuning and sets new records on GenEval and VBench benchmarks.

Introduction and Theoretical Foundation

Background and Motivation

Diffusion transformers (DiTs) have become the backbone of state-of-the-art image and video generation, but their iterative denoising and growing parameter counts make inference expensive. Post-training quantization (PTQ) of both weights and activations is a natural remedy, but existing methods rely on calibration data to capture activation statistics that shift across timesteps, prompts, and classifier-free-guidance (CFG) branches. This forces re-calibration for every new checkpoint, resolution, or modality.

Theoretical Basis

Two key ingredients are inherited from TurboQuant (a prior KV-cache quantizer):

  1. Haar-random orthogonal rotation: For a normalized vector x~=x/x2\tilde{\mathbf{x}} = \mathbf{x} / \|\mathbf{x}\|_2, applying a Haar-random rotation ΦdRd×d\mathbf{\Phi}_d \in \mathbb{R}^{d \times d} makes each coordinate follow the fixed marginal (for d64d \ge 64, approximated by N(0,1/d)\mathcal{N}(0, 1/d)): fd(t)=Γ(d/2)πΓ((d1)/2)(1t2)(d3)/2,t[1,1]f_d(t) = \frac{\Gamma(d/2)}{\sqrt{\pi}\,\Gamma((d-1)/2)}\,(1-t^2)^{(d-3)/2}, \quad t \in [-1, 1]
  2. Lloyd–Max codebook: An MSE-optimal scalar quantizer precomputed offline from fdf_d, with 2b2^b centroids C(d,b)\mathcal{C}^{(d,b)}, applied coordinate-wise as: q^b(d)(t)=argmincC(d,b)tc\hat{q}_b^{(d)}(t) = \arg\min_{c \in \mathcal{C}^{(d,b)}} |t - c|

Key Insight

OrbitQuant extends this idea to both weights and activations inside each linear layer, using a shared rotation that cancels in the product. This eliminates the need for calibration: one codebook per dimension serves all timesteps, prompts, layers, and both image and video DiTs.

Methodology

Overview

OrbitQuant replaces per-input range calibration with a distributional quantizer applied in one shared, rotated, normalized basis. The rotation is absorbed into weights offline and applied forward on activations online. The pipeline uses the randomized permuted block-Hadamard (RPBH) transform for efficient implementation.

Offline Weight Quantization

For each linear layer with weight matrix WRm×d\mathbf{W} \in \mathbb{R}^{m \times d} and the shared rotation Πd\mathbf{\Pi}_d (orthogonal, dimension dd):

  1. Rotate weights: W=WΠd\mathbf{W}' = \mathbf{W} \mathbf{\Pi}_d^\top
  2. Split each row into norm and direction: ri=wi2,  w~i=wi/rir_i' = \|\mathbf{w}_i'\|_2,\; \tilde{\mathbf{w}}_i' = \mathbf{w}_i' / r_i'
  3. Quantize direction with Lloyd–Max codebook and reattach norms: W^=diag(r)Q^bw(d)(W~)\hat{\mathbf{W}}' = \mathrm{diag}(\mathbf{r}') \cdot \hat{Q}_{b_w}^{(d)}(\tilde{\mathbf{W}}')
  4. Store row-norms r\mathbf{r}' in BF16 (negligible overhead) and replace W\mathbf{W} with W^\hat{\mathbf{W}}' in the model.

Online Activation Quantization

At inference, for each incoming activation xRd\mathbf{x} \in \mathbb{R}^d:

  1. Rotate: x=Πdx\mathbf{x}' = \mathbf{\Pi}_d \mathbf{x} (applied as xΠd\mathbf{x}\mathbf{\Pi}_d^\top for token batches)
  2. Normalize: s=x2,  x~=x/(s+ε)s = \|\mathbf{x}'\|_2,\; \tilde{\mathbf{x}}' = \mathbf{x}' / (s + \varepsilon)
  3. Quantize direction and rescale: x^=sQ^ba(d)(x~)\hat{\mathbf{x}}' = s \cdot \hat{Q}_{b_a}^{(d)}(\tilde{\mathbf{x}}')

The rotations cancel in the product: W^x^WΠdΠdx=Wx\hat{\mathbf{W}}' \hat{\mathbf{x}}' \approx \mathbf{W}\mathbf{\Pi}_d^\top \mathbf{\Pi}_d \mathbf{x} = \mathbf{W} \mathbf{x}, with no inverse rotation needed.

Randomized Permuted Block-Hadamard (RPBH) Rotation

The rotation Πd\mathbf{\Pi}_d is implemented as:

Πd=blkdiag(HhD1,,HhDd/h)Pπ\mathbf{\Pi}_d = \mathrm{blkdiag}(\mathbf{H}_h \mathbf{D}_1, \ldots, \mathbf{H}_h \mathbf{D}_{d/h}) \cdot \mathbf{P}_\pi

where Hh\mathbf{H}_h is a h×hh \times h Walsh–Hadamard matrix, Di\mathbf{D}_i are Rademacher sign diagonals, and Pπ\mathbf{P}_\pi is a uniform random permutation matrix. This admits an O(dlogh)\mathcal{O}(d \log h) transform via Fast Walsh–Hadamard Transform and constructs on any dimension dd (block size hh is largest power of two dividing dd).

The random permutation Pπ\mathbf{P}_\pi is crucial: it spreads potential outliers across blocks, keeping the marginal close to fdf_d even at low bit-width. Proposition 1 (in paper) gives a probabilistic variance concentration bound. A fixed permutation (drawn once per dimension) suffices; no calibration or data-dependent selection is needed.

Data-Agnostic Codebook

Because RPBH ensures each rotated coordinate of a normalized vector follows approximately the same fixed marginal fdf_d, the same Lloyd–Max codebook C(d,b)\mathcal{C}^{(d,b)} works for:

  • All timesteps and prompts
  • All layers of dimension dd
  • Both weight rows and activation tokens
  • Both image and video DiTs

This is what makes OrbitQuant completely calibration-free: no model evaluation or calibration data is required at quantizer construction time.

Empirical Validation / Results

Image Generation: GenEval (Table 1)

Table 1: GenEval scores on three image DiTs at W4A4 and W2A4.

ModelMethodBitSingle Object ↑Two Object ↑Counting ↑Colors ↑Position ↑Color Attribution ↑Overall ↑
FLUX.1-schnellFP1616/160.9970.8840.6000.7420.2750.4880.664
AdaTSQ [52]W4A40.9970.8940.6220.7930.2780.4980.680
OrbitQuantW4A40.9910.8810.7060.8030.3230.5120.703
OrbitQuantW2A40.9720.6970.5750.7660.1980.4200.604
QuaRot† [2]W2A40.0060.0000.0000.0000.0000.0000.001
FLUX.1-devFP1616/160.9840.8230.7690.7710.2030.4500.667
OrbitQuantW4A40.9880.7680.6910.7550.1780.4200.633
OrbitQuantW2A40.9560.4240.4810.6780.1100.2030.475
Z-Image-TurboFP1616/161.0000.9070.7090.8590.4680.5830.754
OrbitQuantW4A40.9970.8890.7810.8880.4500.5980.767
OrbitQuantW2A40.7030.1940.2750.5000.1280.1130.319

At W4A4, OrbitQuant is essentially lossless, exceeding FP16 on Overall on FLUX.1-schnell and Z-Image-Turbo, and setting state-of-the-art among PTQ methods. At W2A4, it is the only method that produces usable images – baselines collapse to near-zero scores.

Video Generation: VBench (Table 2)

Table 2: VBench scores on Wan 2.1-1.3B and CogVideoX-2B at W4A6 and W4A4.

ModelMethodBitImaging Quality ↑Aesthetic Quality ↑Motion Smoothness ↑Dynamic Degree ↑Background Consistency ↑Subject Consistency ↑Scene ↑Overall Consistency ↑
Wan 2.1-1.3BFull Prec.16/1664.3058.2197.3770.2895.9493.8428.0524.67
OrbitQuantW4A661.2556.0897.7659.7895.5194.2324.8824.35
OrbitQuantW4A458.5853.4197.4253.8995.3092.9818.8123.86
CogVideoX-2BFull Prec.16/1659.1554.4997.4367.7894.7992.8236.2425.06
OrbitQuantW4A655.5954.4297.0257.5094.7892.5632.5124.55
OrbitQuantW4A452.6251.6696.9942.7894.5091.6528.5323.86

OrbitQuant achieves highest Overall Consistency under both bit-widths, and leads on most per-dimension scores, using the identical recipe as for image DiTs – no tuning per modality.

Qualitative Results (Figure 4)

  • At W3A3, OrbitQuant stays close to BF16 on FLUX.1-dev, FLUX.1-schnell, and Z-Image-Turbo, while QuaRot and ViDiT-Q show artifacts or collapse.
  • At W4A4 on Wan 14B, OrbitQuant preserves scene layout and temporal consistency across 81 frames; other methods drift in color and structure.

Latency and Memory Analysis (Figure 5)

  • On FLUX.1-dev (H100, 1024², 50 steps) and Wan 2.1-1.3B, OrbitQuant has the lowest latency overhead among weight-and-activation PTQ methods (SmoothQuant: 1.09× slower, QuaRot: 1.28×, ViDiT-Q: 1.40×).
  • Peak memory matches unquantized model on image; slightly higher on video due to index/gather tensors but still below ViDiT-Q.
  • The efficient RPBH transform (vs. dense Haar) reduces activation rotation cost by ~26×.

Rotation Ablation (Table 3)

RotationW4A4W3A3W2A4Latency (s)
Haar (dense)0.6960.6690.59111.65
Full RHT0.6910.6720.5870.452
Block-RHT (no perm)0.6780.6420.5580.381
RPBH (ours)0.6900.6740.5950.451

RPBH achieves the best quality at low bit-width (W2A4) among all rotations, with latency comparable to structured transforms. Removing the random permutation (Block-RHT) degrades performance, confirming its importance.

AdaLN Bit-Width Ablation (Figure 6)

Quantizing AdaLN modulation weights to INT4 (instead of BF16) nearly matches full-precision GenEval performance, while boosting compression from 2.21× to 4× on FLUX architecture. Further quantization to W2 degrades FLUX models, so OrbitQuant keeps AdaLN at INT4.

Theoretical and Practical Implications

Theoretical Significance

  • Provides a formal justification for using random rotations (not just data-dependent permutations) to enable distributional codebooks for DiT quantization, with Proposition 1 offering a probabilistic variance bound.
  • Shifts the paradigm from per-input range calibration to distributional codebook design, eliminating the need for model evaluation at quantizer construction.
  • The shared-rotation design (folding into weights) is computationally elegant – rotations cancel in the product, requiring no inverse transform at inference.

Practical Implications

  • Calibration-free operation: no need to collect prompts, timesteps, or CFG branches for each new model or resolution. This dramatically simplifies deployment pipelines.
  • Cross-modality transfer: the same recipe works for both image and video DiTs without per-modality tuning, reducing engineering effort.
  • Usable at extreme bit-widths: W2A4 is achieved for the first time in PTQ of DiTs, enabling significant memory and compute savings while maintaining generation quality.
  • Low runtime overhead: the fixed codebook lookup and efficient RPBH rotation (O(d log h)) add minimal latency, making deployment practical.

Conclusion

OrbitQuant presents a calibration-free, data-agnostic quantization framework for diffusion transformers that replaces per-timestep range calibration with a single distributional codebook applied in a shared rotated basis. The key innovations are:

  1. RPBH rotation with a uniform random permutation that keeps rotated coordinates close to a known fixed marginal, enabling a Lloyd–Max codebook that works for all inputs.
  2. Weight-activation sharing: the same rotation is absorbed into weights offline and applied to activations online, canceling in the product and requiring only a forward transform at runtime.
  3. Empirical success: state-of-the-art PTQ results at W4A4 and W2A4 on GenEval and VBench, with the only method maintaining generation quality at 2-bit weights. The same recipe transfers from image to video without per-modality tuning.

Future Directions

  • Extending the approach to other architectures (e.g., U-Net-based diffusion models, autoregressive transformers).
  • Hardware implementation of the RPBH transform for real-time inference.
  • Combining with adaptive bit-allocation or mixed-precision schemes for further compression.
  • Exploring the theoretical limits of distributional codebooks under even lower bit-widths (e.g., binary or ternary quantization).

Related papers