---
title: 'DiCache: Adaptive Diffusion Caching'
url: https://www.emergentmind.com/topics/dicache
type: topic
---

# DiCache: Adaptive Diffusion Caching

DiCache is a training-free, runtime-adaptive caching strategy for accelerating diffusion transformer models for image and video generation. In its canonical usage, the term refers to the method introduced in “DiCache: Let Diffusion Model Determine Its Own Cache,” which answers both “when to cache” and “how to use cache” by using the model’s own shallow-layer features to drive online cache scheduling and multi-step cache combination, rather than relying on predefined empirical laws or dataset-level priors [2508.17356].

## 1. Background and lineage

DiCache belongs to a broader line of inference-time acceleration methods that exploit temporal redundancy in diffusion sampling. Earlier work such as DeepCache showed that adjacent denoising steps exhibit significant temporal similarity in high-level features and proposed caching and reusing high-level U-Net features while recomputing low-level features, yielding a speedup factor of $2.3\times$ for Stable Diffusion v1.5 with only a $0.05$ decline in CLIP Score, and $4.1\times$ for LDM-4-G with a slight decrease of $0.22$ in FID on ImageNet [2312.00858].

The specific motivation for DiCache arises from two recurring design questions in diffusion caching: when to reuse cached computation and how to reconstruct the current step from previously cached states. The DiCache paper argues that prior methods typically answer these questions with static or offline heuristics, including fixed caching intervals, dataset-calibrated schedules, or handcrafted rules for combining multi-step caches, and that such rules can fail on outlier samples because diffusion dynamics are highly sample-dependent [2508.17356].

This places DiCache in the training-free adaptive branch of diffusion caching. Later literature explicitly treats it as a state-of-the-art dynamic, training-free caching scheme alongside TeaCache and EasyCache for video diffusion transformers, while also distinguishing its scheduling logic from its cache-usage mechanism [2607.12358].

## 2. Formal setting and motivating observations

The method is developed for flow-matching or rectified-flow diffusion transformers. For timestep $t$, latent input $x_t$, condition $c$, and transformer blocks $\mathcal{B}_1,\dots,\mathcal{B}_M$, the intermediate representation after block $i$ is

$$
y_t^i = \mathcal{B}_i \circ \dots \circ \mathcal{B}_1(x_t, t, c),
$$

with full-model output $y_t^M = v_\theta(x_t,t,c)$. DiCache uses residuals

$$
r_t^i = y_t^i - x_t,
$$

and in particular the full residual $r_t = r_t^M$ [2508.17356].

Two empirical observations motivate the design. First, the relative L1 difference between shallow-layer features at adjacent timesteps tracks the relative L1 difference between final outputs. The paper defines the probe-based estimate

$$
\hat{\epsilon}_{t,t+1}
=
\frac{\|y_t^m - y_{t+1}^m\|_1}{\|y_{t+1}^m\|_1},
$$

for a shallow probe depth $m \ll M$, and reports that the Spearman correlation between shallow-layer differences and full-output differences is approximately $0.8$ already for $m \in [1,3]$. By contrast, raw input differences $\text{L1}_{rel}(x_t,x_{t+1})$ are described as mostly monotonic and not useful as a cache-error proxy [2508.17356].

Second, residual trajectories across layers are similar. The residual sequences $\{r_t^m\}_t$ and $\{r_t\}_t$ evolve with similar trends in feature space, which suggests that shallow residual trajectories can guide interpolation between cached full residuals. This observation underpins DiCache’s second component, Dynamic Cache Trajectory Alignment [2508.17356].

## 3. Online Probe Profiling Scheme

The first principal component of DiCache is the Online Probe Profiling Scheme, which addresses when to cache. At every timestep, the method runs only the first $m$ blocks as a shallow probe,

$$
y_t^m = \mathcal{B}_m \circ \dots \circ \mathcal{B}_1(x_t,t,c),
$$

with probe residual $r_t^m = y_t^m - x_t$. The estimated cache error between adjacent steps is then accumulated into a running sum $\Sigma_{\text{error}}$. Cache reuse continues while the accumulated estimate stays below a threshold $\delta$; once the threshold is exceeded, the method triggers a full recomputation, refreshes the cache, and resets the accumulator [2508.17356].

Operationally, the first timestep uses a full forward pass and stores a full residual $R = y_t - x_t$. At later timesteps, DiCache first computes the shallow probe. If $\Sigma_{\text{error}} \le \delta$, it skips the deeper blocks and reuses the cached residual via $y_t = x_t + R$. Otherwise it resumes full computation from block $m+1$ onward, computes a new full residual, and resets the schedule. Because recomputation resumes from the already computed probe state, the shallow pass is not discarded [2508.17356].

This scheduling rule is fully training-free. It introduces no new learned parameters and depends only on the probe depth $m$, the reuse threshold $\delta$, and inexpensive relative L1 calculations on shallow features. In the reported experiments, $m=1$ is used for WAN 2.1, HunyuanVideo, and Flux, reflecting the claim that even the first block provides a sufficiently informative runtime sensor [2508.17356].

## 4. Dynamic Cache Trajectory Alignment

The second principal component, Dynamic Cache Trajectory Alignment, addresses how to use cache. A simple reuse rule would approximate the current full residual by the most recent cached residual. DiCache instead retains the two most recent full residual caches, $r_{t_\alpha}$ and $r_{t_\beta}$, and uses the shallow probe trajectory to estimate where the current step lies between them [2508.17356].

The full residual is modeled as approximately linear between the two cached points,

