2025-02-14 · 专家 · 计算机视觉 · 机器学习

Skrr: Skip and Re-use Text Encoder Layers for Memory Efficient Text-to-Image Generation

该论文提出了一种名为Skrr的轻量级文本编码器压缩方法,用于文本到图像(T2I)扩散模型,通过跳过或重用某些层来减少内存消耗,同时保持图像质量和性能。

更新于 2025-02-18。作者:Hoigi Seo、Wongi Jeong、Jae-sun Seo、Se Young Chun。

中文摘要

大规模文本编码器在文本到图像(T2I)扩散模型中表现出色,能够从文本提示生成高质量图像。与依赖多个迭代步骤的降噪模块不同,文本编码器只需进行单次正向传递就能产生文本嵌入。然而,尽管文本编码器对总推理时间和浮点运算(FLOPs)的贡献最小,但其内存占用却显著较高,是降噪模块的八倍之多。为了解决这一低效问题,我们提出了跳过和复用层(Skrr),这是一种简单而有效的剪枝策略,专门针对T2I扩散模型中的文本编码器。Skrr通过选择性地跳过或复用某些层,利用了Transformer块内在的冗余性,以适应T2I任务的方式进行剪枝,从而在不影响性能的前提下降低内存消耗。大量的实验表明,即使在高稀疏度水平下,Skrr也能保持与原始模型相当的质量,并优于现有的块状剪枝方法。此外,Skrr在多个评估指标上实现了最先进的内存效率,包括FID、CLIP、DreamSim和GenEval得分,同时保持了性能。

英文摘要

Large-scale text encoders in text-to-image (T2I) diffusion models have demonstrated exceptional performance in generating high-quality images from textual prompts. Unlike denoising modules that rely on multiple iterative steps, text encoders require only a single forward pass to produce text embeddings. However, despite their minimal contribution to total inference time and floating-point operations (FLOPs), text encoders demand significantly higher memory usage, up to eight times more than denoising modules. To address this inefficiency, we propose Skip and Re-use layers (Skrr), a simple yet effective pruning strategy specifically designed for text encoders in T2I diffusion models. Skrr exploits the inherent redundancy in transformer blocks by selectively skipping or reusing certain layers in a manner tailored for T2I tasks, thereby reducing memory consumption without compromising performance. Extensive experiments demonstrate that Skrr maintains image quality comparable to the original model even under high sparsity levels, outperforming existing blockwise pruning methods. Furthermore, Skrr achieves state-of-the-art memory efficiency while preserving performance across multiple evaluation metrics, including the FID, CLIP, DreamSim, and GenEval scores.

解读

一句话总结

该论文提出了一种名为Skrr的轻量级文本编码器压缩方法,用于文本到图像(T2I)扩散模型,通过跳过或重用某些层来减少内存消耗,同时保持图像质量和性能。

问题1:这篇论文想要解决什么具体问题?

问题2:论文的核心创新点是什么?

问题3:实验结果如何验证了方法的有效性?

问题4:这个研究的实际应用价值是什么?

来源