Diffusion models have transformed image synthesis by establishing unprecedented quality and creativity benchmarks. Nevertheless, their large-scale deployment faces challenges due to computationally intensive iterative denoising processes. Although post-training quantization (PTQ) provides an effective pathway for accelerating sampling, the iterative nature of diffusion models causes stepwise quantization errors to accumulate progressively during generation, inevitably compromising output fidelity. To address this challenge, we develop a theoretical framework that mathematically formulates error propagation in Diffusion Models (DMs), deriving per-step quantization error propagation equations and establishing the first closed-form solution for cumulative error. Building on this theoretical foundation, we propose a timestep-aware cumulative error compensation scheme. Extensive experiments on multiple image datasets demonstrate that our compensation strategy effectively mitigates error propagation, significantly enhancing existing PTQ methods. Specifically, it achieves a 1.2 PSNR improvement over SVDQuant on SDXL W4A4, while incurring only an additional $<$ 0.5\% time overhead.
翻译:扩散模型通过建立前所未有的质量和创造力基准,彻底改变了图像合成领域。然而,由于其计算密集的迭代去噪过程,其大规模部署面临挑战。尽管训练后量化(PTQ)为加速采样提供了有效途径,但扩散模型的迭代特性导致逐步量化误差在生成过程中逐渐累积,不可避免地损害输出保真度。为应对这一挑战,我们开发了一个理论框架,从数学上形式化扩散模型中的误差传播,推导出每步量化误差传播方程,并建立了首个累积误差的闭式解。基于此理论基础,我们提出了一种时间步感知的累积误差补偿方案。在多个图像数据集上的大量实验表明,我们的补偿策略能有效缓解误差传播,显著增强了现有PTQ方法的性能。具体而言,在SDXL W4A4配置下,相较于SVDQuant方法,该方法实现了1.2 PSNR的提升,同时仅带来额外<0.5%的时间开销。