OTCache: Optimal Transport for Geometry-Aware Caching in Diffusion Models
Summary
OTCache is a training-free framework that uses optimal transport to predict caching schedules for diffusion models, achieving up to 4.7x acceleration on FLUX.1, Qwen-Image, and HunyuanVideo while improving generation fidelity.
View Cached Full Text
Cached at: 07/01/26, 05:33 AM
# OTCache: Optimal Transport for Geometry-Aware Caching in Diffusion Models
Source: [https://arxiv.org/html/2606.31026](https://arxiv.org/html/2606.31026)
11institutetext:Data Science & Artificial Intelligence Research Institute, China Unicom22institutetext:Unicom Data Intelligence, China Unicom33institutetext:National Key Laboratory for Novel Software Technology, Nanjing University
33email:\{gaohl51,zhaof50,wangk115,liansg\}@chinaunicom\.cn
†Equal contribution\.∗Corresponding authors\.Fang Zhao†[https://orcid.org/0009-0003-3465-3050](https://orcid.org/0009-0003-3465-3050)Qiang Hui[https://orcid.org/0000-0002-3674-092X](https://orcid.org/0000-0002-3674-092X)Fuyuan ShiShaoan ZhaoYantao LiChao Tan[https://orcid.org/0009-0008-4957-6939](https://orcid.org/0009-0008-4957-6939)Ting LuYuren You[https://orcid.org/0009-0004-0168-9265](https://orcid.org/0009-0004-0168-9265)Kai Wang∗[https://orcid.org/0000-0002-1171-0281](https://orcid.org/0000-0002-1171-0281)Shiguo Lian∗[https://orcid.org/0000-0003-4308-7049](https://orcid.org/0000-0003-4308-7049)
###### Abstract
We proposeOTCache, 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, but rely on an additive independence assumption, which often breaks down in the low NFE regime\. To address this issue, OTCache models caching schedules across inference budgets as a smooth evolution in policy space, inspired by Optimal Transport \(OT\)\. The framework consists of three stages: \(1\) obtaining a high\-fidelityreference scheduleusing a graph\-based caching method under a conservative budget; \(2\) performing a lightweightanchor searchunder an extreme low\-budget setting via Optuna optimization with an end\-to\-end perceptual objective; and \(3\) predicting schedules for target budgets viaquantile interpolationbetween the reference and anchor policies using continuous warping representations\. Experiments on FLUX\.1 \[dev\], Qwen\-Image, and HunyuanVideo show that OTCache achieves4\.5×4\.5\\times,4\.7×4\.7\\times, and3\.66×3\.66\\timesacceleration, respectively, while consistently improving generation fidelity over state\-of\-the\-art caching baselines\. This work provides a new perspective on accelerating diffusion models through Optimal\-Transport\-inspired schedule modeling\.Code:[https://github\.com/UnicomAI/OTCache](https://github.com/UnicomAI/OTCache)
## 1Introduction
Flow Matching \(FM\)\[lipman2022flow,albergo2022building\]has emerged as a cornerstone of modern generative modeling, driving significant breakthroughs in high\-fidelity synthesis across image\[flux2024\], video\[kong2024hunyuanvideo,Open\-Sora\], and multi\-modal tasks\[hung2024tangofluxsuperfastfaithful\]\. By modeling continuous transport paths via instantaneous velocity fields, FM provides a mathematically principled and effective paradigm for sampling\. However, in commercial\-scale models such as FLUX\.1\[flux2024\]and HunyuanVideo\[kong2024hunyuanvideo\], the massive parameter scale of transformer\-based denoisers coupled with the prolonged iterative sampling process leads to staggering computational overhead and memory footprints\. Thiscomputation\-intensivenature creates a formidable deployment barrier, significantly hindering their applicability in interactive or resource\-constrained scenarios\.
To alleviate this burden, established acceleration strategies such as distillation\[salimans2022progressive,sauer2024adversarial\], pruning\[han2015deep\], and quantization\[li2023q\]have been widely explored\. Nevertheless, most of these methods impose a heavy “adoption tax”—they typically necessitate intensive retraining on large\-scale datasets, complex architectural modifications, or sophisticated engineering pipelines, which limits their flexibility for rapid deployment\. In contrast,caching techniques\[ma2023deepcache,wimbauer2023cache\]have emerged as a compelling training\-free alternative\.
Recent advancements such as MeanCache\[gao2026meancache\]formulate cache scheduling as a constrained shortest\-path problem, enabling efficient, training\-free planning under a fixed NFE budget\. However, this paradigm relies on an*additive independence*assumption, approximating end\-to\-end degradation as a sum of local edge errors\. We find that this surrogate becomes increasingly unreliable in the low\-NFE regime\. As shown in Fig\.[1](https://arxiv.org/html/2606.31026#S1.F1)A, when NFE decreases from 20 to 8, MeanCache still exhibits a clear gap to the search\-based optimum \(Optuna\), indicating substantial room for improvement in LPIPS\.
Figure 1:Performance gain and structural insights on FLUX\.1 \[dev\]\.\(A\) Failure of additive surrogates:MeanCache deviates from the optimal boundary in the ultra\-low NFE regime, reflecting the limitations of local error aggregation\. OTCache recovers this fidelity loss, significantly narrowing the gap to the search\-based optimum\.\(B\) Structural regularity of optimal paths:Optimal schedules across different NFE \(budgets\) demonstrate strong structural relationships rather than independent patterns, suggesting a shared underlying policy trajectory that OTCache exploits via geometric interpolation\.More fundamentally, Fig\.[1](https://arxiv.org/html/2606.31026#S1.F1)B reveals an overlooked structural regularity: the gap profiles \(first\-order differences\) of optimal schedules across budgets arenotunrelated; instead, their temporal structures evolve smoothly as the NFE budget varies\. This observation motivates a shift in perspective, rather than independently solving a discrete shortest\-path problem for each budget, we model budget\-conditioned schedule evolution and exploit structural relationships across budgets\.
Based on this insight, we proposeOTCache, a training\-free framework that predicts schedules for Low\-NFEs via optimal transport interpolation\. By anchoring prediction with a reliable high\-budget reference and a low\-budget anchor, and interpolating between them in Wasserstein space, OTCache generates robust schedules that remain stable under Low\-NFE acceleration\. The main contributions of this work are summarized as follows:
- •Rethinking Cache Scheduling under Low NFE\.We identify two fundamental limitations of existing graph\-based schedulers: \(i\) surrogate misalignment caused by additive shortest\-path objectives under nonlinear error propagation, and \(ii\) the independent\-budget assumption that ignores structural relationships across optimal schedules\.
- •Budget\-Conditioned Schedule Evolution\.We introduce a three\-stage acceleration framework that treats cache schedules as probability measures and models their evolution across NFEs as a smooth trajectory in policy space\. Leveraging the geometric structure of Optimal Transport \(OT\), we obtain target\-budget schedules through quantile interpolation between two reliable endpoints\.
- •Outstanding Performance\.Experiments on FLUX\.1, Qwen\-Image, and HunyuanVideo demonstrate that OTCache achieves 4\.5×\\times, 4\.7×\\times, and 3\.66×\\timesacceleration, respectively\. In particular, on Qwen\-Image, OTCache achieves an LPIPS of0\.171\.
## 2Related Work
### 2\.1Diffusion Model Acceleration\.
The remarkable success of generative models\[song2020ddim,song2020score\]across diverse modalities is significantly attributed to the continuous advancements in sampling speed\. Early efforts primarily focused on optimizing the iterative denoising process through principled numerical SDE/ODE solvers\[song2020score,jolicoeur2021gotta,chen2025optimizing\], such as DDIM\[song2020ddim\], EDM\[karras2022elucidating\], and DPM\-Solver\[lu2022dpm\], which aim to maintain high synthesis quality with fewer discretization steps\. To further compress inference trajectories, knowledge distillation\[hinton2015distilling\]has been extensively explored to map multi\-step denoising into compact few\-step or even single\-step regimes, exemplified by Progressive Distillation\[salimans2022progressive\]and Consistency Models\[song2023consistency,sauer2024adversarial,wang2025target\]\. Complementary to these, orthogonal strategies—including quantization\[li2023q,shang2023post\], pruning\[ma2023llm\], and system\-level parallelization frameworks\[zhao2024dsp,chen2024asyncdiff\]—have been investigated to enhance raw hardware throughput\. More recently, the emergence of Flow Matching \(FM\)\[lipman2022flow,albergo2022building\]has introduced a new paradigm that learns deterministic velocity fields, inherently possessing the potential for high\-fidelity generation with minimal sampling steps\. Nevertheless, most existing methods still require heavy computation, large\-scale data, or complex engineering, limiting their practical adoption in resource\-constrained scenarios\.
### 2\.2Cache in Diffusion Models\.
As a training\-free acceleration paradigm, caching strategies\[wimbauer2023cache,ma2024learning\]have gained prominence by reusing intermediate representations to bypass redundant computation\. Early methods such as DeepCache\[ma2023deepcache\]introduced architecture\-specific feature reuse for UNet backbones, while T\-GATE\[zhang2024cross\]andΔ\\Delta\-DiT\[chen2024delta\]extended this idea to Transformer\-based architectures\[peebles2023dit\]\. For large\-scale video generation, PAB\[zhao2024real\]and TeaCache\[DBLP:journals/corr/abs\-2411\-19108\]exploit temporal correlations and error thresholds to trigger feature reuse\. Recent studies further explore fine\-grained caching criteria, including adaptive reuse for video diffusion transformers\[kahatapitiya2025adaptive\], profiling\-based cache selection\[ma2025model\], frequency\-aware caching\[liu2025freqca\], speculative feature caching\[liu2025speca\], and search\-based policy discovery\[aggarwal2025evolutionary\]\. The field has also evolved towards graph\-based caching; LeMiCa\[gao2025lemica\]abstracts video synthesis into a Directed Acyclic Graph \(DAG\) for global scheduling, while MeanCache\[gao2026meancache\]draws inspiration from MeanFlow\[geng2025mean\]and reformulates caching from an instantaneous velocity view to an average velocity perspective, stabilizing the sampling trajectory\. Despite these advances, existing methods typically optimize schedules within a fixed budget or rely on local surrogate criteria\. How to obtain accurate*optimal*caching policies in the extreme high\-acceleration regime, namely the low\-NFE setting, remains an open problem\.
## 3Methodology
### 3\.1Preliminaries
#### 3\.1\.1Flow Matching\.
Flow Matching\[lipman2022flow,albergo2022building\]and Rectified Flow\[liu2022flow\]introduce a new paradigm for diffusion\-based generative modeling by constructing continuous transport paths between a noise distributionπ1\\pi\_\{1\}and a data distributionπ0\\pi\_\{0\}\. By defining a probability path via linear interpolation:
xt=\(1−t\)x0\+tx1,t∈\[0,1\],x\_\{t\}=\(1\-t\)x\_\{0\}\+tx\_\{1\},\\quad t\\in\[0,1\],\(1\)these methods aim to learn a straight\-line trajectory in the state space\. Since the clean datax0x\_\{0\}is unknown during the denoising \(generation\) process, a learned velocity fieldvθ\(xt,t\)v\_\{\\theta\}\(x\_\{t\},t\)is employed to approximate the direction\(x0−x1\)\(x\_\{0\}\-x\_\{1\}\), thereby constructing a neural ODE model:
dx^t=vθ\(xt,t\)dtd\\hat\{x\}\_\{t\}=v\_\{\\theta\}\(x\_\{t\},t\)dt\(2\)Numerical solvers discretize this ODE intoNNsteps to recover the data distribution\. The total computational cost is primarily determined by the Number of Function Evaluations \(NFE\), making efficient step\-wise scheduling critical for inference acceleration\.
#### 3\.1\.2Graph\-based Cache Scheduling
Feature caching has emerged as a predominant training\-free paradigm to accelerate inference by reusing intermediate states across adjacent timesteps\. Recent state\-of\-the\-art methods\[gao2025lemica,gao2026meancache\]formulate this as a constrained shortest\-path problem on a directed multigraph𝒢=\(𝒱,ℰ\)\\mathcal\{G\}=\(\\mathcal\{V\},\\mathcal\{E\}\)\. In this formulation, each nodev∈𝒱v\\in\\mathcal\{V\}corresponds to a discrete timestep, and an edgee=\(t→s\)e=\(t\\to s\)represents a caching transition where the velocity field atssis estimated using cached features fromtt\. The fidelity loss is quantified by edge weights:
ℒ\(t→s\)=‖v\(xs,s\)−v^\(xs,s;xt\)‖p,\\mathcal\{L\}\(t\\to s\)=\\\|v\(x\_\{s\},s\)\-\\hat\{v\}\(x\_\{s\},s;x\_\{t\}\)\\\|\_\{p\},\(3\)
wherev^\\hat\{v\}denotes the cached estimator\. The global scheduling problem aims to find an optimal pathπ⋆\\pi^\{\\star\}that minimizes the cumulative error:
π⋆=argminπ∈𝒫∑e∈πℒ\(e\)γ,s\.t\.\|π\|≤ℬ,\\pi^\{\\star\}=\\arg\\min\_\{\\pi\\in\\mathcal\{P\}\}\\sum\_\{e\\in\\pi\}\\mathcal\{L\}\(e\)^\{\\gamma\},\\quad\\text\{s\.t\. \}\|\\pi\|\\leq\\mathcal\{B\},\(4\)where𝒫\\mathcal\{P\}is the set of feasible paths andℬ\\mathcal\{B\}is the computation budget\.
### 3\.2Rethink: Beyond Additive Shortest\-Path Surrogates
##### Limitation\.
Graph\-based schedulers formulate caching as a constrained shortest\-path problem \(Eq\.[4](https://arxiv.org/html/2606.31026#S3.E4)\)\. In this formulation, the caching cost between any two timesteps\(t,s\)\(t,s\)is first estimated independently as an edge weightℒ\(e\)\\mathcal\{L\}\(e\), and the optimal schedule is obtained by minimizing the sum of these edge costs\. This implicitly assumes*additive independence*: the end\-to\-end degradation of a schedule can be approximated by aggregating independently estimated edge losses\.
This approximation is generally reliable in thehigh\-NFE regime, where caching intervals are short and each decision has limited influence on subsequent steps\. However, in thelow\-NFE regime, both the number of caching operations and the spacing between cached states increase\. Consequently, the effect of earlier caching decisions propagates further along the trajectory and interacts with later ones, violating the additive independence assumption\. As a result, the shortest\-path surrogate becomes increasingly inaccurate for estimating the true path degradation\. Consistent with this observation, Fig\.[1](https://arxiv.org/html/2606.31026#S1.F1)A shows that the performance gap between MeanCache and the optimal boundary grows as NFE decreases\.
##### Observation\.
Despite this limitation, we observe a clear structural regularity: near\-optimal schedules across different NFE budgets are*not independent*\. As shown in Fig\.[1](https://arxiv.org/html/2606.31026#S1.F1)B, the temporal gap patterns of optimal schedules evolve smoothly as the budget varies\. This suggests that optimal schedules under different NFEs follow a structured evolution rather than forming unrelated solutions\.
##### Core Insight\.
We hypothesize that optimal schedules under different NFE budgets correspond to different\-resolution observations of a shared*ideal trajectory*in policy space\. Although the observation resolution \(NFE\) changes, the underlying trajectory remains fixed\. Under this perspective, schedules across budgets form a smooth evolution on a policy manifold, which we interpret as a*policy geodesic*\. This view motivates predicting schedules through geometric interpolation in strategy space, which we instantiate using optimal transport in the following section\.
Figure 2:Overview of OTCache\. Stage 1: use graph\-based caching methods to obtain a reliable high\-NFE\(budget\) schedule as the reference policy\. Stage 2: perform black\-box search to find a near\-optimal low\-NFE schedule as the anchor policy\. Stage 3: inspired by optimal transport \(OT\), convert both endpoint schedules into continuous warping curves via PCHIP and apply quantile interpolation to predict the target\-budget scheduleπB\\pi\_\{B\}\.
### 3\.3OTCache
Motivated by the observations in Sec\.[3\.2](https://arxiv.org/html/2606.31026#S3.SS2), we proposeOTCache, a training\-free, three\-stage framework for accelerating diffusion sampling via caching schedule prediction, as illustrated in Fig\.[2](https://arxiv.org/html/2606.31026#S3.F2)\.
#### 3\.3\.1Stage 1: Reference
Empirically, we find that graph\-based caching methods \(e\.g\., MeanCache\) may fail to recover the globally optimal schedule in the high\-acceleration regime \(low\-NFE regime\), where large integration steps can break the validity of additive shortest\-path surrogates\. In contrast, under a conservative budget, discretization errors are sufficiently mild such that the surrogate objective aligns well with end\-to\-end generation fidelity\. Throughout this work, we adopt a conservative reference budget\.
We obtain a reference schedule using a generic graph\-based caching method under this conservative setting\. Formally, we denote the resulting schedule as the reference policy:
πref≔𝒞graph\(Bref\)\.\\pi\_\{\\mathrm\{ref\}\}\\;\\coloneqq\\;\\mathcal\{C\}\_\{\\mathrm\{graph\}\}\\\!\\left\(B\_\{\\mathrm\{ref\}\}\\right\)\.\(5\)
Here𝒞graph\(⋅\)\\mathcal\{C\}\_\{\\mathrm\{graph\}\}\(\\cdot\)denotes a generic graph\-based caching method; in our experiments, we instantiate it with MeanCache\. We treatπref\\pi\_\{\\mathrm\{ref\}\}as a high\-fidelity reference schedule in the conservative regime, which provides a structural prior for the subsequent budget\-conditioned schedule prediction\.
#### 3\.3\.2Stage 2: Anchor
In the low\-NFE regime, MeanCache can be unreliable because its shortest\-path formulation relies on the*additive independence*assumption, which may break down under large integration steps\. As a result, the path minimizing the additive surrogate can be misaligned with true end\-to\-end generation fidelity\. To obtain an accurate low\-budget boundary condition for subsequent schedule prediction, we introduce an*anchor*schedule by directly optimizing an end\-to\-end perceptual objective under an extreme budgetBancB\_\{\\mathrm\{anc\}\}via black\-box search\.
##### End\-to\-end objective\.
Letx0\(π\)x\_\{0\}\(\\pi\)denote the generated sample obtained by executing a candidate scheduleπ\\pi, andx0x\_\{0\}denote the full\-budget reference output obtained once by running the original \(non\-cached\) sampling path with all steps evaluated under the same prompt and seed\. We define the anchor objective as the perceptual discrepancy between the two outputs:
𝒥\(π\)≜ℓLPIPS\(x0\(π\),x0\)\.\\mathcal\{J\}\(\\pi\)\\;\\triangleq\\;\\ell\_\{\\mathrm\{LPIPS\}\}\\\!\\left\(x\_\{0\}\(\\pi\),\\,x\_\{0\}\\right\)\.\(6\)
This objective is defined per prompt\-seed pair\. Unlike MeanCache, which optimizes a surrogate based on averaged velocity discrepancies, and LeMiCa, which optimizes latent\-space deviations, we directly optimize a perceptual distance \(LPIPS\[zhang2018unreasonable\]\) on the final generated image or video outputs, thereby capturing the fidelity gap induced by acceleration in an end\-to\-end manner\.
##### Black\-box search\.
To obtain an accurate anchor in the low budget regime, we directly minimize the end\-to\-end objective in Eq\. \([6](https://arxiv.org/html/2606.31026#S3.E6)\) using a lightweight black\-box optimizer \(Optuna \+ CMA\-ES\)\. We run the search for a fixed number of trials and apply early stopping to cap the cost \(i\.e\., terminate if no improvement is observed for a predefined patience\):
πanc≔argminπ∈𝒫Banc𝒥\(π\),\\pi\_\{\\mathrm\{anc\}\}\\;\\coloneqq\\;\\underset\{\\pi\\in\\mathcal\{P\}\_\{B\_\{\\mathrm\{anc\}\}\}\}\{\\arg\\min\}\\;\\mathcal\{J\}\(\\pi\),\(7\)where𝒫Banc\\mathcal\{P\}\_\{B\_\{\\mathrm\{anc\}\}\}denotes the feasible set under budgetBancB\_\{\\mathrm\{anc\}\}\.
To improve sample efficiency, we adopt two practical choices\.\(i\) Warm start\.We initialize the search from the MeanCache schedule at the same budget \(e\.g\.,Banc=8B\_\{\\mathrm\{anc\}\}=8\), leveraging a strong prior and providing a conservative fallback when no improvement is found for a given prompt\-seed pair\.\(ii\) First\-order parameterization\.We optimize the schedule in a gap \(first\-order difference\) space rather than directly over discrete timesteps, which empirically yields a better\-conditioned search landscape while preserving monotonic structure by construction\.
#### 3\.3\.3Stage 3: Optimal Path Prediction
To generalize scheduling patterns across arbitrary budgets, we model their evolution as a continuous trajectory in a functional space\.
##### Continuous Representation via Monotonic Splines\.
We lift each discrete scheduleπB=\{ti\}i=0B−1\\pi\_\{B\}=\\\{t\_\{i\}\\\}\_\{i=0\}^\{B\-1\}to a continuous warping function over a normalized progress domainu∈\[0,1\]u\\in\[0,1\]by assigning uniformly spaced progress coordinates and fitting a shape\-preserving Piecewise Cubic Hermite Interpolator \(PCHIP\)\. This yields a strictly monotone time\-warping curve without spurious oscillations\. The curve is then uniformly sampled at a fixed resolution to obtain an equal\-dimensional representation\. Applying this procedure toπref\\pi\_\{\\mathrm\{ref\}\}andπanc\\pi\_\{\\mathrm\{anc\}\}produces the aligned continuous embeddings\(μref,μanc\)\(\\mu\_\{\\mathrm\{ref\}\},\\mu\_\{\\mathrm\{anc\}\}\), enabling stable optimal\-transport interpolation across budgets\.
##### Log\-conditioned Weighted Geodesic\.
To predict the schedule for a target budgetB∈\[Banc,Bref\]B\\in\[B\_\{\\mathrm\{anc\}\},B\_\{\\mathrm\{ref\}\}\], we model the transition between policies as a smooth path in the space of probability measures\. In one dimension, the most natural way to interpolate between two distributions is through theWasserstein geodesic\. A key property of this approach is that the interpolation can be performed directly as a linear combination of thequantile functions\(i\.e\., our continuous warping curvesμ\(u\)\\mu\(u\)\)\.
Specifically, the predicted scheduleμB\(u\)\\mu\_\{B\}\(u\)for target budgetBBis constructed as:
μB\(u\)=αanc\(B\)⋅μanc\(u\)\+αref\(B\)⋅μref\(u\),\\mu\_\{B\}\(u\)=\\alpha\_\{\\mathrm\{anc\}\}\(B\)\\cdot\\mu\_\{\\mathrm\{anc\}\}\(u\)\+\\alpha\_\{\\mathrm\{ref\}\}\(B\)\\cdot\\mu\_\{\\mathrm\{ref\}\}\(u\),\(8\)
where the interpolation weightsαk\(B\)\\alpha\_\{k\}\(B\)are defined by:
αk\(B\)=wdist,k⋅wconf,k∑j∈\{anc, ref\}wdist,j⋅wconf,j\.\\alpha\_\{k\}\(B\)=\\frac\{w\_\{\\text\{dist\},k\}\\cdot w\_\{\\text\{conf\},k\}\}\{\\sum\_\{j\\in\\\{\\text\{anc, ref\}\\\}\}w\_\{\\text\{dist\},j\}\\cdot w\_\{\\text\{conf\},j\}\}\.\(9\)
Here, the termswdist,k=\(\|Bk−B\|\+1\)−1w\_\{\\text\{dist\},k\}=\(\|B\_\{k\}\-B\|\+1\)^\{\-1\}andwconf,k=logBkw\_\{\\text\{conf\},k\}=\\log B\_\{k\}represent two intuitive priors: \(i\)Locality, which anchors the prediction to the nearest known budget; and \(ii\)Confidence, which assigns higher trust to the high\-budget reference since dense schedules provide a more stable structural prior of the ODE trajectory\.
##### Conservative Realization\.
The discrete scheduleπB=\{ti\}i=0B−1\\pi\_\{B\}=\\\{t\_\{i\}\\\}\_\{i=0\}^\{B\-1\}is realized by sampling the continuous geodesicμB\\mu\_\{B\}via apower\-law warping\. Motivated by the observation that early\-stage caching requires more conservative updates due to high vector field volatility\[gao2025lemica,gao2026meancache\], we introduce an exponentρ≥1\.0\\rho\\geq 1\.0to bias the NFE density toward the start of the reverse ODE:
ti=𝒫sum\(μB\(\[iB−1\]ρ\)\)\.t\_\{i\}=\\mathcal\{P\}\_\{\\text\{sum\}\}\\left\(\\mu\_\{B\}\\left\(\\left\[\\frac\{i\}\{B\-1\}\\right\]^\{\\rho\}\\right\)\\right\)\.\(10\)
The projection operator𝒫sum\\mathcal\{P\}\_\{\\text\{sum\}\}rounds the samples to integers and redistributes residuals to the largest sampling gaps, ensuring the maximum timestepTmaxT\_\{\\text\{max\}\}is strictly satisfied\. This allows OTCache to faithfully “morph” high\-fidelity structural priors into accelerated schedules for any target budget\.
## 4Experiments
### 4\.1Experimental setup
#### 4\.1\.1Baselines and Compared Methods\.
To rigorously assess the effectiveness and generalizability of OTCache, we conduct experiments on three state\-of\-the\-art generative frameworks: FLUX\.1 \[dev\]\[flux2024\]for high\-fidelity image synthesis, Qwen\-Image\[wu2025qwenimagetechnicalreport\]for text\-to\-image generation, and HunyuanVideo\[kong2024hunyuanvideo\]for large\-scale video generation\. We benchmark OTCache against a comprehensive suite of representative caching paradigms\. This includes threshold\-based and structural redundancy methods, such as TaylorSeer\[TaylorSeer2025\], DBCache\[cache\-dit@2025\], DiCache\[bu2025dicache\], ToCa\[zou2024accelerating\], and DuCa\[zou2024DuCa\]\. We further compare with trajectory\-aware acceleration techniques, including TeaCache\[DBLP:journals/corr/abs\-2411\-19108\], as well as the latest Graph\-based caching methods, LeMiCa\[gao2025lemica\]and MeanCache\[gao2026meancache\]\.
#### 4\.1\.2Metrics\.
To rigorously assess the trade\-off between computational acceleration and generation performance, we adopt a multi\-faceted evaluation suite spanning efficiency, perceptual quality, and structural fidelity\. Efficiency is quantified by total FLOPs and inference latency\. For text\-to\-image \(T2I\) generation, we follow the DrawBench\[saharia2022photorealistic\]protocol and report ImageReward\[xu2023imagereward\]and CLIP Score\[hessel2021clipscore\]to evaluate high\-level perceptual quality and semantic text\-image alignment, respectively\. For text\-to\-video \(T2V\) tasks, we employ VBench\[huang2024vbench\]to capture human\-centric preferences across multiple temporal and spatial dimensions\. Furthermore, to quantify the potential fidelity degradation introduced by the caching mechanism, we treat the full\-step \(uncompressed\) inference as the reference ground truth and compute LPIPS\[zhang2018unreasonable\], SSIM\[wang2002universal\], and PSNR\. These reconstruction metrics serve to measure the degree of perceptual similarity, structural consistency, and pixel\-level precision maintained by OTCache relative to the original diffusion trajectory\.
#### 4\.1\.3Implementation Details\.
All experiments are implemented in PyTorch and executed on NVIDIA H100 GPUs\. To ensure a rigorous and fair evaluation, we adopt the sampling protocol established by prior works\[DBLP:journals/corr/abs\-2411\-19108,gao2026meancache\], selecting 50 representative prompts \(10 per attribute\) from the T2V\-CompBench\[sun2024t2v\]dataset\. For all model architectures, we employ FlashAttention\[dao2022flashattention\]as the default attention backend to optimize memory bandwidth and computational throughput\. In Stage 1 of OTCache, the reference budget is set toBref=20B\_\{\\mathrm\{ref\}\}=20\. In Stage 2, the anchor search is conducted using Optuna with a budget of 200 trials to identify the optimal boundary caching sequence for 8\-step inference\. Notably, since TaylorSeer encounters out\-of\-memory \(OOM\) issues under HunyuanVideo, we uniformly adopt the cpu\-offload setting to ensure fair comparison\.
### 4\.2Text\-to\-Image Generation
As demonstrated in Table[1](https://arxiv.org/html/2606.31026#S4.T1)and Table[2](https://arxiv.org/html/2606.31026#S4.T2),OTCacheconsistently establishes a new state\-of\-the\-art Pareto frontier on both FLUX\.1 \[dev\] and Qwen\-Image models\. By introducing a caching mechanism from an Optimal Transport \(OT\) perspective, our method achieves a superior trade\-off between acceleration ratio and generation fidelity compared to existing baselines\.
#### 4\.2\.1Performance on FLUX\.1 \[dev\]\.
On the FLUX\.1 \[dev\] model \(1024×10241024\{\\times\}1024\), OTCache \(ℬ=15\\mathcal\{B\}=15\) achieves a3\.04×3\.04\\timesspeedup, surpassing MeanCache’s2\.91×2\.91\\times\. Simultaneously, it further enhances reconstruction accuracy, reducing LPIPS from0\.1420\.142to0\.1260\.126and boosting PSNR from24\.8324\.83to26\.0326\.03\. Notably, in high\-acceleration regimes \(\>3\.6×\>3\.6\\times\), where baseline methods such as TeaCache experience catastrophic quality collapse, OTCache demonstrates remarkable robustness\. At a significant4\.50×4\.50\\timesacceleration, it maintains an ImageReward of0\.9960\.996and an LPIPS of0\.2540\.254, outperforming MeanCache in both efficiency \(4\.50×4\.50\\timesvs\.4\.12×4\.12\\times\) and perceptual quality\.
Table 1:Quantitative comparison of acceleration methods onFLUX\.1 \[dev\]\(1024×10241024\\times 1024\)\. Best results are highlighted inbold\.MethodAccelerationVisual QualityLatency\(s\)↓\\downarrowSpeed↑\\uparrowImg Rew\.↑\\uparrowCLIP↑\\uparrowLPIPS↓\\downarrowSSIM↑\\uparrowPSNR↑\\uparrowOriginal: 50 steps11\.571\.00×\\times1\.03331\.229–––60% steps7\.011\.65×\\times0\.98431\.2420\.2170\.80820\.2630% steps3\.603\.21×\\times0\.88030\.8320\.3990\.68215\.80TeaCache \(l=0\.25l=0\.25\)4\.622\.50×\\times0\.96031\.1450\.3380\.72117\.29DiCache \(δ=0\.8\\delta=0\.8\)4\.322\.68×\\times0\.67530\.8140\.4160\.71721\.27TaylorSeer \(𝒩=6,O=2\\mathcal\{N\}=6,O=2\)4\.242\.74×\\times0\.97131\.3100\.4150\.66316\.28TaylorSeer \(𝒩=6,O=1\\mathcal\{N\}=6,O=1\)4\.062\.85×\\times0\.96131\.1910\.4190\.66015\.83LeMiCa \(ℬ=15\\mathcal\{B\}=15\)4\.132\.80×\\times0\.99131\.1250\.1530\.85824\.45MeanCache \(ℬ=15\\mathcal\{B\}=15\)3\.982\.91×\\times1\.01031\.2440\.1420\.87024\.83\\rowcolorblue\!15OTCache \(ℬ=15\\mathcal\{B\}=15\)3\.803\.04×\\times1\.01131\.1670\.1260\.88126\.03TeaCache \(l=1\.5l=1\.5\)3\.163\.66×\\times0\.71730\.6960\.5040\.62415\.01LeMiCa \(ℬ=10\\mathcal\{B\}=10\)3\.213\.60×\\times0\.98131\.3550\.3120\.74019\.03MeanCache \(ℬ=10\\mathcal\{B\}=10\)2\.814\.12×\\times0\.99331\.3230\.2720\.76119\.43\\rowcolorblue\!15OTCache \(ℬ=10\\mathcal\{B\}=10\)2\.574\.50×\\times0\.99631\.2690\.2540\.78020\.22
As shown in Fig\.[3](https://arxiv.org/html/2606.31026#S4.F3), on FLUX\.1 \[dev\], when the acceleration exceeds3\.6×3\.6\\times, baseline methods exhibit more frequent content inconsistencies and object distortions \(e\.g\., malformed legs of the red goat, unnatural scissors, and redundant piano keys\)\. In contrast, OTCache achieves better content consistency and higher visual quality at an even larger speedup \(4\.50×4\.50\\times\), substantially outperforming graph\-based caching baselines\.
Figure 3:Comparison of different methods at high acceleration ratios onFLUX\.1 \[dev\]\(1024×1024\)\.Table 2:Quantitative comparison of acceleration methods onQwen\-Image\(1664×9281664\\times 928\)\. Best results are highlighted inbold\.MethodAccelerationVisual QualityLatency\(s\)↓\\downarrowSpeed↑\\uparrowImg Rew\.↑\\uparrowCLIP↑\\uparrowLPIPS↓\\downarrowSSIM↑\\uparrowPSNR↑\\uparrowOriginal: 50 steps32\.681\.00×\\times1\.18033\.626–––30% steps9\.863\.31×\\times1\.12833\.0260\.3630\.72715\.83TeaCache \(l=0\.6l=0\.6\)18\.521\.76×\\times1\.08732\.5980\.4160\.69814\.90DBCache \(r=0\.6r=0\.6\)11\.922\.74×\\times1\.01633\.4350\.2980\.82522\.22LeMiCa \(ℬ=15\\mathcal\{B\}=15\)13\.262\.46×\\times1\.12033\.5900\.1220\.92426\.89MeanCache \(ℬ=15\\mathcal\{B\}=15\)11\.452\.85×\\times1\.15933\.6360\.0750\.93827\.66\\rowcolorblue\!15OTCache \(ℬ=15\\mathcal\{B\}=15\)10\.213\.20×\\times1\.16433\.6520\.0690\.94328\.12LeMiCa \(ℬ=13\\mathcal\{B\}=13\)11\.542\.83×\\times1\.09633\.6670\.1770\.88424\.06MeanCache \(ℬ=13\\mathcal\{B\}=13\)9\.093\.60×\\times1\.14733\.7990\.1130\.90724\.80\\rowcolorblue\!15OTCache \(ℬ=13\\mathcal\{B\}=13\)8\.873\.68×\\times1\.15033\.6140\.0870\.93026\.79LeMiCa \(ℬ=10\\mathcal\{B\}=10\)10\.783\.03×\\times1\.11133\.7390\.2530\.81619\.09MeanCache \(ℬ=10\\mathcal\{B\}=10\)7\.164\.56×\\times1\.14233\.6210\.2360\.81518\.98\\rowcolorblue\!15OTCache \(ℬ=10\\mathcal\{B\}=10\)6\.954\.70×\\times1\.14733\.5840\.1710\.86421\.48
#### 4\.2\.2Performance on Qwen\-Image\.
For high\-resolution generation on Qwen\-Image \(1664×9281664\{\\times\}928, 16:9 aspect ratio\), the efficiency gains of OTCache are even more pronounced\. Atℬ=15\\mathcal\{B\}=15, it reaches a3\.20×3\.20\\timesspeedup with a near\-lossless LPIPS of0\.0690\.069, which is significantly superior to MeanCache’s0\.0750\.075at2\.85×2\.85\\times\. Even under an extreme4\.70×4\.70\\timesacceleration \(ℬ=10\\mathcal\{B\}=10\), OTCache preserves high structural fidelity with an SSIM of0\.8640\.864and a PSNR of21\.4821\.48, whereas other caching\-based baselines either provide lower speedups or incur significantly higher reconstruction errors\.
Figure 4:Comparison of different methods at high acceleration ratios onQwen\-Image\(1664×928\)\.Similar to the observations on FLUX\.1 \[dev\], the qualitative comparisons in Fig\.[4](https://arxiv.org/html/2606.31026#S4.F4)further highlight the strong generalization capability of OTCache for text\-to\-image models\. In the 16:9 generation setting commonly used for poster\-style compositions, OTCache maintains significantly better content consistency before and after acceleration\. In contrast, graph\-based caching baselines such as MeanCache and LeMiCa exhibit noticeable content shifts, including changes in the relative positions of objects \(e\.g\., the cat and the octopus\) and altered orientations of subjects \(e\.g\., the giraffe\)\. These qualitative findings are consistent with the analysis in Sec\.[3\.2](https://arxiv.org/html/2606.31026#S3.SS2)and the quantitative results reported in Table[2](https://arxiv.org/html/2606.31026#S4.T2)\.
### 4\.3Text\-to\-Video Generation\.
As shown in Table[3](https://arxiv.org/html/2606.31026#S4.T3), OTCache establishes a new state\-of\-the\-art for efficient text\-to\-video generation on HunyuanVideo\. By modeling cache scheduling as a budget\-conditioned path evolution via Optimal Transport \(OT\), OTCache achieves a3\.21×3\.21\\timesspeedup, matching TeaCache and surpassing MeanCache’s3\.05×3\.05\\times, while improving reconstruction fidelity \(LPIPS0\.176→0\.1620\.176\\\!\\rightarrow\\\!0\.162\)\.
OTCache also remains robust under extreme acceleration\. At3\.66×3\.66\\times, it achieves a VBench score of80\.37%80\.37\\%with an LPIPS of0\.2520\.252, consistently outperforming MeanCache in both efficiency and visual quality, while prior methods such as DiCache and TeaCache exhibit noticeable temporal artifacts\. As illustrated in Fig\.[5](https://arxiv.org/html/2606.31026#S4.F5), we further present qualitative comparisons on representative key frames\. OTCache consistently produces more stable structures and clearer visual details, whereas competing methods show more distortions and temporal inconsistencies\. Fig\.[7](https://arxiv.org/html/2606.31026#S4.F7)further provides a multi\-dimensional comparison across VBench metrics\.
Table 3:Quantitative comparison in text\-to\-video generation onHunyuanVideo\. Best results are inbold\.Figure 5:Comparison of different methods at high acceleration ratios onHunyuanVideo\.
### 4\.4Ablation Study
#### 4\.4\.1Content Consistency
Following MeanCache, we conduct a detailed evaluation of OTCache on rare\-word generation, where semantic ambiguity and low\-frequency usage pose significant challenges to text\-to\-image models\. As shown in Figure[7](https://arxiv.org/html/2606.31026#S4.F7), MeanCache outperforms TeaCache in maintaining content consistency under moderate acceleration\. However, as the acceleration ratio increases, MeanCache gradually exhibits content drift: an extra round table appears at2\.43×2\.43\\times, chairs are missing at3\.00×3\.00\\times, and the bedside lamp disappears at4\.12×4\.12\\times, indicating degradation of fine\-grained semantic fidelity\. In contrast, OTCache preserves content more faithfully across all acceleration levels\. Notably, even under a more extreme4\.50×4\.50\\timesspeedup \(orange box\), OTCache still retains critical elements such as the bedside lamp and its illumination, demonstrating superior robustness in maintaining rare\-word semantics and structural details under aggressive acceleration\.
Figure 6:VBench metrics and acceleration ratio of proposed OTCache and other methods\.
Figure 7:Content consistency under a rare\-word prompt \(“Matutinal”\) across varying acceleration ratios
#### 4\.4\.2Effect ofρ\\rho
The parameterρ\\rhomodulates the NFE density, where higher values prioritize the early\-stage reverse ODE to stabilize high\-variance sampling\. We evaluateρ∈\[1\.0,1\.45\]\\rho\\in\[1\.0,1\.45\]at a fixed budgetℬ=15\\mathcal\{B\}=15\(Table[5](https://arxiv.org/html/2606.31026#S4.T5)\)\. Compared to uniform sampling \(ρ=1\.0\\rho=1\.0\), non\-linear allocation significantly enhances reconstruction fidelity\. Specifically,ρ=1\.3\\rho=1\.3achieves the optimal balance, yielding the highest PSNR \(26\.03426\.034\) and lowest LPIPS \(0\.1260\.126\)\. Whileρ=1\.0\\rho=1\.0marginally leads in Image Reward, its inferior PSNR and LPIPS indicate structural instability\. Conversely,ρ=1\.45\\rho=1\.45causes performance degradation, suggesting that excessive early\-stage bias compromises late\-stage refinement\. Thus, we fixρ=1\.3\\rho=1\.3for all subsequent experiments\.
Table 4:Search accuracy on LPIPS↓\\downarrow\.
Table 5:Impact of parameterρ\\rhoon quality metrics\.
#### 4\.4\.3Effectiveness and Efficiency of Anchor Search
We analyze the effectiveness and efficiency of the anchor search underBanc=8B\_\{\\mathrm\{anc\}\}=8across 100 prompt\-seed pairs\. Table[5](https://arxiv.org/html/2606.31026#S4.T5)shows that the searched anchors consistently outperform the MeanCache \(MC\) baseline\. The Top\-1 schedule reduces LPIPS by25\.04%on average, while even the Top\-5 candidates maintain more than23%improvement over MC, indicating that directly optimizing the end\-to\-end perceptual objective effectively recovers the fidelity loss introduced by surrogate\-based graph methods\. Meanwhile, Fig\.[8](https://arxiv.org/html/2606.31026#S4.F8)demonstrates that the search remains highly efficient\. The median number of trials required to identify the Top\-1 optimum is around 50, and the vast majority of cases converge within 200 trials\. These results show that the anchor search in Stage 2 of OTCache is both efficient and effective, providing a reliable boundary condition for schedule prediction with minimal computational overhead\.
Figure 8:Search efficiency\. Number of trials required to identify Top\-KKschedules across 50 prompt\-seed pairs at budgetB=8B=8\. The median convergence for the Top\-1 optimum is around 50 trials, with most near\-optimal schedules discovered within 100 trials\.
## 5Conclusion
This paper introducesOTCache, a training\-free framework for accelerating diffusion sampling through caching schedule prediction\. Unlike existing graph\-based caching methods that rely on additive shortest\-path objectives, OTCache models the evolution of caching schedules across inference budgets as a smooth trajectory in policy space inspired by Optimal Transport\. The framework consists of three stages: a high\-fidelity reference schedule under a conservative budget, an anchor schedule obtained via lightweight end\-to\-end search in the ultra\-low NFE regime, and a quantile\-interpolation strategy that predicts schedules for arbitrary budgets through continuous warping representations\. More broadly, OTCache provides a new perspective on diffusion acceleration through geometry\-aware schedule modeling\.
## Acknowledgements
This work was supported by the National Natural Science Foundation of China Enterprise Innovation and Development Joint Fund Project under Grant U24B20181\.
## References
OTCache: Optimal Transport for Geometry\-Aware Caching in Diffusion Models
Appendix
## Appendix 0\.ABaselines and Experimental Settings
We evaluate OTCache across text\-to\-image and text\-to\-video tasks using three representative models\. Detailed baseline configurations are as follows:
- •FLUX\.1 \[dev\]: Two distinct acceleration regimes are considered to assess performance stability\. \(1\) Formoderate acceleration\(2\.50×2\.50\\times–3\.04×3\.04\\times\), the accumulation error threshold is set tol=0\.25l=0\.25for TeaCache\[DBLP:journals/corr/abs\-2411\-19108\]and the control factorδ=0\.8\\delta=0\.8for DiCache\[bu2025dicache\]\. For TaylorSeer\[TaylorSeer2025\], which reformulates cache reuse as cache prediction, the settings𝒩=6,O=1\\mathcal\{N\}=6,O=1and𝒩=6,O=2\\mathcal\{N\}=6,O=2are adopted\. Graph\-based caching methods are configured with a fixed computation budget ofℬ=15\\mathcal\{B\}=15\. \(2\) Forhigh acceleration\(\>3\.6×\>3\.6\\times\), where traditional threshold\-based methods often suffer from catastrophic quality degradation, the evaluation focuses on comparing generative quality and perceptual metrics under a constrained budget ofℬ=10\\mathcal\{B\}=10\.
- •Qwen\-Image: DBCache\[cache\-dit@2025\]is first introduced, which adjusts acceleration via the ratiorr, using default hyperparametersFn=2F\_\{n\}=2andBn=4B\_\{n\}=4\. To provide a granular analysis of graph\-based caching frameworks, detailed comparisons are conducted across varying computation budgets, specificallyℬ∈\{15,13,10\}\\mathcal\{B\}\\in\\\{15,13,10\\\}\. This facilitates a rigorous evaluation of the Pareto frontier of the proposed OTCache against existing graph\-optimal scheduling strategies\.
- •HunyuanVideo: In addition to the aforementioned baselines, comparisons are conducted with ToCa\[zou2024accelerating\]and DuCa\[zou2024DuCa\], both configured with a caching interval of𝒩=5\\mathcal\{N\}=5to align with the TaylorSeer setting\. Given the significant computational demands of video generation, the performance of graph\-based methods under budgets ofℬ=12\\mathcal\{B\}=12andℬ=10\\mathcal\{B\}=10is particularly reported\.
## Appendix 0\.BSearch Space Analysis
The optimization of a caching schedule is inherently a combinatorial problem, where the search space for selectingℬ\\mathcal\{B\}steps fromTTtimesteps is bounded by\(Tℬ\)\\binom\{T\}\{\\mathcal\{B\}\}\. As illustrated in Fig\.[9](https://arxiv.org/html/2606.31026#Pt0.A2.F9), this complexity exhibits a massive explosion asℬ\\mathcal\{B\}approachesT/2T/2\. For a standardT=50T=50configuration, searching at a mid\-range budget \(e\.g\.,ℬ=25\\mathcal\{B\}=25\) involves an immense space of≈1\.26×1014\\approx 1\.26\\times 10^\{14\}candidates, rendering global optimization computationally prohibitive\. In contrast, OTCache strategically performs its lightweight search at a low\-budget anchor point \(e\.g\.,ℬ=8\\mathcal\{B\}=8\), where the search space \(≈5\.36×108\\approx 5\.36\\times 10^\{8\}\) is significantly more tractable for the Optuna\-based optimizer\. By establishing this robust anchor policyπanc\\pi\_\{anc\}, schedules for any intermediate budgets can be accurately predicted via Optimal Transport interpolation, effectively bypassing the "curse of dimensionality" at the peak search complexity regimes\.
Figure 9:Combinatorial search space analysis forT=50T=50\. The search complexity peaks atℬ=25\\mathcal\{B\}=25, while our chosen anchor atℬ=8\\mathcal\{B\}=8resides in a significantly more tractable region, enabling efficient policy optimization\.
## Appendix 0\.CEffect of Anchor Budget
The anchor budgetℬanc\\mathcal\{B\}\_\{anc\}governs the trade\-off between search tractability and predictive stability\. Although a smallerℬanc\\mathcal\{B\}\_\{anc\}constrains the search space complexity, it risks introducing significant approximation errors during policy interpolation\. We investigate this by predicting theℬ=10\\mathcal\{B\}=10schedule using anchor lengthsℬanc∈\{8,6,4\}\\mathcal\{B\}\_\{anc\}\\in\\\{8,6,4\\\}\.As summarized in Tab\.[6](https://arxiv.org/html/2606.31026#Pt0.A3.T6), visual quality exhibits a clear degradation asℬanc\\mathcal\{B\}\_\{anc\}decreases\. Specifically,ℬanc=8\\mathcal\{B\}\_\{anc\}=8achieves the highest fidelity, with a PSNR of 20\.22 and an LPIPS of 0\.254\. At lower budgets \(i\.e\., 6 or 4\), sampling trajectories become inherently unstable, failing to provide sufficient geometric priors for accurate quantile\-based interpolation\. Consequently, we adoptℬanc=8\\mathcal\{B\}\_\{anc\}=8for standard 50\-step sampling to maintain a robust balance between optimization efficiency and reconstruction quality\.
Table 6:Ablation of anchor budgetℬanc\\mathcal\{B\}\_\{anc\}for predictingℬ=10\\mathcal\{B\}=10schedules\.
## Appendix 0\.DImpact of Initialization
Existing acceleration methods in low\-NFE regimes provide valuable structural priors that can enhance the optimization process\. To demonstrate this, we investigate whether utilizing these baseline strategies as search initializations leads to superior policy discovery at a computation budget ofℬ=8\\mathcal\{B\}=8\. We compare three initialization approaches:Random,Uniform, andMeanCache \(MC\)\. For each strategy, the top\-5 caching schedules \(ranked by LPIPS\) are extracted across 50 diverse prompts, resulting in 250 experimental samples for robust statistical analysis\. As illustrated in Fig\.[10](https://arxiv.org/html/2606.31026#Pt0.A4.F10), the initialization strategy significantly dictates the final optimization performance\. The box plot \(left\) reveals that MC\-based initialization consistently outperforms other baselines, achieving a superior average LPIPS of 0\.257, compared to 0\.319 for Random and 0\.293 for Uniform\. This performance gap is further elucidated by the Empirical Cumulative Distribution Function \(ECDF\) on the right, where the MC curve \(red\) exhibits a distinct rightward shift\. This trend demonstrates that a substantially larger fraction of samples achieves high reconstruction fidelity \(1−LPIPS↑1\-\\text\{LPIPS\}\\uparrow\) under MC guidance\. Consequently, OTCache adopts MC \(ℬ=8\\mathcal\{B\}=8\) as the default initialization for the second\-stage optimization to ensure more reliable and high\-quality policy discovery\.
Figure 10:Evaluation of search initialization strategies atℬ=8\\mathcal\{B\}=8\. MC achieves the lowest average LPIPS among 250 samples \(left\), with its ECDF curve \(right\) showing a distinct rightward shift, indicating superior robustness in discovering high\-fidelity caching policies\.
## Appendix 0\.EQuality\-Efficiency Trade\-off
We evaluate the quality\-efficiency trade\-off across varying inference budgetsℬ∈\{20,15,13,10,8\}\\mathcal\{B\}\\in\\\{20,15,13,10,8\\\}, representing a latency range of 2\-5 seconds\. As shown in Fig\.[11](https://arxiv.org/html/2606.31026#Pt0.A5.F11), OTCache consistently establishes a superior Pareto front compared to state\-of\-the\-art baselines including TeaCache, LeMiCa, and MeanCache\. Notably, OTCache maintains lower LPIPS and higher PSNR/SSIM across all latency configurations\. The performance gap becomes more pronounced as the budget decreases, demonstrating the robustness of our Optimal Transport\-based interpolation in identifying high\-quality caching schedules under tight computational constraints\.
Figure 11:Quality\-latency comparison across different caching methods\.
## Appendix 0\.FOffline Calibration Cost
Stage\-2 in OTCache is not executed online for each new user prompt\. Instead, it is an offline one\-time calibration procedure for a given backbone model and anchor budget\. In our experiments, we construct the calibration set by sampling 50 prompts from T2V\-CompBench, with no overlap with the evaluation prompts\. We then optimize Eq \([6](https://arxiv.org/html/2606.31026#S3.E6)\) underBanc=8B\_\{\\mathrm\{anc\}\}=8using Optuna with a budget of 200 trials and an early\-stop patience of 50\. The resulting anchor schedule is used as an offline calibrated policy for all subsequent inference under the same model setting\.
Table 7:Per\-prompt offline calibration cost of Stage\-2\. The reported worst\-case cost assumes that all 200 trials are executed\. In practice, early stopping can further reduce the calibration overhead\.During online inference, OTCache directly uses the calibrated anchor and therefore does not incur the search cost of Stage\-2\. The only additional online cost is the negligible schedule prediction step in Stage\-3, which consists of interpolation and discrete schedule realization\. Table[7](https://arxiv.org/html/2606.31026#Pt0.A6.T7)reports the worst\-case per\-prompt calibration cost when all 200 trials are executed\. In practice, early stopping often reduces this cost\. Since calibration prompts are independent, the offline search naturally supports multi\-GPU data parallelism\. On 8×\\timesH100 GPUs, calibrating the full 50\-prompt set is estimated to take about 39 min, 1\.5 h, and 4\.2 h for FLUX\.1, Qwen\-Image, and HunyuanVideo, respectively\.
## Appendix 0\.GMore Visual Comparison
To further evaluate the robustness ofOTCache, we provide extensive qualitative comparisons across three representative architectures: FLUX\.1 \[dev\] \(Fig\.[12](https://arxiv.org/html/2606.31026#Pt0.A7.F12)\), Qwen\-Image\(Fig\.[13](https://arxiv.org/html/2606.31026#Pt0.A7.F13)\), and HunyuanVideo\(Fig\.[14](https://arxiv.org/html/2606.31026#Pt0.A7.F14)\-[16](https://arxiv.org/html/2606.31026#Pt0.A7.F16)\)\. All samples are generated under the maximum acceleration ratios \(Low\-NFE\) to ensure a rigorous assessment\. As illustrated, OTCache consistently preserves superior structural integrity and fine\-grained textures in images while effectively eliminating flickering in videos\. Even under extreme constraints, our method maintains high\-fidelity content and temporal coherence by following the smooth evolution of caching policies, significantly outperforming baselines\.
Figure 12:More visual comparisons onFLUX\.1 \[dev\], Best viewed zoomed in\.Figure 13:More visual comparisons onQwen\-Image, Best viewed zoomed in\.Figure 14:More visual comparisons onHunyuanVideo\(1/3\), Best viewed zoomed in\.Figure 15:More visual comparisons onHunyuanVideo\(2/3\), Best viewed zoomed in\.Figure 16:More visual comparisons onHunyuanVideo\(3/3\), Best viewed zoomed in\.Similar Articles
From Local Mismatch to Global Impact: Optimizing Cache Reuse Policy for Efficient Diffusion
This paper proposes Global-ImpactCache (GCache), a bilevel optimization framework that learns cache reuse policies for diffusion models by aligning error weighting with final generation quality, instead of relying on local similarity heuristics. It achieves significant speedups and quality improvements on image and video generation tasks, including a 2.17x speedup on Wan2.1 with lower LPIPS.
LaCache: Exact Caching and Precision-Adaptive Inference for Diffusion Large Language Models
LaCache introduces a training-free acceleration framework for diffusion-based LLMs that uses lossless caching and precision-adaptive inference to eliminate redundant computation during denoising steps, achieving up to 40.2× end-to-end speedup while maintaining task accuracy.
Semantic Cache Distillation: Efficient State Transfer via Reuse and Selective Patching
This paper proposes Semantic Cache Distillation (SCD), a loss-constrained framework that replaces raw KV cache transmission with compact semantic codes, achieving up to 2.65x TTFT speedup while keeping generation quality within 5% F1 of the oracle.
Enabling KV Caching of Shared Prefix for Diffusion Language Models
This paper proposes BiCache, a novel KV caching technique for shared prefixes in diffusion language models, which avoids accuracy collapse by dynamically reusing cached keys and values in shallow layers and achieves 36.3%–98.3% throughput improvement.
Multi Tier MoE Caching
Discusses multi-tier caching strategies for MoE models to improve inference speed by keeping frequently activated experts on GPU, referencing existing implementations like PowerInfer and llama.cpp branches.