MCPcopy Index your code
hub / github.com/ali-vilab/TeaCache

github.com/ali-vilab/TeaCache @main

Chat with this repo
repository ↗ · DeepWiki ↗ · + Follow
1,267 symbols 3,927 edges 82 files 242 documented · 19% updated 13mo ago★ 1,34829 open issues
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

[CVPR 2025 Highlight] Timestep Embedding Tells: It's Time to Cache for Video Diffusion Model

        <span class="author-block">
          <a href="https://liewfeng.github.io" target="_blank">Feng Liu</a><sup>1</sup><sup>*</sup>,&nbsp;
        </span>
        <span class="author-block">
          <a href="https://scholar.google.com.hk/citations?user=ZO3OQ-8AAAAJ" target="_blank">Shiwei Zhang</a><sup>2</sup><sup>†</sup>,&nbsp;
        </span>
        <span class="author-block">
          <a href="https://jeffwang987.github.io" target="_blank">Xiaofeng Wang</a><sup>1,3</sup>,&nbsp;
        </span>
        <span class="author-block">
          <a href="https://weilllllls.github.io" target="_blank">Yujie Wei</a><sup>4</sup>,&nbsp;
        </span>
        <span class="author-block">
          <a href="http://haonanqiu.com" target="_blank">Haonan Qiu</a><sup>5</sup>
        </span>



        <span class="author-block">
          <a href="https://callsys.github.io/zhaoyuzhong.github.io-main" target="_blank">Yuzhong Zhao</a><sup>1</sup>,&nbsp;
        </span>
        <span class="author-block">
          <a href="https://scholar.google.com.sg/citations?user=16RDSEUAAAAJ" target="_blank">Yingya Zhang</a><sup>2</sup>,&nbsp;
        </span>
        <span class="author-block">
          <a href="https://scholar.google.com/citations?user=tjEfgsEAAAAJ&hl=en&oi=ao" target="_blank">Qixiang Ye</a><sup>1</sup>,&nbsp;
        </span>
        <span class="author-block">
          <a href="https://scholar.google.com/citations?user=0IKavloAAAAJ&hl=en&oi=ao" target="_blank">Fang Wan</a><sup>1</sup><sup>‡</sup>
        </span>







        <span class="author-block"><sup>1</sup>University of Chinese Academy of Sciences,&nbsp;</span>
        <span class="author-block"><sup>2</sup>Alibaba Group</span>



        <span class="author-block"><sup>3</sup>Institute of Automation, Chinese Academy of Sciences</span>



        <span class="author-block"><sup>4</sup>Fudan University,&nbsp;</span>
        <span class="author-block"><sup>5</sup>Nanyang Technological University</span>








        (* Work was done during internship at Alibaba Group. † Project Leader. ‡ CorresCorresponding author.)
