DiRotQ: Rotation-Aware Quantization for 4-bit Diffusion Transformers
Sayeh Sharify ⋅ Mahsa Salmani ⋅ Hesham Mostafa
Abstract
Diffusion Transformers achieve state-of-the-art image generation quality but incur substantial memory and computational costs at inference. While aggressive Post-Training Quantization (PTQ) to 4-bit precision offers significant efficiency gains, it often causes severe quality degradation. Existing approaches, including smoothing, mixed-precision, rotation, and low-rank residual methods, mitigate this degradation but still leave a noticeable gap to FP16/BF16 performance. We introduce *DiRotQ*, a W4A4 PTQ framework that addresses this gap through rotation-aware activation quantization. DiRotQ identifies a low-rank subspace capturing dominant activation variance via Principal Component Analysis (PCA), preserving this subspace at higher precision while quantizing the remaining components to 4-bit. At inference, activations are rotated into the PCA basis using calibration-derived orthogonal transformations, with the inverse rotation fused into the layer weights offline. Combined with GPTQ-based weight quantization, DiRotQ achieves an FID $(\downarrow)$ of $15.9$ and PSNR $(\uparrow)$ of $19.1$ dB on PixArt-$\Sigma$ over MJHQ-30K, outperforming SVDQuant (FID $18.9$, PSNR $17.6$) under the same INT W4A4 setting. We further adopt a VLM-as-a-Judge evaluation protocol for diffusion model quantization, providing a holistic assessment of perceptual quality and prompt alignment under aggressive compression. On the systems side, our *Triton-based custom kernel* enables efficient end-to-end inference, reducing memory usage of the 12B FLUX.1-dev model by $2.1\times$ and achieving a $2.3\times$ speedup over BF16 on an RTX 4090. On the RTX PRO 6000 with Blackwell architecture, DiRotQ achieves a $2.0\times$ speedup and $2.0\times$ memory reduction over BF16 using NVFP4. Our codebase is available [here](https://github.com/sayehsharify/DiRotQ).
Successful Page Load