Diffusion transformers (DiTs) adopt Patchify, mapping patch representations to token representations through linear projections, to adjust the number of tokens input to DiT blocks and thus the computation cost. Instead of a single patch size for all the timesteps, we introduce a Pyramidal Patchification Flow (PPFlow) approach: Large patch sizes are used for high noise timesteps and small patch sizes for low noise timesteps; Linear projections are learned for each patch size; and Unpatchify is accordingly modified. Unlike Pyramidal Flow, our approach operates over full latent representations other than pyramid representations, and adopts the normal denoising process without requiring the renoising trick. We demonstrate the effectiveness of our approach through two training manners. Training from scratch achieves a $1.6\times$ ($2.0\times$) inference speed over SiT-B/2 for 2-level (3-level) pyramid patchification with slightly lower training FLOPs and similar image generation performance. Training from pretrained normal DiTs achieves even better performance with small training time. The code and checkpoint are at https://github.com/fudan-generative-vision/PPFlow.


翻译:扩散变换器(DiTs)采用分块化方法,通过线性投影将分块表示映射为标记表示,从而调整输入DiT块的标记数量及计算成本。不同于所有时间步采用单一分块尺寸,我们提出金字塔式分块化流程(PPFlow)方法:高噪声时间步使用大分块尺寸,低噪声时间步使用小分块尺寸;为每个分块尺寸学习独立的线性投影;并相应修改反分块化操作。与金字塔流方法不同,我们的方法基于完整潜在表示而非金字塔表示进行操作,并采用标准去噪过程而无需重新加噪技巧。我们通过两种训练方式验证了方法的有效性:从头训练时,2级(3级)金字塔分块化在训练FLOPs略低且图像生成性能相近的情况下,推理速度达到SiT-B/2的$1.6\times$($2.0\times$);基于预训练常规DiTs的微调训练能以较少训练时间获得更优性能。代码与检查点位于https://github.com/fudan-generative-vision/PPFlow。

0
下载
关闭预览

相关内容

基于扩散模型和流模型的推理时引导生成技术
专知会员服务
16+阅读 · 2025年4月30日
Sora的幕后功臣?详解大火的DiT:拥抱Transformer的扩散模型
【AAAI2024】SeTformer: 视觉与语言处理的理想选择"
专知会员服务
21+阅读 · 2024年1月13日
【CVPR2023】DiffCollage:用扩散模型并行生成大量内容
专知会员服务
28+阅读 · 2023年4月4日
百闻不如一码!手把手教你用Python搭一个Transformer
大数据文摘
18+阅读 · 2019年4月22日
超像素、语义分割、实例分割、全景分割 傻傻分不清?
计算机视觉life
19+阅读 · 2018年11月27日
视觉里程计:起源、优势、对比、应用
计算机视觉life
18+阅读 · 2017年7月17日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
VIP会员
相关基金
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
1+阅读 · 2014年12月31日
Top
微信扫码咨询专知VIP会员