arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2501.04304cs.CVcs.LG
收藏

DGQ:面向文本到图像扩散模型的分布感知分组量化

DGQ: Distribution-Aware Group Quantization for Text-to-Image Diffusion Models

Korea Advanced Institute of Science and Technology (KAIST)(韩国科学技术院(KAIST))

Hyogon Ryu, NaHyeon Park, Hyunjung Shim

AI总结:

针对文本到图像扩散模型量化中低位时图像质量与文本-图像对齐难以兼顾的问题,提出DGQ方法,通过处理激活异常值和应用提示特定对数量化尺度,在无需微调权重量化参数的情况下实现低位量化并在数据集上表现出色。

摘要:

尽管文本到图像扩散模型在各类任务中广泛应用,但其计算和内存需求限制了实际应用。为缓解这一问题,研究者已探索扩散模型的量化方法,该方法通过将权重和激活压缩为低位格式来降低内存占用和计算成本。然而,现有方法在保留图像质量和文本-图像对齐方面常面临挑战,尤其是在低位(<8位)量化中。本文从分布视角分析了文本到图像扩散模型量化的相关挑战,分析表明激活异常值对图像质量起关键作用,同时发现交叉注意力得分的独特模式显著影响文本-图像对齐。为应对这些挑战,我们提出分布感知分组量化(DGQ)方法,该方法识别并自适应处理逐像素和逐通道异常值以保留图像质量,此外,DGQ应用提示特定的对数量化尺度以维持文本-图像对齐。我们的方法在MS-COCO和PartiPrompts等数据集上表现出色,是首个无需额外微调权重量化参数即可成功实现文本到图像扩散模型低位量化的方法。代码可在https://github.com/ugonfor/DGQ获取。

英文摘要:

Despite the widespread use of text-to-image diffusion models across various tasks, their computational and memory demands limit practical applications. To mitigate this issue, quantization of diffusion models has been explored. It reduces memory usage and computational costs by compressing weights and activations into lower-bit formats. However, existing methods often struggle to preserve both image quality and text-image alignment, particularly in lower-bit($<$ 8bits) quantization. In this paper, we analyze the challenges associated with quantizing text-to-image diffusion models from a distributional perspective. Our analysis reveals that activation outliers play a crucial role in determining image quality. Additionally, we identify distinctive patterns in cross-attention scores, which significantly affects text-image alignment. To address these challenges, we propose Distribution-aware Group Quantization (DGQ), a method that identifies and adaptively handles pixel-wise and channel-wise outliers to preserve image quality. Furthermore, DGQ applies prompt-specific logarithmic quantization scales to maintain text-image alignment. Our method demonstrates remarkable performance on datasets such as MS-COCO and PartiPrompts. We are the first to successfully achieve low-bit quantization of text-to-image diffusion models without requiring additional fine-tuning of weight quantization parameters. Code is available at https://github.com/ugonfor/DGQ.

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