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 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):
- Haar-random orthogonal rotation: For a normalized vector , applying a Haar-random rotation makes each coordinate follow the fixed marginal (for , approximated by ):
- Lloyd–Max codebook: An MSE-optimal scalar quantizer precomputed offline from , with centroids , applied coordinate-wise as:
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 and the shared rotation (orthogonal, dimension ):
- Rotate weights:
- Split each row into norm and direction:
- Quantize direction with Lloyd–Max codebook and reattach norms:
- Store row-norms in BF16 (negligible overhead) and replace with in the model.
Online Activation Quantization
At inference, for each incoming activation :
- Rotate: (applied as for token batches)
- Normalize:
- Quantize direction and rescale:
The rotations cancel in the product: , with no inverse rotation needed.
Randomized Permuted Block-Hadamard (RPBH) Rotation
The rotation is implemented as:
where is a Walsh–Hadamard matrix, are Rademacher sign diagonals, and is a uniform random permutation matrix. This admits an transform via Fast Walsh–Hadamard Transform and constructs on any dimension (block size is largest power of two dividing ).
The random permutation is crucial: it spreads potential outliers across blocks, keeping the marginal close to 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 , the same Lloyd–Max codebook works for:
- All timesteps and prompts
- All layers of dimension
- 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.
| Model | Method | Bit | Single Object ↑ | Two Object ↑ | Counting ↑ | Colors ↑ | Position ↑ | Color Attribution ↑ | Overall ↑ |
|---|---|---|---|---|---|---|---|---|---|
| FLUX.1-schnell | FP16 | 16/16 | 0.997 | 0.884 | 0.600 | 0.742 | 0.275 | 0.488 | 0.664 |
| AdaTSQ [52] | W4A4 | 0.997 | 0.894 | 0.622 | 0.793 | 0.278 | 0.498 | 0.680 | |
| OrbitQuant | W4A4 | 0.991 | 0.881 | 0.706 | 0.803 | 0.323 | 0.512 | 0.703 | |
| OrbitQuant | W2A4 | 0.972 | 0.697 | 0.575 | 0.766 | 0.198 | 0.420 | 0.604 | |
| QuaRot† [2] | W2A4 | 0.006 | 0.000 | 0.000 | 0.000 | 0.000 | 0.000 | 0.001 | |
| FLUX.1-dev | FP16 | 16/16 | 0.984 | 0.823 | 0.769 | 0.771 | 0.203 | 0.450 | 0.667 |
| OrbitQuant | W4A4 | 0.988 | 0.768 | 0.691 | 0.755 | 0.178 | 0.420 | 0.633 | |
| OrbitQuant | W2A4 | 0.956 | 0.424 | 0.481 | 0.678 | 0.110 | 0.203 | 0.475 | |
| Z-Image-Turbo | FP16 | 16/16 | 1.000 | 0.907 | 0.709 | 0.859 | 0.468 | 0.583 | 0.754 |
| OrbitQuant | W4A4 | 0.997 | 0.889 | 0.781 | 0.888 | 0.450 | 0.598 | 0.767 | |
| OrbitQuant | W2A4 | 0.703 | 0.194 | 0.275 | 0.500 | 0.128 | 0.113 | 0.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.
| Model | Method | Bit | Imaging Quality ↑ | Aesthetic Quality ↑ | Motion Smoothness ↑ | Dynamic Degree ↑ | Background Consistency ↑ | Subject Consistency ↑ | Scene ↑ | Overall Consistency ↑ |
|---|---|---|---|---|---|---|---|---|---|---|
| Wan 2.1-1.3B | Full Prec. | 16/16 | 64.30 | 58.21 | 97.37 | 70.28 | 95.94 | 93.84 | 28.05 | 24.67 |
| OrbitQuant | W4A6 | 61.25 | 56.08 | 97.76 | 59.78 | 95.51 | 94.23 | 24.88 | 24.35 | |
| OrbitQuant | W4A4 | 58.58 | 53.41 | 97.42 | 53.89 | 95.30 | 92.98 | 18.81 | 23.86 | |
| CogVideoX-2B | Full Prec. | 16/16 | 59.15 | 54.49 | 97.43 | 67.78 | 94.79 | 92.82 | 36.24 | 25.06 |
| OrbitQuant | W4A6 | 55.59 | 54.42 | 97.02 | 57.50 | 94.78 | 92.56 | 32.51 | 24.55 | |
| OrbitQuant | W4A4 | 52.62 | 51.66 | 96.99 | 42.78 | 94.50 | 91.65 | 28.53 | 23.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)
| Rotation | W4A4 | W3A3 | W2A4 | Latency (s) |
|---|---|---|---|---|
| Haar (dense) | 0.696 | 0.669 | 0.591 | 11.65 |
| Full RHT | 0.691 | 0.672 | 0.587 | 0.452 |
| Block-RHT (no perm) | 0.678 | 0.642 | 0.558 | 0.381 |
| RPBH (ours) | 0.690 | 0.674 | 0.595 | 0.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:
- 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.
- 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.
- 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
- BlockPilot: Instance-Adaptive Policy Learning for Diffusion-based Speculative Decoding
BlockPilot adaptively selects block size per sample via a lightweight predictor, achieving up to 4.20x speedup in diffusion-based speculative decoding.
- TurboServe: Serving Streaming Video Generation Efficiently and Economically
TURBOSERVE reduces worst-case per-chunk latency by 37.5% and GPU cost by 37.2% through joint migration-aware placement and load-driven autoscaling.
- Program-as-Weights: A Programming Paradigm for Fuzzy Functions
A 0.6B PAW interpreter matches 32B model performance on fuzzy functions, using 50× less inference memory via compiled neural programs.