Lune

NeurIPS2024顶会

Learning-to-Cache: Accelerating Diffusion Transformer via Layer Caching

Xinyin Ma, Gongfan Fang, Michael Bi Mi, Xinchao Wang

摘要

Diffusion Transformers have recently demonstrated unprecedented generative capabilities for various tasks. The encouraging results, however, come with the cost of slow inference, since each denoising step requires inference on a transformer model with a large scale of parameters. In this study, we make an interesting and somehow surprising observation: the computation of a large proportion of layers in the diffusion transformer, through introducing a caching mechanism, can be readily removed even without updating the model parameters. In the case of U-ViT-H/2, for example, we may remove up to 93.68% of the computation in the cache steps (46.84% for all steps), with less than 0.01 drop in FID. To achieve this, we introduce a novel scheme, named Learning-to-Cache (L2C), that learns to conduct caching in a dynamic manner for diffusion transformers. Specifically, by leveraging the identical structure of layers in transformers and the sequential nature of diffusion, we explore redundant computations between timesteps by treating each layer as the fundamental unit for caching. To address the challenge of the exponential search space in deep models for identifying layers to cache and remove, we propose a novel differentiable optimization objective. An input-invariant yet timestep-variant router is then optimized, which can finally produce a static computation graph. Experimental results show that L2C largely outperforms samplers such as DDIM and DPM-Solver, alongside prior cache-based methods at the same inference speed. Code is available at https://github.com/horseee/learning-to-cache

问 Lune

几分钟读透这篇 Paper,不用再花一下午。

Lune 能读完全文,也能读引用它的顶会 Paper,讲清它的结论、证据和局限,每一点都注明出自哪篇 Paper。不用硬啃,也不靠猜。

已有 75 篇顶会 Paper 引用了它。别等审稿人问起,先弄清它们发现了什么。

可以从这些问题问起

Lune 可以查阅

全文 · 引用它的顶会 Paper · 相关的 Paper

获取答案

免费开始,无需绑卡

脉络

  • High-Resolution Image Synthesis with Latent Diffusion Models 引用了 Diffusion Models Beat GANs on Image Synthesis
  • High-Resolution Image Synthesis with Latent Diffusion Models 引用了 Denoising Diffusion Probabilistic Models
  • High-Resolution Image Synthesis with Latent Diffusion Models 引用了 Denoising Diffusion Implicit Models
  • Diffusion Models Beat GANs on Image Synthesis 引用了 Denoising Diffusion Probabilistic Models
  • Diffusion Models Beat GANs on Image Synthesis 引用了 Denoising Diffusion Implicit Models
  • Autoregressive Adversarial Post-Training for Real-Time Interactive Video Generation 引用了 Denoising Diffusion Probabilistic Models
  • dKV-Cache: The Cache for Diffusion Language Models 引用了 Denoising Diffusion Probabilistic Models
  • LazyDiT: Lazy Learning for the Acceleration of Diffusion Transformers 引用了 An Image is Worth 16x16 Words: Transformers for Image Recognition at Scale
  • LazyDiT: Lazy Learning for the Acceleration of Diffusion Transformers 引用了 Diffusion Models Beat GANs on Image Synthesis
  • LazyDiT: Lazy Learning for the Acceleration of Diffusion Transformers 引用了 Denoising Diffusion Probabilistic Models
  • LazyDiT: Lazy Learning for the Acceleration of Diffusion Transformers 引用了 Denoising Diffusion Implicit Models
  • Denoising Diffusion Implicit Models 引用了 Denoising Diffusion Probabilistic Models
  • MagCache: Fast Video Generation with Magnitude-Aware Cache 引用了 High-Resolution Image Synthesis with Latent Diffusion Models
  • MagCache: Fast Video Generation with Magnitude-Aware Cache 引用了 Diffusion Models Beat GANs on Image Synthesis
  • MagCache: Fast Video Generation with Magnitude-Aware Cache 引用了 Denoising Diffusion Probabilistic Models
它引用的引用它的从左到右按年份排列,引用越多,位置越高。

引用它的顶会 Paper75

  1. dKV-Cache: The Cache for Diffusion Language ModelsXinyin Ma, Runpeng Yu, Gongfan Fang, Xinchao WangNeurIPS 2025 · 145 次引用
  2. Autoregressive Adversarial Post-Training for Real-Time Interactive Video GenerationShanchuan Lin, Ceyuan Yang, Hao He, Jianwen Jiang 等NeurIPS 2025 · 89 次引用
  3. SP-VLA: A Joint Model Scheduling and Token Pruning Approach for VLA Model AccelerationYe Li, Yuan Meng, Zewen Sun, Kangye Ji 等ICLR 2026 · 60 次引用
  4. MagCache: Fast Video Generation with Magnitude-Aware CacheZehong Ma, Longhui Wei, Feng Wang, Shiliang Zhang 等NeurIPS 2025 · 41 次引用
  5. LazyDiT: Lazy Learning for the Acceleration of Diffusion TransformersXuan Shen, Zhao Song, Yufa Zhou, Bo Chen 等AAAI 2025 · 40 次引用

它引用的 Paper39

  1. Denoising Diffusion Probabilistic ModelsJonathan Ho, Ajay Jain, Pieter AbbeelNeurIPS 2020 · 35,902 次引用
  2. An Image is Worth 16x16 Words: Transformers for Image Recognition at ScaleAlexey Dosovitskiy, Lucas Beyer, Alexander Kolesnikov, Dirk Weissenborn 等ICLR 2021 · 21,477 次引用
  3. Diffusion Models Beat GANs on Image SynthesisPrafulla Dhariwal, Alexander Quinn NicholNeurIPS 2021 · 13,211 次引用
  4. High-Resolution Image Synthesis with Latent Diffusion ModelsRobin Rombach, Andreas Blattmann, Dominik Lorenz, Patrick Esser 等CVPR 2022 · 13,123 次引用
  5. Denoising Diffusion Implicit ModelsJiaming Song, Chenlin Meng, Stefano ErmonICLR 2021 · 11,743 次引用

相关 Paper

  1. Cache Me if You Can: Accelerating Diffusion Models through Block CachingFelix Wimbauer, Bichen Wu, Edgar Schönfeld, Xiaoliang Dai 等CVPR 2024 · 25 次引用
  2. Beyond Fixed Formulas: Data-Driven Linear Predictor for Efficient Diffusion ModelsZhirong Shen, Rui Huang, Jiacheng Liu, Chang Zou 等CVPR 2026 · 1 次引用
  3. DiffSparse: Accelerating Diffusion Transformers with Learned Token SparsityHaowei Zhu, Ji Liu, Ziqiong Liu, Dong Li 等ICLR 2026 · 2 次引用
  4. DeepCache: Accelerating Diffusion Models for FreeXinyin Ma, Gongfan Fang, Xinchao WangCVPR 2024 · 87 次引用
  5. Diffusion on Demand: Selective Caching and Modulation for Efficient GenerationHee Min Choi, Hyoa Kang, Dokwan Oh, Nam Ik ChoNeurIPS 2025 · 2 次引用
黄昏的海面,两侧是细线勾勒的悬崖