Efficiency Meets Fidelity: A Novel Quantization Framework for Stable Diffusion

Shuaiting Li, Juncan Deng, Zeyu Wang, Kedong Xu, Rongtao Deng +3 more
12/9/2024
cs.CV

No confident code implementation found for this paper.

Abstract

Text-to-image generation via Stable Diffusion models (SDM) have demonstrated remarkable capabilities. However, their computational intensity, particularly in the iterative denoising process, hinders real-time deployment in latency-sensitive applications. While Recent studies have explored post-training quantization (PTQ) and quantization-aware training (QAT) methods to compress Diffusion models, existing methods often overlook the consistency between results generated by quantized models and those from floating-point models. This consistency is paramount for professional applications where both efficiency and output reliability are essential. To ensure that quantized SDM generates high-quality and consistent images, we propose an efficient quantization framework for SDM. Our framework introduces a Serial-to-Parallel pipeline that simultaneously maintains training-inference consistency and ensures optimization stability. Building upon this foundation, we further develop several techniques including multi-timestep activation quantization, time information precalculation, inter-layer distillation, and selective freezing, to achieve high-fidelity generation in comparison to floating-point models while maintaining quantization efficiency. Through comprehensive evaluation across multiple Stable Diffusion variants (v1-4, v2-1, XL 1.0, and v3), our method demonstrates superior performance over state-of-the-art approaches with shorter training times. Under W4A8 quantization settings, we achieve significant improvements in both distribution similarity and visual fidelity, while preserving a high image quality.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2024efficiency,
  title  = {Efficiency Meets Fidelity: A Novel Quantization Framework for Stable Diffusion},
  author = {Shuaiting Li and Juncan Deng and Zeyu Wang and Kedong Xu and Rongtao Deng and Hong Gu and Haibin Shen and Kejie Huang},
  year   = {2024},
  eprint = {2412.06661},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2412.06661v2}
}

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/2412.06661.svg)](https://codeofpaper.com/paper/2412.06661)

Discussion