paper-with-me

Papers

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

2024-06-03 · 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

📄 PDF Abstract BibTeX arXiv:2406.01733

Code (1)

horseee/learning-to-cache 공식 구현 pytorch

Tasks

Denoising

Methods 이 논문이 사용한 방법론

Diffusion Diffusion models generate samples by gradually removing noise from a signal, and their training objective can be expressed as a reweighted variational lower-bound…

Similar Papers 제목 키워드 기반

DiCache: Let Diffusion Model Determine Its Own Cache

2025-08-24 · Jiazi Bu, Pengyang Ling, Yujie Zhou, Yibin Wang 외 arxiv

Recent years have witnessed the rapid development of acceleration techniques for diffusion models, especially caching-based acceleration methods. These studies seek to answer two fundamental questions: "When to cache" an…

Accelerating Diffusion Transformer via Error-Optimized Cache

2025-01-31 · Junxiang Qiu, Shuo Wang, Jinda Lu, Lin Liu 외

Diffusion Transformer (DiT) is a crucial method for content generation. However, it needs a lot of time to sample. Many studies have attempted to use caching to reduce the time consumption of sampling. Existing caching m…

Accelerating Diffusion Transformers with Dual Feature Caching

2024-12-25 · Chang Zou, Evelyn Zhang, Runlin Guo, Haohang Xu 외

Diffusion Transformers (DiT) have become the dominant methods in image and video generation yet still suffer substantial computational costs. As an effective approach for DiT acceleration, feature caching methods are des…

Video Generation

SenCache: Accelerating Diffusion Model Inference via Sensitivity-Aware Caching

2026-02-27 · Yasaman Haghighi, Alexandre Alahi arxiv

Diffusion models achieve state-of-the-art video generation quality, but their inference remains expensive due to the large number of sequential denoising steps. This has motivated a growing line of research on accelerati…

Video Generation

OTCache: Optimal Transport for Geometry-Aware Caching in Diffusion Models

2026-06-30 · Huanlin Gao, Fang Zhao, Qiang Hui, Fuyuan Shi 외 arxiv

We propose OTCache, a training-free framework for accelerating diffusion sampling via caching schedule prediction. Existing graph-based caching methods reduce redundant computation by optimizing shortest-path objectives,…