跳到正文
arXiv (AI + Vision + Imaging)· Zhikang Xie, Xichen Ye, Yifan Wu, Yuxuan Liu, Qianlong Wang, Haoshen Yu, Peizhu Gong, Weizhong Zhang, Cheng Jin·· 1 天前AI 评分36

OnCache:为扩散模型推理学习动态缓存调度

OnCache: Learning Dynamic Caching Schedules for Efficient Diffusion Inference

AI 导读

OnCache 是一个动态缓存框架,可在线按 prompt 自适应决定计算量分配与缓存特征刷新时机,并配轻量神经校正器补偿缓存误差。在 FLUX.1-dev 上,1024² 分辨率下实现近 3 倍生成加速,LPIPS 0.156、SSIM 0.860。该框架还扩展至 Wan2.1-T2V-1.3B 视频生成,在两种模态上取得效率与质量的领先折衷。

正文 · 原文

arXiv:2611.29480v1 Announce Type: new 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. 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.

来源:arXiv (AI + Vision + Imaging) · arxiv.org