HyperAIHyperAI

Command Palette

Search for a command to run...

OrbitQuant: 이미지 및 비디오 확산 트랜스포머를 위한 데이터 비의존적 양자화

Donghyun Lee Jitesh Chavan Duy Nguyen Sam Huang Liming Jiang Priyadarshini Panda Timo Mertens Saurabh Shukla

초록

확산 트랜스포머(DiT)는 최첨단 이미지 및 비디오 생성을 달성하지만, 다단계 샘플링과 증가하는 매개변수 수로 인해 추론 비용이 높아진다. 학습 후 양자화(PTQ)는 자연스러운 해결책이지만, DiT 활성화는 타임스텝, 프롬프트, 가이던스 분기에 따라 변동되어 기존 방법들은 새로운 체크포인트나 모달리티마다 보정 데이터를 다시 맞춰야 했다. 우리는 OrbitQuant를 제시하는데, 이는 정규화되고 회전된 기저에서 양자화하여 범위 추정을 우회하는 데이터 비의존적 가중치-활성화 양자화기이다. 이 기저에서 무작위 순열 블록-하다마드(RPBH) 회전은 입력에 관계없이 각 좌표를 하나의 고정되고 알려진 주변 분포로 집중시키므로, 단일 로이드-맥스 코드북이 주어진 입력 차원의 모든 타임스텝, 프롬프트, 계층에 사용된다. 동일한 양자화기를 오프라인에서 가중치 행에 확장하여 회전을 가중치에 흡수시킴으로써 각 선형 계층 내에서 상쇄되고 실행 시 활성화에 대한 순방향 회전만 남게 한다. 동일한 방법이 모달리티별 조정 없이 이미지에서 비디오로 전이된다. FLUX.1, Z-Image-Turbo, Wan 2.1, CogVideoX 전반에 걸쳐 여러 저비트 설정에서 PTQ의 최첨단 성능을 달성하며, 이미지 확산 트랜스포머의 PTQ를 사용 가능한 생성 품질로 W2A4까지 끌어올린다.

One-sentence Summary

Cantina Labs, USC, and UIUC researchers propose OrbitQuant, a data-agnostic weight-activation quantizer that normalizes activations via a randomized permuted block-Hadamard (RPBH) rotation to a fixed distribution for a single Lloyd–Max codebook across timesteps and modalities, absorbs the rotation into weights offline, and sets state-of-the-art low-bit post-training quantization on image and video diffusion transformers including FLUX.1, Z-Image-Turbo, Wan 2.1, and CogVideoX, while pushing image diffusion transformers to W2A4W_2A_4W2A4 with usable generation quality.

Key Contributions

  • OrbitQuant introduces a data-agnostic weight-activation quantizer that operates in a normalized, rotated basis, where a single Lloyd–Max codebook serves all timesteps, prompts, and layers of a given input dimension.
  • The rotation is absorbed into the weights offline, cancels inside each linear layer, and leaves only a forward RPBH rotation on the activations at runtime. The random permutation of the RPBH rotation ensures well-behaved rotated marginals at low bit-width without calibration.
  • Across FLUX.1, Z-Image-Turbo, Wan 2.1, and CogVideoX, the same recipe transfers unchanged from image to video without per-modality tuning. It sets the state of the art for PTQ on GenEval and VBench at several low-bit settings and, at W2A4, is the only method that produces usable images where prior PTQ baselines collapse to noise.

Introduction

Diffusion Transformers (DiTs) now power state-of-the-art image and video generation, but their compute-bound inference makes low-bit weight-and-activation quantization essential. Existing post-training quantization (PTQ) approaches inherit from large language models and rely on calibration data to absorb outlier shifts; however, DiT activations drift across timesteps, prompts, and classifier-free guidance branches, breaking the static-statistics assumption and demanding new calibration for every checkpoint or modality. The authors introduce OrbitQuant, a calibration-free PTQ framework that rotates activations into a common normalized basis where their coordinates follow a fixed, known marginal distribution, regardless of the input. A single offline Lloyd–Max codebook then uniformly quantizes all activations across denoising steps. The rotation is folded into the weight rows so it cancels inside each linear layer, leaving only a lightweight randomized permuted block-Hadamard (RPBH) transform at runtime. OrbitQuant achieves state-of-the-art results on both image and video DiTs without any calibration data, and it remains usable at W2A4 bit-widths where prior methods collapse.