$$
r_t \approx r_{t_\beta} + \gamma_t (r_{t_\alpha} - r_{t_\beta}),
$$

and the scalar position $\gamma_t$ is estimated from shallow residuals. With probe residuals $r_t^m$, $r_{t_\alpha}^m$, and $r_{t_\beta}^m$, the paper defines

$$
\hat{\gamma}_t
=
\frac{\text{L1}_{rel}(r_t^m, r_{t_\beta}^m)}
{\text{L1}_{rel}(r_{t_\alpha}^m, r_{t_\beta}^m)}.
$$

This produces the DCTA approximation

$$
r_t
\approx
r_{t_\beta}
+
\hat{\gamma}_t (r_{t_\alpha} - r_{t_\beta}).
$$

The output is then reconstructed as $y_t \approx x_t + r_t$ [2508.17356].

The significance of this construction is that both scheduling and cache usage are driven by the same shallow probe. Online Probe Profiling uses shallow-layer feature differences to decide whether to recompute, while DCTA uses shallow residual trajectories to align multi-step caches. This yields a unified framework in which the model, in the paper’s phrasing, determines its own cache [2508.17356].

## 5. Empirical performance, limitations, and later developments

DiCache is evaluated on WAN 2.1-1.3B, HunyuanVideo, and Flux.1.0-dev on an NVIDIA A800 80GB GPU, using LPIPS, SSIM, and PSNR against vanilla outputs as the primary fidelity metrics. The reported results show that DiCache improves both speed and fidelity relative to several accelerated baselines, including TeaCache, EasyCache, TaylorSeer, and naive reduced-step baselines [2508.17356].

| Model | DiCache speedup | Reported fidelity |
|---|---:|---|
| WAN 2.1 | $2.45\times$ | LPIPS $0.1734$, SSIM $0.8885$, PSNR $26.45$ |
| HunyuanVideo | $2.34\times$ | LPIPS $0.1492$, SSIM $0.9396$, PSNR $32.79$ |
| Flux | $3.22\times$ | LPIPS $0.2704$, SSIM $0.8211$, PSNR $22.39$ |

Ablations show the expected trade-off between probe cost and fidelity. On HunyuanVideo, increasing probe depth from $m=1$ to $m=5$ improves LPIPS from $0.1492$ to $0.1367$ and PSNR from $32.79$ to $33.47$, while reducing speedup from $2.34\times$ to $2.10\times$. The reuse threshold $\delta$ plays the usual quality-efficiency role: for HunyuanVideo, $\delta=0.20$ yields LPIPS $0.1886$ and speedup $2.90\times$, whereas $\delta=0.05$ yields LPIPS $0.1047$ and speedup $1.76\times$ [2508.17356].

Subsequent work treats DiCache as an important reference point. ACID characterizes DiCache as using a feature-level drift proxy from a shallow probe and adds a training-free dual-threshold wrapper that switches between $\tau_{\text{low}}$ and $\tau_{\text{high}}$ based on the rate of change of the existing drift signal. For HunyuanVideo with DiCache, ACID reports latency $620$ s and speedup $2.04\times$ with PSNR $29.42$, SSIM $0.888$, and LPIPS $0.105$, compared with a fixed low-threshold DiCache configuration at $659$ s and $1.92\times$ speedup [2607.12358].

ReCache separates DiCache into two parts: Dynamic Cache Trajectory Alignment as the cache mechanism and Online Probe Profiling as the scheduler. It then replaces the scheduler with a budget-aware REINFORCE policy. On FLUX.1-dev with a $9$-step budget, “ReCache DiCache” keeps the same TFLOPs and speedup as DiCache, $594$ TFLOPs and $\times 5.04$, while reducing LPIPS from $0.456$ to $0.316$ and increasing HPS from $0.296$ to $0.302$ [2606.06060].

Adjacent work has also generalized or critiqued DiCache-style ideas. Q\&C studies the interaction between post-training quantization and DiCache-style caching in diffusion transformers and shows that naive combination can cause catastrophic degradation unless calibration and exposure-bias issues are corrected with TAP and VC [2503.02508]. SpectralCache argues that DiT denoising is non-uniform across timestep, depth, and feature dimensions, and proposes TADS, CEB, and FDC as a richer decision framework than a single global threshold [2603.05315]. These developments suggest that DiCache established a useful baseline formulation, but not the endpoint of adaptive diffusion caching.

## 6. Other uses of the name

The label “DiCache” is not unique to diffusion-model caching. In LLM systems, the term is also used for disk-based key-value cache designs in retrieval-augmented generation. “Shared Disk KV Cache Management for Efficient Multi-Instance Inference in RAG-Powered LLMs” describes a “DiCache” or “RAG-DCache / Shared RAG-DCache” design that stores per-layer key/value tensors for retrieved documents on NVMe SSD, shares them across instances, and reports a $15$–$71\%$ increase in throughput and a $12$–$65\%$ reduction in latency depending on configuration [2504.11765].

A separate line of work, “LLM-dCache,” uses GPT-driven localized data caching for tool-augmented LLMs by exposing cache operations as callable tools and allowing the model to manage cache decisions via prompting. On an industry-scale geospatial platform, it reports an average $1.24\times$ improvement in Copilot times across models and prompting techniques [2406.06799].

In networking, the related acronym DAC denotes “D2D-Aware Caching” in mmWave cellular networks, where cacheable content is split into two groups to facilitate device-to-device exchange. That work is analytically unrelated to diffusion-model DiCache, but it illustrates that the name has appeared in multiple caching literatures with distinct meanings [1703.04935].

Source: https://www.emergentmind.com/topics/dicache