开放词汇扩散模型永远地改变了图像生成的前景。然而,这些模型的核心是使用Transformers,这使得发电速度很慢。已经出现了更好的实现来增加这些Transformers的吞吐量,但它们仍然评估整个模型。在本文中,我们反而加快扩散模型,利用自然冗余生成的图像合并冗余令牌。在对令牌合并(ToMe)进行了一些特定于扩散的改进之后,我们的ToMe for Stable Diffusion可以将现有稳定扩散模型中的令牌数量减少多达60%,同时仍然可以生成高质量的图像,而无需任何额外的训练。在此过程中,我们将图像生成速度提高了2倍,并将内存消耗减少了5.6倍。此外,这通过xFormers等高效实现加快了堆栈速度,对质量的影响最小,同时对于大型图像的速度提高了5.4倍。代码可在https://github.com/dbolya/tomesd上获得。
英文摘要:
The landscape of image generation has been forever changed by open vocabulary diffusion models. However, at their core these models use transformers, which makes generation slow. Better implementations to increase the throughput of these transformers have emerged, but they still evaluate the entire model. In this paper, we instead speed up diffusion models by exploiting natural redundancy in generated images by merging redundant tokens. After making some diffusion-specific improvements to Token Merging (ToMe), our ToMe for Stable Diffusion can reduce the number of tokens in an existing Stable Diffusion model by up to 60% while still producing high quality images without any extra training. In the process, we speed up image generation by up to 2x and reduce memory consumption by up to 5.6x. Furthermore, this speed-up stacks with efficient implementations such as xFormers, minimally impacting quality while being up to 5.4x faster for large images. Code is available at https://github.com/dbolya/tomesd.
MergeTok: Unified Continuous and Discrete Visual Tokenization via Token Merging
Tsinghua University(清华大学);Westlake University(西湖大学);Zhejiang University(浙江大学);Hong Kong University of Science and Technology(香港科学与技术大学);OPPO;Shanghai AI Lab(上海人工智能实验室)
Variable-Length Tokenization via Learnable Global Merging for Diffusion Transformers
Kim Jaechul Graduate School of AI, KAIST, Daejeon, South Korea(韩国科学技术院金载哲人工智能研究生院,大田,韩国);School of Computing, KAIST, Daejeon, South Korea(韩国科学技术院计算学院,大田,韩国)
Attend to Not Attended: Structure-then-Detail Token Merging for Post-training DiT Acceleration
Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所);University of Chinese Academy of Sciences(中国科学院大学);National Cheng-Kung University(国立成功大学)
针对 DiT 推理计算昂贵的问题,本文提出训练后即插即用的 SDTM,依据“先结构后细节”先验动态合并冗余视觉 token,实现 1.55 倍加速且几乎不损失图像质量。
MergeVQ: A Unified Framework for Visual Generation and Representation with Disentangled Token Merging and Quantization
Zhejiang University(浙江大学);Tsinghua University(清华大学);Westlake University(西湖大学);The Hong Kong University of Science and Technology(香港科技大学);OPPO AI Center(OPPO人工智能中心);CAIR, HKISI-CAS(中国科学院香港中文大学深圳先进集成技术研究所);MAIS CASIA(中国科学院自动化研究所多模态人工智能系统实验室);University of Chinese Academy of Sciences(中国科学院大学)
Token Merging for Training-Free Semantic Binding in Text-to-Image Synthesis
Nankai University(南开大学);Computer Vision Center(计算机视觉中心);Universitat Autònoma de Barcelona(巴塞罗那自治大学);University of Chinese Academy of Sciences(中国科学院大学);Mohamed bin Zayed University of AI(穆罕默德·本·扎耶德人工智能大学);Linkoping University(林雪平大学);NKIARI(深圳市人工智能与机器人研究院)
LapMerge: Differentiable Exact-Budget Token Merging in Linear Time
Jagiellonian University in Kraków(克拉科夫雅盖隆大学);Institute of Fundamental Technological Research, Polish Academy of Sciences(波兰科学院基础技术研究所);Centre for Credible AI, Warsaw University of Technology(华沙理工大学可信人工智能中心)
Token Merging via Spatiotemporal Information Mining for Surgical Video Understanding
Department of Electronic and Computer Engineering, The Hong Kong University of Science and Technology(电子与计算机工程系,香港科学与技术大学);School of Electronic Information and Communications, Huazhong University of Science and Technology(电子信息与通信学院,华中科技大学)
ReToMe-VA: Recursive Token Merging for Video Diffusion-based Unrestricted Adversarial Attack
School of Computer Science, Fudan University(复旦大学计算机科学技术学院);Artificial Intelligence Innovation and Incubation Institute, Fudan University(复旦大学人工智能创新与孵化研究院)
DORA: Dynamic Online Reinforcement Agent for Token Merging in Vision Transformers
University of Science and Technology of China(中国科学技术大学);Institute of Artificial Intelligence, Hefei Comprehensive National Science Center(合肥国家科学中心人工智能研究院)
LiteVGGT: Boosting Vanilla VGGT via Geometry-aware Cached Token Merging
Nanjing University of Posts and Telecommunications(南京邮电大学);Horizon Robotics;Nanjing University(南京大学);Zhejiang University(浙江大学);Macau University of Science and Technology(澳门科技大学);TARS Robotics;China Mobile Zijin Innovation Institute(中国移动吉林创新研究院)
MergeOver: Post-Training Token Merging for Recursive Vision Transformers
University of Twente(特文特大学);Faculty of Engineering Technology, University of Twente(特文特大学工程技术学院);Computer Architecture for Embedded Systems, University of Twente(特文特大学嵌入式系统计算机架构实验室)
StructSAM: Structure- and Spectrum-Preserving Token Merging for Segment Anything Models
University of Stuttgart(斯图加特大学);DFKI;Max Planck Research School(马克斯·普朗克研究学校);University of Oldenburg(奥尔登堡大学);Technical University of Darmstadt(达姆施塔特技术大学);VinRobotics;VinUniversity(Vin大学);Aalto University(阿莱大学);Queensland University of Technology(昆士兰技术大学);HUST(华中科技大学);Technical University of Denmark(丹麦技术大学);University of Arkansas(阿肯色大学);UC San Diego(圣地亚哥大学);Stanford University(斯坦福大学)
Aalborg University(奥尔堡大学);Pioneer Centre for AI(人工智能先锋中心);Universitat de Barcelona(巴塞罗那大学);Computer Vision Center(计算机视觉中心);University of Guelph(圭尔夫大学);Vector Institute for AI(向量人工智能研究院)
TempMe: Video Temporal Token Merging for Efficient Text-Video Retrieval
School of Software, Tsinghua University(清华大学软件学院);BNRist, Tsinghua University(清华大学BNRist);Hangzhou Zhuoxi Institute of Brain and Intelligence(杭州浙西脑智研究院);GRG Banking Equipment Co., Ltd.(广电运通金融电子股份有限公司);South China University of Technology(华南理工大学)