Post-training Quantization for Text-to-Image Diffusion Models with Progressive Calibration and Activation Relaxing

Fuente: arXiv
Guardado en:
Detalles Bibliográficos
Autores principales: Tang, Siao, Wang, Xin, Chen, Hong, Guan, Chaoyu, Wu, Zewen, Tang, Yansong, Zhu, Wenwu
Formato: Preprint
Publicado: 2023
Materias:
Acceso en línea:
Etiquetas: Agregar Etiqueta
Sin Etiquetas, Sea el primero en etiquetar este registro!
_version_ 1866916314525728768
author Tang, Siao
Wang, Xin
Chen, Hong
Guan, Chaoyu
Wu, Zewen
Tang, Yansong
Zhu, Wenwu
author_facet Tang, Siao
Wang, Xin
Chen, Hong
Guan, Chaoyu
Wu, Zewen
Tang, Yansong
Zhu, Wenwu
contents High computational overhead is a troublesome problem for diffusion models. Recent studies have leveraged post-training quantization (PTQ) to compress diffusion models. However, most of them only focus on unconditional models, leaving the quantization of widely-used pretrained text-to-image models, e.g., Stable Diffusion, largely unexplored. In this paper, we propose a novel post-training quantization method PCR (Progressive Calibration and Relaxing) for text-to-image diffusion models, which consists of a progressive calibration strategy that considers the accumulated quantization error across timesteps, and an activation relaxing strategy that improves the performance with negligible cost. Additionally, we demonstrate the previous metrics for text-to-image diffusion model quantization are not accurate due to the distribution gap. To tackle the problem, we propose a novel QDiffBench benchmark, which utilizes data in the same domain for more accurate evaluation. Besides, QDiffBench also considers the generalization performance of the quantized model outside the calibration dataset. Extensive experiments on Stable Diffusion and Stable Diffusion XL demonstrate the superiority of our method and benchmark. Moreover, we are the first to achieve quantization for Stable Diffusion XL while maintaining the performance.
format Preprint
id arxiv_https___arxiv_org_abs_2311_06322
institution arXiv
publishDate 2023
record_format arxiv
spellingShingle Post-training Quantization for Text-to-Image Diffusion Models with Progressive Calibration and Activation Relaxing
Tang, Siao
Wang, Xin
Chen, Hong
Guan, Chaoyu
Wu, Zewen
Tang, Yansong
Zhu, Wenwu
Computer Vision and Pattern Recognition
Machine Learning
High computational overhead is a troublesome problem for diffusion models. Recent studies have leveraged post-training quantization (PTQ) to compress diffusion models. However, most of them only focus on unconditional models, leaving the quantization of widely-used pretrained text-to-image models, e.g., Stable Diffusion, largely unexplored. In this paper, we propose a novel post-training quantization method PCR (Progressive Calibration and Relaxing) for text-to-image diffusion models, which consists of a progressive calibration strategy that considers the accumulated quantization error across timesteps, and an activation relaxing strategy that improves the performance with negligible cost. Additionally, we demonstrate the previous metrics for text-to-image diffusion model quantization are not accurate due to the distribution gap. To tackle the problem, we propose a novel QDiffBench benchmark, which utilizes data in the same domain for more accurate evaluation. Besides, QDiffBench also considers the generalization performance of the quantized model outside the calibration dataset. Extensive experiments on Stable Diffusion and Stable Diffusion XL demonstrate the superiority of our method and benchmark. Moreover, we are the first to achieve quantization for Stable Diffusion XL while maintaining the performance.
title Post-training Quantization for Text-to-Image Diffusion Models with Progressive Calibration and Activation Relaxing
topic Computer Vision and Pattern Recognition
Machine Learning
url https://arxiv.org/abs/2311.06322