ComfyUI TeaCache: Import Failed, Wan 2.2 and What Works Now

Updated 2026-10-10

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-cn/ComfyUI-TeaCache, 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_freqs_cis' from 'comfy.ldm.lightricks.model', shown as (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.
RouteNodeWan 2.2Status on 2026-10-10
Routewelltop-cn/ComfyUI-TeaCacheNodeTeaCacheWan 2.2NoStatus on 2026-10-10Fails to load without a hand patch; last commit 2025-07-12
RouteZehong-Ma/ComfyUI-MagCacheNodeMagCacheWan 2.2In the code, but dropped from the menu in Nov 2025Status on 2026-10-10Same import error; last commit 2025-11-27
Routekijai/ComfyUI-WanVideoWrapperNodeWanVideoTeaCache, WanVideoMagCache, WanVideoEasyCacheWan 2.2Yes, picked from the model file nameStatus on 2026-10-10Last commit 2026-05-24; works with the wrapper's own nodes only
RouteComfyUI coreNodeEasyCache, LazyCacheWan 2.2Not model-specificStatus 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-vilab/TeaCache.

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_l1_thresh. 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_type, rel_l1_thresh, start_percent, end_percent and cache_device. Setting rel_l1_thresh to 0 returns the model unchanged. The pack also adds a Compile Model node that wraps torch.compile, and a separate TeaCacheForCogVideoX node for kijai's CogVideoX wrapper.

The model_type 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:

Modelrel_l1_threshstart_percentend_percentREADME's speed-up
ModelHunyuanVideorel_l1_thresh0.15start_percent0end_percent1README's speed-up~1.9x
ModelLTX-Videorel_l1_thresh0.06start_percent0end_percent1README's speed-up~1.7x
ModelCogVideoXrel_l1_thresh0.3start_percent0end_percent1README's speed-up~2x
ModelWan2.1 T2V 1.3Brel_l1_thresh0.08start_percent0end_percent1README's speed-up~1.6x
ModelWan2.1 T2V 14Brel_l1_thresh0.2start_percent0end_percent1README's speed-up~1.8x
ModelWan2.1 I2V 480P 14Brel_l1_thresh0.26start_percent0end_percent1README's speed-up~1.9x
ModelWan2.1 I2V 720P 14Brel_l1_thresh0.25start_percent0end_percent1README's speed-up~1.6x
ModelWan2.1 T2V 1.3B ret-moderel_l1_thresh0.15start_percent0.1end_percent1README's speed-up~2.2x
ModelWan2.1 T2V 14B ret-moderel_l1_thresh0.2start_percent0.1end_percent1README's speed-up~2.1x
ModelWan2.1 I2V 480P ret-moderel_l1_thresh0.3start_percent0.1end_percent1README's speed-up~2.3x
ModelWan2.1 I2V 720P ret-moderel_l1_thresh0.3start_percent0.1end_percent1README'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_l1_thresh, 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_device, 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.

ErrorCauseStatus
Errorcannot import name 'precompute_freqs_cis' from 'comfy.ldm.lightricks.model'CauseComfyUI's LTX-2 support (PR #11632, merged 2026-01-05) removed that functionStatusIssue #178, open. Four fix PRs (#179, #181, #182, #185), none merged
ErrorA traceback ending in nodes_diffusers.py or inside diffusersCausediffusers is missing or outdated in ComfyUI's PythonStatusMaintainer's fix: install the pack's requirements.txt
Errorcannot import name 'apply_mod', 'latent_to_pixel_coords' or No module named 'comfy.ldm.wan'CauseComfyUI is older than the pack expectsStatusMaintainer's fix: update ComfyUI
ErrorManager reports a conflict on CompileModelCauseTeaCache and MagCache, among others, both register a node with that nameStatusMaintainer 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.py, 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_flux_forward() got an unexpected keyword argument 'timestep_zero_index' (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 high or low selects 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_args, which you connect to the optional cache_args 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.

NodeMain settingDefaultOther defaults
NodeWanVideo TeaCacheMain settingrel_l1_threshDefault0.3Other defaultsstart_step 1, use_coefficients on, mode e
NodeWanVideo MagCacheMain settingmagcache_threshDefault0.02Other defaultsmagcache_K 4, start_step 1
NodeWanVideo EasyCacheMain settingeasycache_threshDefault0.015Other defaultsstart_step 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_coefficients off. The node's description warns that skipping the early steps hurts motion, and that starting later can help. All three default cache_device to the offload device, normally system RAM rather than the GPU.

MagCache in ComfyUI

MagCache, from Zehong-Ma/MagCache, 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-Ma/ComfyUI-MagCache, adds a MagCache node with magcache_thresh, retention_ratio and magcache_K. 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.py. Issue #41 reports this and is open.
  • 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/debug and marked experimental. EasyCache follows the H-EmbodVis/EasyCache 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.

InputDefaultWhat it does
Inputreuse_thresholdDefault0.2What it doesHigher skips more steps
Inputstart_percentDefault0.15What it doesNo skipping before this point in sampling
Inputend_percentDefault0.95What it doesNo skipping after this point
InputverboseDefaultoffWhat 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_percent, start_step, retention_ratio), 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/ComfyUI-MiniMaxH3-TeaCache, 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-cn/ComfyUI-TeaCache, ali-vilab/TeaCache, Zehong-Ma/ComfyUI-MagCache, Zehong-Ma/MagCache and kijai/ComfyUI-WanVideoWrapper 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.