Diffusion Transformers (DiTs) have achieved state-of-the-art performance in image and video generation, but their success comes at the cost of heavy computation. This inefficiency is largely due to the fixed tokenization process, which uses constant-sized patches throughout the entire denoising phase, regardless of the content's complexity. We propose dynamic tokenization, an efficient test-time strategy that varies patch sizes based on content complexity and the denoising timestep. Our key insight is that early timesteps only require coarser patches to model global structure, while later iterations demand finer (smaller-sized) patches to refine local details. During inference, our method dynamically reallocates patch sizes across denoising steps for image and video generation and substantially reduces cost while preserving perceptual generation quality. Extensive experiments demonstrate the effectiveness of our approach: it achieves up to $3.52\times$ and $3.2\times$ speedup on FLUX-1.Dev and Wan $2.1$, respectively, without compromising the generation quality and prompt adherence.


翻译:扩散Transformer(DiTs)在图像和视频生成领域已取得最先进的性能,但其成功伴随着沉重的计算代价。这种低效性很大程度上源于固定的标记化过程,该过程在整个去噪阶段使用恒定大小的图像块,而忽略了内容复杂性。我们提出动态标记化,一种高效的测试时策略,它根据内容复杂度和去噪时间步动态调整图像块大小。我们的核心见解是:早期时间步仅需较粗的图像块来建模全局结构,而后续迭代则需要更精细(尺寸更小)的图像块来优化局部细节。在推理过程中,我们的方法为图像和视频生成动态地重新分配去噪步骤间的图像块大小,在保持感知生成质量的同时显著降低了计算成本。大量实验证明了我们方法的有效性:在FLUX-1.Dev和Wan 2.1上分别实现了高达$3.52\times$和$3.2\times$的加速,且未损害生成质量与提示遵循度。

0
下载
关闭预览

相关内容

Sora的幕后功臣?详解大火的DiT:拥抱Transformer的扩散模型
详解扩散模型:从DDPM到稳定扩散,附Slides与视频
专知会员服务
87+阅读 · 2022年10月9日
【Google】高效Transformer综述,Efficient Transformers: A Survey
专知会员服务
66+阅读 · 2022年3月17日
深度学习的下一步:Transformer和注意力机制
云头条
56+阅读 · 2019年9月14日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
多图带你读懂 Transformers 的工作原理
AI研习社
10+阅读 · 2019年3月18日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Arxiv
0+阅读 · 2月15日
VIP会员
相关基金
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
7+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
12+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员