The official code for NeurIPS 2025 "MagCache: Fast Video Generation with Magnitude-Aware Cache"
280
stars
49
commits
Python
primary language
Nov 17, 2025
updated

We introduce Magnitude-aware Cache (MagCache), a training-free caching approach that estimates and leverages the fluctuating differences among model outputs across timesteps based on the robust magnitude observations, thereby accelerating the inference. MagCache works well for Video Diffusion Models, Image Diffusion models. For more details and results, please visit our project page.

If you develop/use MagCache in your projects and you would like more people to see it, please inform us.(zehongma@stu.pku.edu.cn)
ComfyUI
Text to Video
Image to Video
Video Editing
Text to Image
Image Editing
Demos









magcache_calibration function by referring the code in MagCache4Wan2.1magcache_forward function by adding a few lines into the original forward function.This repository is built based on VideoSys, Diffusers, Open-Sora, FLUX, Chroma, Wan2.1, HunyuanVideo, FramePack, and TeaCache. Thanks for their contributions!
If you find MagCache is useful in your research or applications, please consider giving us a star ⭐ and citing it by the following BibTeX entry.
@inproceedings{
ma2025magcache,
title={MagCache: Fast Video Generation with Magnitude-Aware Cache},
author={Zehong Ma and Longhui Wei and Feng Wang and Shiliang Zhang and Qi Tian},
booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},
year={2025},
url={https://openreview.net/forum?id=KZn7TDOL4J}
}
49 commits
Python
99.4%
The official code for NeurIPS 2025 "MagCache: Fast Video Generation with Magnitude-Aware Cache"
280
stars
49
commits
Python
primary language
Nov 17, 2025
updated

We introduce Magnitude-aware Cache (MagCache), a training-free caching approach that estimates and leverages the fluctuating differences among model outputs across timesteps based on the robust magnitude observations, thereby accelerating the inference. MagCache works well for Video Diffusion Models, Image Diffusion models. For more details and results, please visit our project page.

If you develop/use MagCache in your projects and you would like more people to see it, please inform us.(zehongma@stu.pku.edu.cn)
ComfyUI
Text to Video
Image to Video
Video Editing
Text to Image
Image Editing
Demos









magcache_calibration function by referring the code in MagCache4Wan2.1magcache_forward function by adding a few lines into the original forward function.This repository is built based on VideoSys, Diffusers, Open-Sora, FLUX, Chroma, Wan2.1, HunyuanVideo, FramePack, and TeaCache. Thanks for their contributions!
If you find MagCache is useful in your research or applications, please consider giving us a star ⭐ and citing it by the following BibTeX entry.
@inproceedings{
ma2025magcache,
title={MagCache: Fast Video Generation with Magnitude-Aware Cache},
author={Zehong Ma and Longhui Wei and Feng Wang and Shiliang Zhang and Qi Tian},
booktitle={The Thirty-ninth Annual Conference on Neural Information Processing Systems},
year={2025},
url={https://openreview.net/forum?id=KZn7TDOL4J}
}
49 commits
Python
99.4%