Share your thoughts, 1 month free Claude Pro on usSee more
WorkDL logo mark

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

About

Diffusion transformers have demonstrated remarkable performance in visual generation tasks, such as generating realistic images or videos based on textual instructions. However, larger model sizes and multi-frame processing for video generation lead to increased computational and memory costs, posing challenges for practical deployment on edge devices. Post-Training Quantization (PTQ) is an effective method for reducing memory costs and computational complexity. When quantizing diffusion transformers, we find that existing quantization methods face challenges when applied to text-to-image and video tasks. To address these challenges, we begin by systematically analyzing the source of quantization error and conclude with the unique challenges posed by DiT quantization. Accordingly, we design an improved quantization scheme: ViDiT-Q (Video & Image Diffusion Transformer Quantization), tailored specifically for DiT models. We validate the effectiveness of ViDiT-Q across a variety of text-to-image and video models, achieving W8A8 and W4A8 with negligible degradation in visual quality and metrics. Additionally, we implement efficient GPU kernels to achieve practical 2-2.5x memory saving and a 1.4-1.7x end-to-end latency speedup.

Tianchen Zhao, Tongcheng Fang, Haofeng Huang, Enshu Liu, Rui Wan, Widyadewi Soedarmadji, Shiyao Li, Zinan Lin, Guohao Dai, Shengen Yan, Huazhong Yang, Xuefei Ning, Yu Wang• 2024

Related benchmarks

TaskDatasetResultRank
Text-to-Image GenerationGenEval
Overall Score66.75
517
Text-to-Image GenerationMJHQ-30K
Overall FID16.1
239
Text-to-Video GenerationVBench--
168
Video GenerationVBench--
126
Video Super-ResolutionUDM10
PSNR23.08
88
Video Super-ResolutionMVSR4x
PSNR22.56
49
Text-to-Video GenerationVBench (test)--
37
Text-to-Image GenerationsDCI
IR1.03
32
Text-to-Video GenerationWan 1.3B 2.1
CLIPSIM0.19
27
Image GenerationMJHQ 30K (test)
FID15.7
21
Showing 10 of 20 rows

Other info

Follow for update