TR-DQ: Time-Rotation Diffusion Quantization

Yihua Shao, Deyang Lin, Fanhu Zeng, Minxi Yan, Muyang Zhang, Siyu Chen, Yuxuan Fan, Ziyang Yan, Haozhe Wang, Jingcai Guo, Yan Wang, Haotong Qin, Hao TangarXiv 2025

Abstract

Diffusion models have been widely adopted in image and video generation. However, their complex network architecture leads to high inference overhead for its generation process. Existing diffusion quantization methods primarily focus on the quantization of the model structure while ignoring the impact of time-steps variation during sampling. At the same time, most current approaches fail to account for significant activations that cannot be eliminated, resulting in substantial performance degradation after quantization. To address these issues, we propose Time-Rotation Diffusion Quantization (TR-DQ), a novel quantization method incorporating time-step and rotation-based optimization. TR-DQ first divides the sampling process based on time-steps and applies a rotation matrix to smooth activations and weights dynamically. For different time-steps, a dedicated hyperparameter is introduced for adaptive timing modeling, which enables dynamic quantization across different time steps. Additionally, we also explore the compression potential of Classifier-Free Guidance (CFG-wise) to establish a foundation for subsequent work. TR-DQ achieves state-of-the-art (SOTA) performance on image generation and video generation tasks and a 1.38-1.89x speedup and 1.97-2.58x memory reduction in inference compared to existing quantization methods.

Introduction

Diffusion models (DMs) have revolutionized generative AI, yet their iterative denoising process imposes significant computational burdens, hindering deployment on edge devices. Standard quantization techniques often struggle with DMs due to two primary factors: massive activation outliers and the dynamic nature of activation distributions across different denoising time-steps. Furthermore, Classifier-Free Guidance (CFG), while critical for high-quality generation, effectively doubles the computational workload by requiring separate conditional and unconditional passes.

TR-DQ (Time-Rotation Diffusion Quantization) addresses these challenges by introducing time-step-aware rotation matrices to smooth activation outliers and an "Attention-Sharing" strategy to mitigate CFG overhead. This approach allows for high-quality generation at lower bit-widths with significantly reduced latency.

Methodology

The TR-DQ framework introduces three core innovations designed to handle the unique characteristics of diffusion models.

Time-Dependent Rotation Matrices

To combat activation outliers, TR-DQ utilizes orthogonal rotation matrices that "smooth" the activation space. By rotating activations, the quantization difficulty is shifted from spiky activations to more stable weights. Unlike static methods, TR-DQ adapts these matrices to specific time-steps, accounting for the evolving distribution of noise and features during the sampling process. This ensures that the quantization parameters remain optimal as the image or video emerges from the noise.

TR-DQ Methodology: Attention Sharing (left) reduces CFG redundancy, while Time-Rotation (center/right) smooths activation and weight distributions to facilitate low-bit quantization.

Zigzag Permutation

Efficiency is further enhanced through a block-diagonal rotation approach. A "zigzag permutation" is introduced to balance outlier distributions across blocks before rotation, preventing any single block from becoming a bottleneck for quantization accuracy. This ensures that the mathematical "smearing" of outliers is uniform across the model's channels.

Attention-Sharing (AS) for CFG

Analysis of CFG passes reveals high similarity between conditional and unconditional attention maps in many layers. TR-DQ implements Attention-Sharing, merging or sharing these maps to eliminate redundant computations. This strategy provides a significant speedup with minimal impact on visual fidelity, addressing the inherent overhead of guidance-based sampling.

Experimental Results

The proposed method was evaluated on image generation (PixArt-α on COCO) and video generation (Open-SORA on UCF-101) tasks using standard benchmarks including FID, CLIP score, and VBench.

Efficiency and Quality

TR-DQ achieves substantial improvements in inference efficiency without sacrificing state-of-the-art quality. In W4A8 (4-bit weight, 8-bit activation) configurations, the method provides a 1.38–1.89× speedup and a 1.97–2.58× reduction in peak memory usage compared to full-precision baselines.

TR-DQ performance overview: Visual results demonstrate high fidelity across bit-widths, while bar charts highlight significant gains in latency and memory efficiency.

As shown in Figure 1, TR-DQ (W4A8) maintains visual consistency and aesthetic quality comparable to the full-precision (FP16) baseline. On image tasks, TR-DQ achieved an FID of 75.12, outperforming existing methods like ViDiT-Q (75.98) at the same bit-width. On the VBench benchmark for video generation, TR-DQ remained remarkably close to the FP16 baseline in motion smoothness and aesthetic quality, whereas other 4-bit methods often experienced total performance collapse.

Conclusion

TR-DQ presents a robust solution for efficient diffusion model inference. By leveraging time-dependent rotation and attention sharing, it overcomes the hurdles of activation outliers and CFG redundancy. While Attention-Sharing introduces a minor quality trade-off and current implementations are optimized for NVIDIA GPUs, TR-DQ sets a new benchmark for post-training quantization in generative models. Future work will explore extreme quantization (e.g., W2A8) and broader hardware compatibility.

Summary updated

BibTeX
@misc{shao2025tr,
  author = {Yihua Shao and Deyang Lin and Fanhu Zeng and Minxi Yan and Muyang Zhang and Siyu Chen and Yuxuan Fan and Ziyang Yan and Haozhe Wang and Jingcai Guo and Yan Wang and Haotong Qin and Hao Tang},
  title = {{TR-DQ: Time-Rotation Diffusion Quantization}},
  year = {2025},
  eprint = {2503.06564},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2503.06564},
}
Figure