Token-Shuffle: Towards High-Resolution Image Generation with Autoregressive Models
Token-Shuffle提出了一种新的方法,通过减少图像标记的数量来提高自回归模型在生成高分辨率图像时的效率和性能。
更新于 2025-04-25。作者:Xu Ma、Peize Sun、Haoyu Ma、Hao Tang、Chih-Yao Ma、Jialiang Wang、Kunpeng Li、Xiaoliang Dai、Yujun Shi、Xuan Ju、Yushi Hu、Artsiom Sanakoyeu、Felix Juefei-Xu、Ji Hou、Junjiao Tian、Tao Xu、Tingbo Hou、Yen-Cheng Liu、Zecheng He、Zijian He、Matt Feiszli、Peizhao Zhang、Peter Vajda、Sam Tsai、Yun Fu。
中文摘要
自回归(AR)模型在语言生成领域长期占据主导地位,但其在图像合成领域的应用越来越多地被认为不如基于扩散的模型具有竞争力。一个主要限制是AR模型需要大量的图像token,这限制了训练和推理的效率,以及图像的分辨率。为了解决这个问题,我们提出了一种新颖而简单的方法——Token-Shuffle,它减少了Transformer中的图像token数量。我们的关键洞察是,在多模态大型语言模型(MLLMs)中视觉词汇的维度冗余,其中来自视觉编码器的低维视觉代码直接映射到高维语言词汇。利用这一点,我们考虑了两个关键操作:token-shuffle,它通过沿通道维度合并空间上局部的token来减少输入token数量;以及token-unshuffle,它在Transformer块之后解开推断出的token,以恢复输出时的空间排列。与文本提示联合训练,我们的策略不需要额外的预训练文本编码器,并使得MLLMs能够以统一的下一个token预测方式支持极高分辨率的图像合成,同时保持高效的训练和推理。首次,我们将AR文本到图像生成的界限推到了2048x2048的分辨率,并取得了令人满意的生成性能。在GenAI基准测试中,我们的27亿参数模型在困难提示下取得了0.77的整体分数,超过了LlamaGen AR模型0.18分,以及LDM扩散模型0.15分。大规模的人类评估也充分证明了我们在文本对齐、视觉瑕疵和视觉外观方面的突出图像生成能力。我们希望Token-Shuffle能够成为MLLMs中高效高分辨率图像生成的基石设计。
英文摘要
Autoregressive (AR) models, long dominant in language generation, are increasingly applied to image synthesis but are often considered less competitive than Diffusion-based models. A primary limitation is the substantial number of image tokens required for AR models, which constrains both training and inference efficiency, as well as image resolution. To address this, we present Token-Shuffle, a novel yet simple method that reduces the number of image tokens in Transformer. Our key insight is the dimensional redundancy of visual vocabularies in Multimodal Large Language Models (MLLMs), where low-dimensional visual codes from visual encoder are directly mapped to high-dimensional language vocabularies. Leveraging this, we consider two key operations: token-shuffle, which merges spatially local tokens along channel dimension to decrease the input token number, and token-unshuffle, which untangles the inferred tokens after Transformer blocks to restore the spatial arrangement for output. Jointly training with textual prompts, our strategy requires no additional pretrained text-encoder and enables MLLMs to support extremely high-resolution image synthesis in a unified next-token prediction way while maintaining efficient training and inference. For the first time, we push the boundary of AR text-to-image generation to a resolution of 2048x2048 with gratifying generation performance. In GenAI-benchmark, our 2.7B model achieves 0.77 overall score on hard prompts, outperforming AR models LlamaGen by 0.18 and diffusion models LDM by 0.15. Exhaustive large-scale human evaluations also demonstrate our prominent image generation ability in terms of text-alignment, visual flaw, and visual appearance. We hope that Token-Shuffle can serve as a foundational design for efficient high-resolution image generation within MLLMs.
解读
一句话总结
Token-Shuffle提出了一种新的方法,通过减少图像标记的数量来提高自回归模型在生成高分辨率图像时的效率和性能。
问题1:这篇论文想要解决什么具体问题?
- 问题背景:自回归模型在图像合成中的应用日益增多,但通常被认为不如基于扩散的模型具有竞争力。主要限制是AR模型需要的图像标记数量众多,这限制了训练和推理效率,以及图像分辨率。
- 现有方案不足:AR模型需要的标记数量多,导致训练和推理效率低下,同时限制了图像分辨率。
- 研究目标:提出Token-Shuffle方法,减少Transformer中的图像标记数量,实现高效的高分辨率图像生成。
问题2:论文的核心创新点是什么?
- 技术创新:Token-Shuffle,一种通过合并空间上局部标记来减少输入标记数量的方法。
- 方法改进:利用视觉词汇的多维冗余,通过合并和分离标记来降低计算成本。
- 优势:与现有方法相比,Token-Shuffle显著降低了计算成本,同时保持了高质量的图像生成。
问题3:实验结果如何验证了方法的有效性?
- 关键实验:在GenAI-benchmark上,2.7B模型在硬提示上取得了0.77的总分,优于LlamaGen模型0.18,优于LDM模型0.15。
- 性能提升:Token-Shuffle将AR文本到图像生成的分辨率提升到了2048×2048,同时保持了高效的训练和推理。
- 对比结果:与基线方法相比,Token-Shuffle在文本对齐、视觉瑕疵和视觉外观方面均表现出优异的性能。
问题4:这个研究的实际应用价值是什么?
- 应用场景:适用于需要高效高分辨率图像生成的场景,如广告、娱乐和艺术创作。
- 实施建议:结合文本提示和预训练的LLM,使用Token-Shuffle进行图像生成。
- 局限与展望:尽管Token-Shuffle在提高图像生成效率和性能方面取得了显著成果,但仍然存在视觉瑕疵和全局交互限制等问题。未来研究可以探索在保持自回归框架的同时,实现全局交互的方法。
来源
机器可读索引:llms.txt