[![hf_paper](https://img.shields.io/badge/🤗-Paper%20In%20HF-red.svg)](https://huggingface.co/papers/2411.19108) [![arXiv](https://img.shields.io/badge/Arxiv-2411.19108-b31b1b.svg?logo=arXiv)](https://arxiv.org/abs/2411.19108) [![Home Page](https://img.shields.io/badge/Project--blue.svg)](https://liewfeng.github.io/TeaCache/) [![License](https://img.shields.io/badge/License-Apache%202.0-yellow)](./LICENSE) [![github](https://img.shields.io/github/stars/LiewFeng/TeaCache.svg?style=social)](https://github.com/LiewFeng/TeaCache/)

visualization

🫖 Introduction

We introduce Timestep Embedding Aware Cache (TeaCache), a training-free caching approach that estimates and leverages the fluctuating differences among model outputs across timesteps, thereby accelerating the inference. TeaCache works well for Video Diffusion Models, Image Diffusion models and Audio Diffusion Models. For more details and results, please visit our project page.

🔥 Latest News

🧩 Community Contributions

If you develop/use TeaCache in your projects and you would like more people to see it, please inform us.(liufeng20@mails.ucas.ac.cn)

Model - FramePack supports TeaCache. Thanks @lllyasviel. - FastVideo supports TeaCache. Thanks @BrianChen1129 and @jzhang38. - EasyAnimate supports TeaCache. Thanks @hkunzhe and @bubbliiiing. - Ruyi-Models supports TeaCache. Thanks @cellzero. - ConsisID supports TeaCache. Thanks @SHYuanBest.

ComfyUI - ComfyUI-TeaCache for TeaCache. Thanks @YunjieYu. - ComfyUI-WanVideoWrapper supports TeaCache4Wan2.1. Thanks @kijai. - ComfyUI-TangoFlux supports TeaCache. Thanks @LucipherDev. - ComfyUI_Patches_ll supports TeaCache. Thanks @lldacing. - Comfyui_TTP_Toolset supports TeaCache. Thanks @TTPlanetPig. - ComfyUI-TeaCacheHunyuanVideo for TeaCache4HunyuanVideo. Thanks @facok. - ComfyUI-HunyuanVideoWrapper supports TeaCache4HunyuanVideo. Thanks @kijai, ctf05 and DarioFT.

Parallelism - Teacache-xDiT for multi-gpu inference. Thanks @MingXiangL.

Engine - SD.Next supports TeaCache. Thanks @vladmandic. - DiffSynth Studio supports TeaCache. Thanks @Artiprocher.

🎉 Supported Models

Text to Video - TeaCache4Wan2.1 - TeaCache4Cosmos - TeaCache4CogVideoX1.5 - TeaCache4LTX-Video - TeaCache4Mochi - TeaCache4HunyuanVideo - TeaCache4CogVideoX - TeaCache4Open-Sora - TeaCache4Open-Sora-Plan - TeaCache4Latte

Image to Video - TeaCache4Wan2.1 - TeaCache4Cosmos - TeaCache4CogVideoX1.5 - TeaCache4ConsisID

Text to Image - TeaCache4Lumina2 - TeaCache4HiDream-I1 - TeaCache4FLUX - TeaCache4Lumina-T2X

Text to Audio - TeaCache4TangoFlux

🤖 Instructions for Supporting Other Models

  • Welcome for PRs to support other models.
  • If the custom model is based on or has similar model structure to the models we've supported, you can try to directly transfer TeaCache to the custom model. For example, rescaling coefficients for CogVideoX-5B can be directly applied to CogVideoX1.5, ConsisID and rescaling coefficients for FLUX can be directly applied to TangoFlux.
  • Otherwise, you can refer to these successful attempts, e.g., 1, 2.

💐 Acknowledgement

This repository is built based on VideoSys, Diffusers, Open-Sora, Open-Sora-Plan, Latte, CogVideoX, HunyuanVideo, ConsisID, FLUX, Mochi, LTX-Video, Lumina-T2X, TangoFlux, Cosmos, Wan2.1, HiDream-I1 and Lumina-Image-2.0. Thanks for their contributions!

🔒 License

📖 Citation

If you find TeaCache is useful in your research or applications, please consider giving us a star ⭐ and citing it by the following BibTeX entry.

@article{liu2024timestep,
  title={Timestep Embedding Tells: It's Time to Cache for Video Diffusion Model},
  author={Liu, Feng and Zhang, Shiwei and Wang, Xiaofeng and Wei, Yujie and Qiu, Haonan and Zhao, Yuzhong and Zhang, Yingya and Ye, Qixiang and Wan, Fang},
  journal={arXiv preprint arXiv:2411.19108},
  year={2024}
}

Core symbols most depended-on inside this repo

Shape

Method 797
Function 243
Class 227

Languages

Python100%

Modules by API surface

videosys/models/autoencoders/autoencoder_kl_open_sora_plan_v110.py131 symbols
videosys/models/autoencoders/autoencoder_kl_open_sora_plan.py130 symbols
videosys/models/transformers/open_sora_plan_v110_transformer_3d.py88 symbols
videosys/models/transformers/open_sora_plan_transformer_3d.py87 symbols
videosys/models/autoencoders/autoencoder_kl_open_sora_plan_v120.py82 symbols
videosys/models/transformers/open_sora_plan_v120_transformer_3d.py64 symbols
videosys/models/autoencoders/autoencoder_kl_open_sora.py57 symbols
videosys/models/autoencoders/autoencoder_kl_cogvideox.py53 symbols
videosys/pipelines/open_sora/pipeline_open_sora.py36 symbols
videosys/core/comm.py32 symbols
videosys/pipelines/open_sora/data_process.py31 symbols
videosys/models/transformers/latte_transformer_3d.py30 symbols

For agents

$ claude mcp add TeaCache \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact

Ask about this repo answers extend the page