Introduction
Diffusion Models (DMs) have set new standards in generative AI, yet their deployment on edge devices remains challenging due to high computational and memory requirements. Post-Training Quantization (PTQ) is a common strategy to mitigate these costs, but standard approaches often struggle to maintain image fidelity when bit-widths drop below 4 bits. In this work, researchers introduce Qua2SeDiMo, a framework that leverages Graph Neural Networks (GNNs) to identify and protect the most "fragile" components of a diffusion model, enabling high-quality generation at sub-4-bit precision.
The Challenge of Uniform Quantization
Modern diffusion architectures, particularly Diffusion Transformers (DiTs), consist of numerous layers with varying degrees of sensitivity to numerical precision. Standard PTQ methods typically apply a uniform bit-width across all layers, which is inherently inefficient. Some layers can tolerate 3-bit precision without noticeable degradation, while others—the "weak links"—require higher precision to prevent the generation of visual artifacts. Existing sensitivity metrics, such as those based on the Hessian of weights, often fail to correlate accurately with final image quality metrics like Fréchet Inception Distance (FID).
Methodology: Graph-Based Sensitivity Analysis
Qua2SeDiMo treats the denoiser (whether a U-Net or a DiT) as a Directed Acyclic Graph (DAG). This representation allows the framework to analyze the model's structure and data flow comprehensively.
The framework follows a three-step process:
- Graph Representation: The model is mapped to a DAG where nodes represent operations (e.g., Linear, Conv2d) and edges represent data flow.
- GNN Performance Prediction: A GNN is trained on a small sample of random quantization configurations to predict the resulting FID.
- Explainable Attribution: By employing a ranking loss during training, the GNN learns to attribute the final performance score back to individual nodes. This generates a "sensitivity score" for every layer, identifying which blocks are most critical to maintain at higher precision.
Key Insights into Model Architecture
The analysis revealed several critical architectural patterns:
- Time-step Embeddings (t-Embed): These layers are consistently highly sensitive. Aggressive quantization here causes the model to lose temporal coherence during denoising.
- U-Net vs. DiT: ResNet blocks in U-Nets are generally more sensitive than Transformer blocks. Furthermore, DiTs show high sensitivity in their final output layers, unlike U-Nets.
- Method Preference: U-Nets typically perform better with uniform, scale-based quantization (UAQ), whereas DiTs favor cluster-based methods like K-Means.
Experimental Results
Qua2SeDiMo was evaluated across diverse models including PixArt-α, PixArt-Σ, Hunyuan-DiT, and SDXL. The framework consistently outperformed state-of-the-art baselines such as Q-Diffusion and ViDiT-Q.
Notably, Qua2SeDiMo achieved high-quality results at average bit-widths as low as 3.4 bits for PixArt-α and 3.7 bits for SDXL. In many cases, the mixed-precision configurations identified by the framework even surpassed the FID of full-precision models, suggesting that strategic quantization can serve as a form of regularization. Human preference studies further validated these findings, with users preferring Qua2SeDiMo-generated images by a significant margin over other 4-bit quantized alternatives.
Conclusion
By moving away from uniform quantization and adopting a graph-based sensitivity analysis, Qua2SeDiMo provides a robust path toward deploying high-fidelity diffusion models on resource-constrained hardware. The ability to automatically discover optimal mixed-precision configurations at sub-4-bit levels represents a significant step forward in making generative AI more accessible and efficient.
Summary updated