TL;DR
LightCache is a training-free framework designed to accelerate video diffusion models while drastically reducing their GPU memory footprint. By introducing stage-specific optimizations—such as asynchronous CPU-GPU cache swapping, feature chunking, and VAE slicing—it achieves up to a 2.86× speedup and slashes peak VRAM usage by up to 8.0 GB without sacrificing generation quality.
What Problem Does This Paper Address?
Diffusion models have revolutionized video generation, but their inference process is notoriously slow and memory-heavy because the model must denoise all video frames simultaneously. To mitigate this, recent "training-free" acceleration methods (like DeepCache) exploit temporal redundancy by caching and reusing feature maps across adjacent denoising steps.
However, there is a major catch: storing these massive feature maps causes a massive surge in GPU memory usage. This frequently triggers Out-Of-Memory (OOM) errors on standard hardware, making existing cache-based acceleration methods impractical for consumer-grade or even mid-tier enterprise GPUs. LightCache addresses this critical bottleneck, providing a plug-and-play solution that delivers both speed and memory efficiency.
Methods
The authors break down the video inference pipeline into three distinct stages—encoding, denoising, and decoding—and apply tailored, stage-specific optimizations to the latter two:
- Asynchronous Cache Swapping (Denoising Stage): Instead of hoarding cached feature maps entirely on precious GPU VRAM, LightCache offloads inactive cache data to the CPU. To prevent PCIe transfer bottlenecks from slowing down inference, it uses asynchronous transfers, overlapping the CPU-GPU data communication with ongoing GPU computations.
- Feature Chunk (Denoising Stage): It selectively chunks the spatial dimensions (height and width) of the feature maps across different layers. This reduces the active memory required during tensor operations while preserving spatiotemporal continuity.
- Sliced Decoding (Decoding Stage): During the final VAE decoding phase, processing all frames at once destroys VRAM. LightCache applies VAE slicing to decode the video frame-by-frame, transforming a single massive memory spike into smaller, sequential computations.
Datasets
As a training-free, plug-and-play inference optimization framework, LightCache does not require training on any datasets. The authors evaluated their method using standard text-to-video and image-to-video prompts from the Hugging Face diffusers library across several popular pre-trained models:
- AnimateDiff / AnimateDiff-Lightning
- Stable Video Diffusion (SVD-XT)
- TextToVideo (U-Net)
- EasyAnimate (Diffusion Transformer / DiT)
Key Insights and Ideas
- The Memory Bottleneck Shifts: Caching features successfully accelerates the denoising process, but it shifts the memory bottleneck heavily into the denoising and decoding stages, leaving the encoding stage consistently low-memory.
- Temporal Coherence is Free Real Estate: Adjacent denoising steps produce highly similar intermediate representations, especially in the later stages of inference when the signal becomes clearer and noise is eliminated. This justifies aggressive caching and chunking.
- Asynchronous Overlapping Eliminates Latency: Offloading cache to the CPU usually introduces a time penalty. Doing it asynchronously ensures that the time saved by skipping denoising steps isn't lost to transfer overhead.
Key Results
The authors evaluated LightCache on four NVIDIA L40S GPUs (45GB each) with a batch size of 1:
- AnimateDiff-Lightning: Achieved a 1.59× speedup while slashing peak memory usage by 8.0 GB.
- Stable Video Diffusion (SVD-XT): Delivered a 2.86× speedup alongside a 1.4 GB memory reduction.
- OOM Prevention on DiTs: On Diffusion Transformer (DiT) architectures like EasyAnimate, standard DeepCache completely fails due to OOM errors. LightCache successfully runs it, delivering up to a 3.03× speedup.
- Quality Preservation: Evaluation metrics like LPIPS, PSNR, and SSIM remain remarkably close to the original models, meaning the speed and memory gains come with negligible perceptual quality degradation.
Limitations and Future Work
While LightCache shows impressive results, the authors note a few areas for improvement:
- DiT Architecture Support: The current implementation primarily targets U-Net architectures, with initial validation on DiT via EasyAnimate. The authors plan to extend and optimize LightCache for a wider variety of DiT models.
- Scale: Future work will focus on scaling the framework to handle longer video sequences and exploring its utility in multi-modal generation tasks where memory constraints are even more severe.
Summary updated