paper-with-me

홈 › Papers

PTQ4DiT: Post-training Quantization for Diffusion Transformers

2024-05-25 · Junyi Wu, Haoxuan Wang, Yuzhang Shang, Mubarak Shah, Yan Yan

The recent introduction of Diffusion Transformers (DiTs) has demonstrated exceptional capabilities in image generation by using a different backbone architecture, departing from traditional U-Nets and embracing the scalable nature of transformers. Despite their advanced capabilities, the wide deployment of DiTs, particularly for real-time applications, is currently hampered by considerable computational demands at the inference stage. Post-training Quantization (PTQ) has emerged as a fast and data-efficient solution that can significantly reduce computation and memory footprint by using low-bit weights and activations. However, its applicability to DiTs has not yet been explored and faces non-trivial difficulties due to the unique design of DiTs. In this paper, we propose PTQ4DiT, a specifically designed PTQ method for DiTs. We discover two primary quantization challenges inherent in DiTs, notably the presence of salient channels with extreme magnitudes and the temporal variability in distributions of salient activation over multiple timesteps. To tackle these challenges, we propose Channel-wise Salience Balancing (CSB) and Spearmen's $\rho$-guided Salience Calibration (SSC). CSB leverages the complementarity property of channel magnitudes to redistribute the extremes, alleviating quantization errors for both activations and weights. SSC extends this approach by dynamically adjusting the balanced salience to capture the temporal variations in activation. Additionally, to eliminate extra computational costs caused by PTQ4DiT during inference, we design an offline re-parameterization strategy for DiTs. Experiments demonstrate that our PTQ4DiT successfully quantizes DiTs to 8-bit precision (W8A8) while preserving comparable generation ability and further enables effective quantization to 4-bit weight precision (W4A8) for the first time.

📄 PDF Abstract BibTeX arXiv:2405.16005

Code (1)

adreamwu/ptq4dit 공식 구현 pytorch

Tasks

Image GenerationQuantization

Methods 이 논문이 사용한 방법론

Diffusion Diffusion models generate samples by gradually removing noise from a signal, and their training objective can be expressed as a reweighted variational lower-bound…

Similar Papers 제목 키워드 기반

Hardware-Friendly Static Quantization Method for Video Diffusion Transformers

2025-02-20 · Sanghyun Yi, Qingfeng Liu, Mostafa El-Khamy

Diffusion Transformers for video generation have gained significant research interest since the impressive performance of SORA. Efficient deployment of such generative-AI models on GPUs has been demonstrated with dynamic…

QuantizationVideo GenerationVisual Question Answering (VQA)

ViDiT-Q: Efficient and Accurate Quantization of Diffusion Transformers for Image and Video Generation

2024-06-04 · Tianchen Zhao, Tongcheng Fang, Enshu Liu, Rui Wan 외

Diffusion transformers (DiTs) have exhibited remarkable performance in visual generation tasks, such as generating realistic images or videos based on textual instructions. However, larger model sizes and multi-frame pro…

QuantizationVideo Generation

Q-DiT: Accurate Post-Training Quantization for Diffusion Transformers

2024-06-25 · CVPR 2025 1 · Lei Chen, Yuan Meng, Chen Tang, Xinzhu Ma 외

Recent advancements in diffusion models, particularly the architectural transformation from UNet-based models to Diffusion Transformers (DiTs), significantly improve the quality and scalability of image and video generat…

Image GenerationModel CompressionQuantizationVideo Generation

VQ4DiT: Efficient Post-Training Vector Quantization for Diffusion Transformers

2024-08-30 · Juncan Deng, Shuaiting Li, Zeyu Wang, Hong Gu 외

The Diffusion Transformers Models (DiTs) have transitioned the network architecture from traditional UNets to transformers, demonstrating exceptional capabilities in image generation. Although DiTs have been widely appli…

GPUImage GenerationQuantizationVideo Generation

DiTAS: Quantizing Diffusion Transformers via Enhanced Activation Smoothing

2024-09-12 · Zhenyuan Dong, Sai Qian Zhang

Diffusion Transformers (DiTs) have recently attracted significant interest from both industry and academia due to their enhanced capabilities in visual generation, surpassing the performance of traditional diffusion mode…

Image GenerationQuantization