TL;DR
SemCache is a training-free acceleration framework that speeds up video diffusion models by over 2.5x without sacrificing visual quality. It achieves this by adaptively adjusting its computation caching strategy based on high-level prompt semantics (e.g., recognizing that a "galloping horse" needs more processing than a "static landscape") and temporal motion metrics.
What Problem Does This Paper Address?
Generating high-quality video using diffusion models is computationally expensive. The iterative denoising process requires multiple forward passes through large Transformer-based architectures (DiTs), leading to significant latency that hinders real-world applications.
To solve this, researchers often use caching: reusing intermediate model outputs from previous timesteps instead of recomputing them. However, existing caching methods have a "semantic blindness" problem. They either use static reuse patterns or rely on low-level pixel signals. This leads to a dilemma: if you cache too aggressively in a highly dynamic scene (like a car chase), you get motion artifacts; if you cache too conservatively in a static scene (like a person reading), you waste massive amounts of compute.
Methods
The authors introduce SemCache, a training-free method that optimizes computation across two dimensions:
-
Prompt Semantic-Aware (PSA) Caching (Spatial/Step Dimension): The core idea is that the prompt itself tells us how much we can afford to cache. While Large Language Models (LLMs) can score prompt complexity, using them during every inference run is too slow. Instead, SemCache uses the cross-attention output differences within the model as a proxy for semantic complexity. By measuring the magnitude and directional variation of these internal signals, the system dynamically sets a caching threshold ($P_{st}$) tailored to the specific content being generated.
-
Temporal Motion Metric (TMM) (Temporal Dimension): To further reduce redundancy, SemCache evaluates motion intensity by computing residuals between video frames in the latent space. It prioritizes computation for motion-rich frames and reuses features for frames with high similarity, ensuring temporal consistency while slashing inference time.
Crucially, SemCache is training-free and requires no calibration sets, making it a "plug-and-play" solution for existing models like HunyuanVideo and Wan2.1.
Datasets
The researchers evaluated SemCache using the VBench benchmark, a comprehensive suite for video generative models. They tested the framework across three state-of-the-art base models:
- HunyuanVideo (129 frames, 1280×720)
- Wan2.1 (81 frames, 832×480)
- Open-Sora 1.2 (51 frames, 480P)
Key Insights and Ideas
- Cross-Attention as a Semantic Sensor: The most elegant insight is using the model's own cross-attention layers to sense scene dynamics. High variation in these layers correlates strongly with complex, dynamic prompts, while low variation signals static content.
- The "Aha" Moment on Prompt Types: The authors categorized prompts into static, neutral, and dynamic. They proved that dynamic scenes exhibit significantly larger feature variations during the diffusion process, justifying the need for a content-aware compute allocation.
- Dual-Axis Optimization: By combining PSA (which decides when to recompute a step) and TMM (which decides which frames need recomputation), the model attacks redundancy from both the denoising-step and the temporal-frame perspectives.
Key Results
SemCache consistently outperformed state-of-the-art baselines like TeaCache and MagCache in both speed and quality:
- Speedups: Achieved 2.45× speedup on HunyuanVideo and 2.66× on Wan2.1.
- Efficiency: On dual-GPU setups, the speedup reached up to 3.25×.
- Visual Quality: Despite the massive speedup, SemCache maintained (and in some cases improved) visual quality metrics. On Wan2.1, it achieved a VBench score of 0.7123, outperforming TeaCache-fast (0.6901) while being significantly faster.
- Robustness: The method showed stable performance across varying resolutions (from 544P to 720P) and frame counts (up to 192 frames).
Limitations and Future Work
- Hyperparameter Sensitivity: The weighting factors ($\alpha$ and $\beta$) for semantic scoring currently require manual setting for different models (e.g., $\alpha=0.4$ for HunyuanVideo vs. $0.2$ for Wan2.1). Automating this tuning could be a future direction.
- Warm-up Phase: The first few timesteps of diffusion are highly noisy, which can lead to abnormal semantic scores. SemCache currently bypasses this by starting calculations from the second timestep, but a more sophisticated handling of early-stage noise could improve results.
- LLM Overhead: While the final method uses cross-attention, the initial analysis relied on ChatGPT-4o for scoring. Finding ways to completely internalize the "reasoning" of why a scene is dynamic without any external guidance remains an open area.
Summary updated