Method

The authors propose OrbitQuant, a calibration-free quantization framework that replaces per-input range calibration with a distributional quantizer applied in a shared, rotated, and normalized basis. Because weights and activations are quantized in the same basis, the rotation cancels out in the matrix product, leaving only a forward rotation on the activation at runtime.

The framework operates through two distinct stages: offline weight quantization and online activation quantization. For a linear layer with input dimension ddd, the authors apply a shared rotation Πd\Pi_dΠd. During the offline stage, the weight matrix is rotated into this basis as W=WΠd\mathbf{W}' = \mathbf{W} \boldsymbol{\Pi}_d^\topW=WΠd. Each row of W\mathbf{W}'W is then decomposed into a magnitude ri=wi2r_i' = \|\mathbf{w}_i'\|_2ri=wi2 and a unit direction w~i=wi/ri\tilde{\mathbf{w}}_i' = \mathbf{w}_i' / r_i'w~i=wi/ri. The direction is quantized using a Lloyd-Max codebook, and the magnitude is re-attached, yielding W^=diag(r)Q^bw(d)(W~)\hat{\mathbf{W}}' = \text{diag}(\mathbf{r}') \cdot \hat{Q}_{b_w}^{(d)}(\tilde{\mathbf{W}}')W^=diag(r)Q^bw(d)(W~). The row-norm vector is stored in BF16, adding negligible overhead.

At inference time, each incoming activation x\mathbf{x}x is rotated by Πd\Pi_dΠd before entering the layer, producing x=Πdx\mathbf{x}' = \boldsymbol{\Pi}_d \mathbf{x}x=Πdx. This is split into a magnitude s=x2s = \|\mathbf{x}'\|_2s=x2 and a unit direction x~=x/(s+ε)\tilde{\mathbf{x}}' = \mathbf{x}' / (s + \varepsilon)x~=x/(s+ε). The direction is quantized with the Lloyd-Max quantizer Q^ba(d)\hat{Q}_{b_a}^{(d)}Q^ba(d) and rescaled by sss, resulting in x^=sQ^ba(d)(x~)\hat{\mathbf{x}}' = s \cdot \hat{Q}_{b_a}^{(d)}(\tilde{\mathbf{x}}')x^=sQ^ba(d)(x~). Since the weight absorbs Πd\Pi_d^\topΠd and the activation applies Πd\Pi_dΠd, the two cancel in the product, allowing the quantized layer to compute W^x^Wx\hat{\mathbf{W}}' \hat{\mathbf{x}}' \approx \mathbf{W} \mathbf{x}W^x^Wx without an inverse rotation at runtime.

To make the rotation efficient, the authors realize Πd\Pi_dΠd as a randomized permuted block-Hadamard (RPBH) transform. It is defined as Πd=blkdiag(HhD1,,HhDd/h)Pπ\boldsymbol{\Pi}_d = \text{blkdiag}(\mathbf{H}_h \mathbf{D}_1, \dots, \mathbf{H}_h \mathbf{D}_{d/h}) \cdot \mathbf{P}_\piΠd=blkdiag(HhD1,,HhDd/h)Pπ, where Hh\mathbf{H}_hHh is a Walsh-Hadamard matrix, Di\mathbf{D}_iDi are Rademacher sign diagonals, and Pπ\mathbf{P}_\piPπ is a uniform random permutation matrix. The leading permutation Pπ\mathbf{P}_\piPπ is crucial as it spreads coordinates across blocks, ensuring that the variance of each coordinate of Πdx~\Pi_d \tilde{\mathbf{x}}Πdx~ stays close to 1/d1/d1/d. This keeps the marginal distribution close to N(0,1/d)\mathcal{N}(0, 1/d)N(0,1/d), making the Lloyd-Max codebook near-optimal.

