Abstract
Diffusion Transformers (DiTs) have emerged as a powerful alternative to traditional UNet architectures for high-quality image generation. However, their deployment is hindered by significant memory and compute requirements. This paper presents an analysis of Post-Training Quantization (PTQ) for DiTs, introducing a "zero-optimization" framework. By leveraging a novel 1-step sampling calibration for activations and group-wise quantization for weights, the authors demonstrate that DiTs can be compressed to 4-bit weights with minimal loss in image quality, bypassing the need for expensive fine-tuning or retraining.
Introduction
Diffusion models have revolutionized generative AI, but their iterative denoising process is computationally expensive. As the field shifts from the classic UNet architecture toward Diffusion Transformers (DiTs), the need for efficiency has never been greater. Researchers from Meta GenAI have investigated the specific challenges of quantizing these massive transformer-only models to make them run faster on edge devices without sacrificing creative fidelity.
The Challenge: Activation Instability and Weight Outliers
Post-Training Quantization (PTQ) typically converts 32-bit floating-point numbers (FP32) into lower-precision formats like 8-bit or 4-bit integers. While standard for UNets, PTQ often fails for DiTs because they lack the "shortcut connections" found in UNets and rely almost exclusively on linear layers.
Two primary hurdles were identified:
- Activation Instability: The range of values inside the transformer changes drastically across different steps of the denoising process.
- Weight Outliers: Extreme values in the model's weights can distort the precision of an entire layer when compressed to 4 bits.
Methodology: Zero-Optimization Quantization
The authors propose a strategy that requires no retraining, focusing on two pillars:
- 1-Step Sampling Calibration: Traditional calibration looks at many denoising steps. However, this research found that calibrating at the very first step of the reverse diffusion process—where noise is at its peak—produces the most robust parameters for the entire generation cycle. This "noise robustness" paradox suggests that the model is most resilient to quantization errors when input noise is highest.
- Group-wise Quantization: To handle weight outliers, the researchers divide each channel's weights into smaller groups (e.g., groups of 128). Each group is calibrated individually, preventing a single outlier from distorting the scale of an entire channel.
Key Insights and Results
The study proves that optimization-free quantization is viable for DiTs. Using the Pixart Alpha model and MS-COCO datasets, the researchers measured performance via Fréchet Inception Distance (FID) and Signal-to-Quantization-Noise Ratio (SQNR).
- 8-bit Weights/Activations (8A8W): Performed almost identically to the full-precision (FP32) model (FID 23.86 vs. 23.88).
- 8-bit Activations/4-bit Weights (8A4W): While standard 4-bit quantization failed (FID 225.09), the proposed 1-step calibration and group-wise quantization restored quality to an FID of 22.13, effectively matching or exceeding the 8-bit baseline.
Conclusion
This research demonstrates that with the right calibration strategy, Diffusion Transformers can be significantly compressed without the need for complex fine-tuning. While the study focused on conditional image generation, future work may extend these techniques to video generation and even lower-bit (2-bit) regimes, which currently still require optimization to maintain quality.
Summary updated