arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2502.08690cs.LGcs.AIcs.CV
收藏

Skrr:用于内存高效文本到图像生成的跳过和重用语义编码器层

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

Seoul National University(首尔大学);Cornell Tech(康奈尔科技学院)

Hoigi Seo, Wongi Jeong, Jae-sun Seo, Se Young Chun

AI总结:

针对文本到图像扩散模型中文本编码器内存消耗过高(比去噪模块高8倍)的问题,提出Skrr剪枝策略,通过选择性跳过和重用语义编码器层减少内存使用,在保持图像质量的同时实现更优内存效率。

摘要:

文本到图像(T2I)扩散模型中的大规模文本编码器在根据文本提示生成高质量图像方面表现出色。与依赖多迭代步骤的去噪模块不同,文本编码器仅需单次前向传递即可生成文本嵌入。然而,尽管其对总推理时间和浮点运算(FLOPs)的贡献极小,但文本编码器的内存使用量显著更高,比去噪模块高多达八倍。为解决这种低效问题,我们提出跳过和重用语义编码器层(Skrr),这是一种专为T2I扩散模型中文本编码器设计的简单但有效的剪枝策略。Skrr通过选择性地跳过或重用语义编码器中的某些层(针对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.

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

↑