OnCache: Learning Dynamic Caching Schedules for Efficient Diffusion Inference

Zhikang Xie, Xichen Ye, Yifan Wu, Yuxuan Liu, Qianlong Wang +4 more
11/22/2026
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Diffusion models have revolutionized generative tasks but incur high inference latency due to iterative denoising. Cache-based strategies accelerate inference by reusing intermediate features, yet they largely rely on static, sample-agnostic schedules.

Show full abstract

Our empirical analysis reveals two factors that these schedules overlook. (i) denoising dynamics and computational requirements vary across prompts, motivating adaptive computation allocation. (ii) sensitivity to caching errors varies across timesteps, so static schedules may reuse features at error-sensitive steps or waste computation at less sensitive ones. We therefore propose OnCache, a dynamic caching framework that makes prompt-adaptive decisions online about how much computation to allocate and when to refresh cached features. A policy is trained offline on paired compute and cache continuations from identical denoising states, using differences in terminal fidelity and the number of function evaluations (NFE) to account for the downstream consequences of each decision. To further improve the generation quality, a neural corrector compensates for caching-induced errors and mitigates their accumulation throughout the denoising trajectory. Both components are lightweight and introduce negligible additional inference latency. On FLUX.1-dev, OnCache achieves a nearly $3\times$ generation speedup at $1024^2$ resolution, with LPIPS of $0.156$ and SSIM of $0.860$. We further extend OnCache to video generation on Wan2.1-T2V-1.3B, achieving state-of-the-art efficiency--quality trade-offs across both modalities.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{xie2026oncache,
  title  = {OnCache: Learning Dynamic Caching Schedules for Efficient Diffusion Inference},
  author = {Zhikang Xie and Xichen Ye and Yifan Wu and Yuxuan Liu and Qianlong Wang and Haoshen Yu and Peizhu Gong and Weizhong Zhang and Cheng Jin},
  year   = {2026},
  eprint = {2611.29480},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2611.29480v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2611.29480.svg)](https://codeofpaper.com/paper/2611.29480)

Discussion