ComfyUI TeaCache: Import Failed, Wan 2.2 and What Works Now
Why ComfyUI-TeaCache shows Import Failed on current ComfyUI, why it has no Wan 2.2 option, and which TeaCache, MagCache and EasyCache nodes still work.
Quick answer
ComfyUI TeaCache usually means welltop-, a custom node pack that adds one node, TeaCache, between Load Diffusion Model and the sampler. It skips sampling steps whose result it predicts will barely change and reuses the cached output instead. Three things decide whether it helps you today:
- On current ComfyUI it does not load. Since ComfyUI's LTX-2 change in January 2026, the pack stops at start-up with
ImportError: cannot import name 'precompute_, shown asfreqs_ cis' from 'comfy .ldm .lightricks .model' (IMPORT FAILED). The issue has been open since 2026-01-05 with 35 comments and no reply from the maintainer. The last commit is from 2025-07-12. - It has no Wan 2.2 option. Its model list stops at Wan 2.1. The original TeaCache project from Alibaba's research group has no Wan 2.2 version either.
- Two maintained routes cover Wan 2.2. Kijai's WanVideoWrapper has its own WanVideo TeaCache, MagCache and EasyCache nodes. ComfyUI itself now ships an EasyCache node that is not tuned to any one model.
| Route | Node | Wan 2.2 | Status on 2026-10-10 |
|---|---|---|---|
Routewelltop- | NodeTeaCache | Wan 2.2No | Status on 2026-10-10Fails to load without a hand patch; last commit 2025-07-12 |
RouteZehong- | NodeMagCache | Wan 2.2In the code, but dropped from the menu in Nov 2025 | Status on 2026-10-10Same import error; last commit 2025-11-27 |
Routekijai/ | NodeWanVideoTeaCache, WanVideoMagCache, WanVideoEasyCache | Wan 2.2Yes, picked from the model file name | Status on 2026-10-10Last commit 2026-05-24; works with the wrapper's own nodes only |
| RouteComfyUI core | NodeEasyCache, LazyCache | Wan 2.2Not model-specific | Status on 2026-10-10Built in |
We have not run TeaCache on Wan ourselves. Our only cache measurements are of MiniMax H3 cache nodes on an RTX 3060, linked below. Everything else here was read from the repositories, source files and issue threads cited at the end, on 2026-10-10.
What TeaCache does
TeaCache stands for Timestep Embedding Aware Cache. It comes from a paper by a team from the University of Chinese Academy of Sciences, Alibaba Group and three other institutions, published on arXiv in November 2024 and accepted at CVPR 2025. The code is in ali-.
A diffusion model runs the same network once per step. Neighbouring steps often produce nearly the same output, so recomputing every one is wasteful. TeaCache does not compute the output to find out. It looks at the model's input after it has been modulated by the timestep embedding, which is cheap, and uses it to estimate how much the output would change. The differences add up from step to step. While the running total stays under a threshold, TeaCache reuses the cached result. Once it crosses, the model runs in full and the total resets.
That threshold is rel_. Higher skips more steps: faster, with more quality loss. Turning raw input differences into a usable estimate needs a set of coefficients fitted to each model, which is why every TeaCache node asks which model you are running.
The paper's headline result is up to 4.41× faster on Open-Sora-Plan, with a 0.07% drop in VBench score. That is the authors' figure for one model, not a ComfyUI number.
ComfyUI-TeaCache: node, models and settings
Add TeaCache after Load Diffusion Model, or after Load LoRA if you use one, and pass its MODEL output on. Its inputs are model_, rel_, start_, end_ and cache_. Setting rel_ to 0 returns the model unchanged. The pack also adds a Compile Model node that wraps torch, and a separate TeaCacheForCogVideoX node for kijai's CogVideoX wrapper.
The model_ menu offers FLUX, FLUX-Kontext, Lumina 2, HiDream-I1 (Full, Dev and Fast), LTX-Video, HunyuanVideo and eight Wan 2.1 entries. The README's recommended settings for the video models, with the speed-up as the README states it:
| Model | rel_ | start_ | end_ | README's speed-up |
|---|---|---|---|---|
| ModelHunyuanVideo | rel_l1_thresh0.15 | start_percent0 | end_percent1 | README's speed-up~1.9x |
| ModelLTX-Video | rel_l1_thresh0.06 | start_percent0 | end_percent1 | README's speed-up~1.7x |
| ModelCogVideoX | rel_l1_thresh0.3 | start_percent0 | end_percent1 | README's speed-up~2x |
| ModelWan2.1 T2V 1.3B | rel_l1_thresh0.08 | start_percent0 | end_percent1 | README's speed-up~1.6x |
| ModelWan2.1 T2V 14B | rel_l1_thresh0.2 | start_percent0 | end_percent1 | README's speed-up~1.8x |
| ModelWan2.1 I2V 480P 14B | rel_l1_thresh0.26 | start_percent0 | end_percent1 | README's speed-up~1.9x |
| ModelWan2.1 I2V 720P 14B | rel_l1_thresh0.25 | start_percent0 | end_percent1 | README's speed-up~1.6x |
| ModelWan2.1 T2V 1.3B ret-mode | rel_l1_thresh0.15 | start_percent0.1 | end_percent1 | README's speed-up~2.2x |
| ModelWan2.1 T2V 14B ret-mode | rel_l1_thresh0.2 | start_percent0.1 | end_percent1 | README's speed-up~2.1x |
| ModelWan2.1 I2V 480P ret-mode | rel_l1_thresh0.3 | start_percent0.1 | end_percent1 | README's speed-up~2.3x |
| ModelWan2.1 I2V 720P ret-mode | rel_l1_thresh0.3 | start_percent0.1 | end_percent1 | README's speed-up~2x |
The README does not say what hardware or step count these were timed on. Its advice for poor output is to lower rel_, and to leave the start and end percentages alone. The ret-mode ("retention mode") entries were added for Wan 2.1 in March 2025, which the README says improves both speed and quality. For cache_, cuda is faster and uses slightly more VRAM; cpu adds no VRAM and is slightly slower.
Why ComfyUI-TeaCache says Import Failed
(IMPORT FAILED) in the console or in ComfyUI Manager means Python raised an error while loading the pack, so none of its nodes registered. Scroll up to the traceback; its last line names the cause.
| Error | Cause | Status |
|---|---|---|
Errorcannot import name 'precompute_ | CauseComfyUI's LTX-2 support (PR #11632, merged 2026-01-05) removed that function | StatusIssue #178, open. Four fix PRs (#179, #181, #182, #185), none merged |
ErrorA traceback ending in nodes_ or inside diffusers | Causediffusers is missing or outdated in ComfyUI's Python | StatusMaintainer's fix: install the pack's requirements |
Errorcannot import name 'apply_, 'latent_ or No module named 'comfy | CauseComfyUI is older than the pack expects | StatusMaintainer's fix: update ComfyUI |
ErrorManager reports a conflict on CompileModel | CauseTeaCache and MagCache, among others, both register a node with that name | StatusMaintainer said in March 2025 the warning does not affect use; some users replied that it did |
To check whether your ComfyUI has the function the stock pack imports, run this from the folder that contains ComfyUI:
grep - n "^def precompute_ freqs_ cis" ComfyUI/ comfy/ ldm/ lightricks/ model .py
On ComfyUI's master branch on 2026-10-10 it prints nothing, so the unpatched pack cannot load. The newest release then was v0.39.0.
For the diffusers case on the Windows portable build, install the requirements into the embedded Python, not a system one. The file asks for einops >= 0.7.0 and diffusers >= 0.31.0:
.\python_ embeded\python .exe - m pip install - r ComfyUI\custom_ nodes\ComfyUI- TeaCache\requirements .txt
The patches in issue #178
Users in the thread posted several hand edits to the pack's nodes, and later commenters reported each one working. They are not the same fix. One imports a function of the same name from ComfyUI's Llama text-encoder code. Going by the two source files, that function takes different arguments from the call TeaCache makes in its LTX-Video path. So that edit gets the pack loading, but would likely break LTX-Video caching. That is our reading of the code; we have not tested any of the patches. Every one of them is overwritten when the pack is reinstalled or updated.
A separate runtime error is also open: teacache_ (issue #187, March 2026), reported for FLUX after a ComfyUI update.
TeaCache and Wan 2.2
The welltop pack has no Wan 2.2 entry. Issue #165, "WAN 2.2 SUPPORT", has been open since July 2025. One user there reported that picking a Wan 2.1 setting for Wan 2.2 14B gave poor results even at a threshold of 0.05. Another pointed out that the 14B model is two experts, high-noise and low-noise, run by two samplers, and suggested one TeaCache node per expert with a higher threshold on the high-noise one. Neither gave tested numbers.
Your options for Wan 2.2:
- WanVideoWrapper's WanVideo TeaCache. The wrapper picks coefficients from the model file name: a name containing
highorlowselects its Wan 2.2 entries. In the source, those Wan 2.2 TeaCache entries are copies of the Wan 2.1 14B T2V and 720p I2V coefficients. For the 5B model the loader logs that no TeaCache or MagCache coefficients exist and suggests EasyCache. - MagCache. Its authors published Wan 2.2 support, covered below, but the ComfyUI node no longer lists it.
- ComfyUI's native EasyCache. It does not need per-model coefficients, and ComfyUI's Wan model code has the hook it uses.
Our Wan 2.2 models folder page lists the two expert files and which template loads which.
Kijai's WanVideoWrapper cache nodes
The wrapper does not use a MODEL connection. Its cache nodes output cache_, which you connect to the optional cache_ input of WanVideo Sampler. They only work with models loaded by the wrapper's own loader, and the welltop node cannot attach to those either.
| Node | Main setting | Default | Other defaults |
|---|---|---|---|
| NodeWanVideo TeaCache | Main settingrel_ | Default0.3 | Other defaultsstart_ 1, use_ on, mode e |
| NodeWanVideo MagCache | Main settingmagcache_ | Default0.02 | Other defaultsmagcache_ 4, start_ 1 |
| NodeWanVideo EasyCache | Main settingeasycache_ | Default0.015 | Other defaultsstart_ 10 |
The TeaCache tooltip suggests 0.05 to 0.08 for the 1.3B model and 0.15 to 0.30 for the others. The threshold should be about ten times smaller with use_ off. The node's description warns that skipping the early steps hurts motion, and that starting later can help. All three default cache_ to the offload device, normally system RAM rather than the GPU.
MagCache in ComfyUI
MagCache, from Zehong-, predicts which steps to skip from how the magnitude of the model's output changes between steps (arXiv 2506.09045, accepted at NeurIPS 2025). Its ComfyUI pack, Zehong-, adds a MagCache node with magcache_, retention_ and magcache_. Its README claims 2x to 3x with acceptable quality loss on the default settings, and gives per-model values: 0.24, 0.2 and 6 for the Wan 2.1 14B models.
Wan 2.2 is where it gets confusing:
- The research repo claims 1.5x to 2x on Wan 2.2 and lists a TI2V 5B 720p run on one L20 at about 10 min 39 s without MagCache and 5 min 24 s with it. That uses Wan's own script, not ComfyUI.
- Wan 2.2 entries were added to the ComfyUI node on 2025-08-25. The HunyuanVideo 1.5 update on 2025-11-22 removed them from the node's menu, though the values are still in
nodes. Issue #41 reports this and is open..py - The author confirmed threshold 0.06, K 2 and retention ratio 0.2 for Wan 2.2 I2V in issue #34. The research repo's own example commands use a retention ratio of 0.4 for T2V and 0.1 for I2V.
The pack imports the same removed function as TeaCache, so it also fails to load on current ComfyUI (issues #42 to #44). Its last commit was 2025-11-27.
EasyCache, built into ComfyUI
ComfyUI added EasyCache and LazyCache in August 2025 (PR #9496). Both are in the node menu under advanced/ and marked experimental. EasyCache follows the H- method. It looks only at what goes into and comes out of the model on each step, so it needs no per-model coefficients. The PR describes LazyCache as a simpler, generally worse variant that works with anything, and says to try EasyCache first.
| Input | Default | What it does |
|---|---|---|
Inputreuse_ | Default0.2 | What it doesHigher skips more steps |
Inputstart_ | Default0.15 | What it doesNo skipping before this point in sampling |
Inputend_ | Default0.95 | What it doesNo skipping after this point |
Inputverbose | Defaultoff | What it doesLogs the change rate seen on every step |
At the end of sampling the console prints a line starting EasyCache - skipped, with steps skipped out of the total and a speed-up. That speed-up is total steps divided by steps actually run, worked out in the code. It is not a timing, and the VAE decode and model loading are not in it.
For MiniMax H3, a community report on an RTX 4060 Ti 8GB, collected on our system requirements page, gave about 20 minutes cold and 12 with EasyCache. That is the poster's figure, not ours, and for a different model from Wan.
With 4-step LoRAs, caching has little left to skip
The Wan 2.2 lightx2v LoRAs cut sampling to 4 steps. Asked in July 2025 whether TeaCache or EasyCache is worth using with the lightx2v LoRA then available for Wan 2.1, Kijai replied that EasyCache is the only one that can work, because it is not tuned to a model. He added that, with the distillation LoRAs, he got roughly what lowering the step count would give. MagCache's author, asked about 4-step HunyuanVideo 1.5 in November 2025, said speeding up a 4-step run is hard, because every step of a distilled model matters.
Our reasoning, not a measurement: the cache nodes above protect the first steps (start_, start_, retention_), and four steps leave little after that. Distillation and caching both remove steps, so pick one first. The lightx2v LoRA page covers the 4-step settings. SageAttention is a different lever: it makes each step cheaper rather than skipping steps.
What it costs and how to check it works
Every cache node trades quality for time. The welltop README describes its figures as "without much visual quality degradation", and MagCache's README says its Wan 2.1 output was not as good as the unquantised original. Neither is a guarantee for your prompt.
None of these saves VRAM. On MiniMax H3, our RTX 3060 cache-node test measured peak VRAM between 11,163 and 11,773 MiB with each node, against 11,305 to 11,679 MiB in three runs with none. Our measurements there were of a different TeaCache port, Icyoung/, not the welltop pack. It measured 1.937× and 1.935× faster than a 597.0 second baseline. Its author claims 3.0×, measured on different hardware.
The same page has a check that catches a cache node that loaded but does nothing. Run the workflow twice with a fixed seed and no cache node, and confirm the video data matches. Then add the node: if the video data is still identical, it is not caching. Save a clean baseline workflow first, as our ComfyUI guide suggests, so you can go back to it. Other errors are on our troubleshooting page, and the official templates are on our workflows page.
What nobody has published
- A maintained fork of ComfyUI-TeaCache that loads on current ComfyUI and is listed as the replacement.
- TeaCache coefficients fitted to Wan 2.2. The copies in WanVideoWrapper are Wan 2.1's.
- A same-machine comparison of TeaCache, MagCache and EasyCache on Wan 2.2 in ComfyUI, with time, peak VRAM and side-by-side output.
Wan 2.2 is not one of the system requirements checker's presets yet; only MiniMax H3 is.
Licence and downloads
These are code, not model files. welltop-, ali-, Zehong-, Zehong- and kijai/ are under the Apache 2.0 licence. ComfyUI, which includes EasyCache, is GPL-3.0. We do not host any of these files. Install them from the repositories named here.
GenVidKit is an independent guide. It is not affiliated with Alibaba, welltop-cn, Zehong Ma, Kijai, Comfy Org or the Wan team.
Sources
All read on 2026-10-10.
- welltop-cn/ComfyUI-TeaCache — README settings table,
nodesmodel list and inputs,.py requirements, last commit..txt - ComfyUI-TeaCache issues #178, #165, #187, #161, #144, #123 and #95 — import errors, Wan 2.2, the maintainer's replies.
- ali-vilab/TeaCache and arXiv 2411.19108 — the method, the authors, supported models, the 4.41× figure.
- ComfyUI PR #11632 and
comfy/— the removed function.ldm/ lightricks/ model .py - ComfyUI
comfy_and PR #9496 — EasyCache and LazyCache inputs, defaults and log line.extras/ nodes_ easycache .py - kijai/ComfyUI-WanVideoWrapper —
cache_, the coefficient selection inmethods/ nodes_ cache .py nodes_, the sampler'smodel_ loading .py cache_input.args - WanVideoWrapper issue #811 — Kijai on caching with distillation LoRAs.
- Zehong-Ma/ComfyUI-MagCache, its commit history and issues #27, #34, #37, #41 and #42 — node inputs, recommended values, Wan 2.2 history, the 4-step reply.
- Zehong-Ma/MagCache and its MagCache4Wan2.2 README — the method, the Wan 2.2 claim and L20 timing.
- Our MiniMax H3 cache-node test — our only cache measurements.