PTQ4DiT: Post-training Quantization for Diffusion Transformers

Junyi Wu, Haoxuan Wang, Yuzhang Shang, Mubarak Shah, Yan Yan
2/3/2026

No official code found. Best implementation: Juanerx/Q-DiT (79 stars, last commit 2024-09-03). 1 more below.

Abstract

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.

View on arXivView PDF

Code Implementations(2)

adreamwu/PTQ4DiTCommunity100%

PyTorch implementation of PTQ4DiT https://arxiv.org/abs/2405.16005

503PythonSep 25, 20241 years ago
Juanerx/Q-DiTCommunity70%

[CVPR 2025] Q-DiT: Accurate Post-Training Quantization for Diffusion Transformers

795Shell, PythonMar 11, 20242 years ago

Similar Papers

Cite this paper

@article{wu2026ptqdit,
  title  = {PTQ4DiT: Post-training Quantization for Diffusion Transformers},
  author = {Junyi Wu and Haoxuan Wang and Yuzhang Shang and Mubarak Shah and Yan Yan},
  year   = {2026},
  eprint = {2405.16005},
  archivePrefix = {arXiv},
  doi    = {10.48550/arXiv.2405.16005},
  url    = {https://arxiv.org/abs/2405.16005},
  journal = {NEURIPS 2024 2024}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2405.16005.svg)](https://codeofpaper.com/paper/2405.16005)

Discussion