2024-11-28 · 进阶 · 机器学习 · 计算机视觉

Collaborative Decoding Makes Visual Auto-Regressive Modeling Efficient

该论文提出了一种名为CoDe的协同解码策略,有效提高了视觉自回归建模的效率,同时保持了图像生成质量。

更新于 2024-11-28。作者:Zigeng Chen、Xinyin Ma、Gongfan Fang、Xinchao Wang。

中文摘要

在图像生成快速发展的领域,视觉自回归(VAR)建模因其创新的下一尺度预测方法而受到了广泛关注。这一范式在效率、可扩展性和零样本泛化方面带来了显著改进。然而,VAR固有的从粗到细的特性导致标记序列过长,从而造成内存消耗巨大和计算冗余。为了解决这些瓶颈,我们提出了协同解码(CoDe),这是一种针对VAR框架的新型高效解码策略。CoDe利用了两个关键观察结果:在较大尺度上的参数需求显著减少以及不同尺度间的独特生成模式。基于这些洞察,我们将多尺度推理过程划分为大模型和小模型之间的无缝协作。大模型充当“草图画家”,专注于在小尺度上生成低频内容,而小模型充当“细化者”,仅专注于在大尺度上预测高频细节。这种协作在保证质量的前提下显著提高了效率:CoDe实现了1.7倍的速度提升,内存使用量降低了约50%,并且仅使FID从1.95上升到1.98,对图像质量的影响微乎其微。当进一步减少草图步骤时,CoDe可以达到惊人的2.9倍加速比,在单个NVIDIA 4090 GPU上以256x256分辨率达到41图像/秒,同时保持可嘉的FID 2.27。代码可在https://github.com/czg1225/CoDe上获取。

英文摘要

In the rapidly advancing field of image generation, Visual Auto-Regressive (VAR) modeling has garnered considerable attention for its innovative next-scale prediction approach. This paradigm offers substantial improvements in efficiency, scalability, and zero-shot generalization. Yet, the inherently coarse-to-fine nature of VAR introduces a prolonged token sequence, leading to prohibitive memory consumption and computational redundancies. To address these bottlenecks, we propose Collaborative Decoding (CoDe), a novel efficient decoding strategy tailored for the VAR framework. CoDe capitalizes on two critical observations: the substantially reduced parameter demands at larger scales and the exclusive generation patterns across different scales. Based on these insights, we partition the multi-scale inference process into a seamless collaboration between a large model and a small model. The large model serves as the 'drafter', specializing in generating low-frequency content at smaller scales, while the smaller model serves as the 'refiner', solely focusing on predicting high-frequency details at larger scales. This collaboration yields remarkable efficiency with minimal impact on quality: CoDe achieves a 1.7x speedup, slashes memory usage by around 50%, and preserves image quality with only a negligible FID increase from 1.95 to 1.98. When drafting steps are further decreased, CoDe can achieve an impressive 2.9x acceleration ratio, reaching 41 images/s at 256x256 resolution on a single NVIDIA 4090 GPU, while preserving a commendable FID of 2.27. The code is available at https://github.com/czg1225/CoDe

解读

一句话总结

该论文提出了一种名为CoDe的协同解码策略,有效提高了视觉自回归建模的效率,同时保持了图像生成质量。

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

• 问题背景:Visual Auto-Regressive (VAR) 模型在图像生成领域表现出色,但其在多尺度预测过程中的长序列结构导致了内存消耗和计算冗余。 • 现有方案不足:现有方法无法有效减少VAR模型的长序列导致的内存消耗和计算成本。 • 研究目标:提出一种新的解码策略,以减少VAR模型的内存消耗和计算成本,同时保持图像生成质量。

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

• 技术创新:CoDe通过将多尺度推理过程分解为大型模型和小型模型的协同工作,实现了高效的解码。 • 方法改进:CoDe利用了不同尺度下参数需求的变化和生成模式的独特性,通过分解推理过程来优化效率。 • 优势:CoDe实现了1.7倍的速度提升,将内存使用量减少了约50%,同时图像质量只略有下降(FID从1.95增加到1.98)。

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

• 关键实验:与原始VAR-d30模型相比,CoDe在ImageNet 256x256分辨率下实现了1.7倍的速度提升,同时只使用了0.5倍的GPU内存空间。 • 性能提升:CoDe将速度提升了1.7倍,内存消耗减少了50%,FID只略有增加。 • 对比结果:CoDe在效率和图像质量之间取得了最佳平衡,优于其他评估方法。

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

• 应用场景:CoDe适用于需要高效图像生成的场景,如高分辨率图像生成、实时图像编辑等。 • 实施建议:CoDe可以集成到现有的图像生成系统中,以实现更快的图像生成速度和更低的内存占用。 • 局限与展望:CoDe需要两个不同规模的模型,未来研究可以探索如何在没有额外训练的情况下实现更高效的模型协同。

来源

机器可读索引:llms.txt