Because the rotated coordinates consistently follow the fixed marginal fdf_dfd, the authors run Lloyd-Max on fdf_dfd offline to obtain a single codebook Cd\mathcal{C}_dCd per dimension. This data-agnostic codebook serves every timestep, prompt, layer, and weight row of dimension ddd, completely eliminating the need for input statistics collection or calibration. As demonstrated in the figure, raw activations deviate sharply from fdf_dfd, but after the RPBH rotation, both weights and activations match the target distribution as closely as a dense Haar rotation, allowing a single codebook to fit all operands effectively.

Experiment

Evaluation on image and video diffusion transformers shows OrbitQuant achieving state-of-the-art post-training quantization quality, with near-lossless W4A4 performance that can surpass full precision on GenEval and VBench, and robust W2A4 behavior where baselines collapse. OrbitQuant also exhibits the lowest quantization overhead in latency comparisons, and qualitative samples confirm its fidelity even at very low bit-widths. Ablation studies support the use of a randomized permuted block Hadamard rotation and INT4 AdaLN projections for optimal accuracy–efficiency trade-offs.

OrbitQuant achieves lossless or better-than-FP16 GenEval performance at W4A4 on two of three image diffusion transformers and trails by a tiny margin on the third, surpassing all post-training quantization baselines to set a new state of the art. At W2A4, the advantage grows: while rotation and smoothing methods collapse to near-zero scores on every model, OrbitQuant remains functional, retaining most of its quality on the FLUX models and being the sole method that produces meaningful results on Z-Image-Turbo. OrbitQuant exceeds FP16 on GenEval Overall for FLUX.1-schnell and Z-Image-Turbo at W4A4, outperforming every PTQ baseline. At W2A4, competing methods degrade to near-zero scores, whereas OrbitQuant stays usable and uniquely delivers meaningful scores on Z-Image-Turbo.

On video generation benchmarks, OrbitQuant outperforms other post-training quantization methods at both W4A6 and W4A4 precision. It achieves the highest Overall Consistency on Wan 2.1-1.3B and CogVideoX-2B, leading on most individual quality dimensions, while competing methods degrade more sharply at the lower bit-width. At W4A6 on Wan 2.1-1.3B, OrbitQuant attains the best Overall Consistency (24.35), ahead of the next-best method SVDQuant (23.26). OrbitQuant leads in Imaging Quality, Aesthetic Quality, Dynamic Degree, Background Consistency, Subject Consistency, and Scene at W4A6 on Wan 2.1-1.3B. Motion Smoothness is the only W4A6 metric where OrbitQuant is not the top method; it ranks second (97.76) behind SmoothQuant (98.01). At W4A4, OrbitQuant stays closest to full precision on most dimensions and again ranks first in Overall Consistency on both Wan 2.1-1.3B and CogVideoX-2B, while baselines lose ground.

At W4A4 all rotation methods perform within noise, but at lower bit-widths RPBH yields the best GenEval scores while matching the speed of other fast Hadamard transforms. The dense Haar rotation is an order of magnitude slower because it cannot exploit a fast kernel. RPBH achieves the highest GenEval Overall at W3A3 and W2A4, outperforming Block-RHT, Full RHT, and Haar. Removing the random permutation degrades low-bit performance (Block-RHT), showing the permutation's role in spreading outliers for codebook compatibility. Structured Hadamard transforms (Full RHT, Block-RHT, RPBH) run over 25× faster than the dense Haar rotation, with RPBH adding only a small overhead over Block-RHT.

OrbitQuant sets a new state of the art in post-training quantization for diffusion models, achieving lossless or better-than-FP16 image quality at 4-bit weights and activations and remaining the sole functional method at 2-bit weights where all baselines collapse. On video generation, it leads overall consistency and most quality dimensions at both W4A6 and W4A4 precision. Ablation on rotation transforms reveals that randomized permutation Hadamard (RPBH) yields the best low-bit performance by effectively spreading outliers, with only a small speed overhead over other fast structured transforms.


AI로 AI 구축

아이디어에서 출시까지 — 무료 AI 코코딩, 즉시 사용 가능한 환경, 최적의 GPU 가격으로 AI 개발을 가속화하세요.

AI 협업 코딩
바로 사용 가능한 GPU
최적의 가격

HyperAI Newsletters

최신 정보 구독하기
한국 시간 매주 월요일 오전 9시 에 이번 주의 최신 업데이트를 메일로 발송합니다
이메일 서비스 제공: MailChimp