MagCache
The training-free way to make Wan, Flux and Chroma 2-3x faster
- model
- model
If you've used TeaCache before, the pitch for MagCache is simple: same idea, done better. It's a training-free caching node that skips redundant compute during diffusion sampling, and on Reddit it got introduced literally as "the successor of TeaCache." Drop it after your model loader, pick the right preset for your model, and you're generally looking at a 2-3x speedup with a quality hit you can dial to taste.
How it actually works
Diffusion sampling runs the model once per step, and across most of those steps the output doesn't change all that much from the previous one - a lot of that compute is redundant. Caching methods exploit this by skipping steps that are "close enough" to a cached one. TeaCache decides "close enough" from a relative L1 difference on the model's hidden states, which is noisy and needed per-model calibration to get right. MagCache instead tracks the magnitude of how the output shifts between timesteps, which the authors found to be a more stable signal, and pairs it with a table of pre-measured magnitude ratios per model family so it knows in advance roughly how much a given step is likely to change. When a step falls under your threshold, it reuses the cached result instead of running the model again.
That per-model table is why the node has a model_type dropdown instead of just working generically - it needs to know whether you're feeding it Wan, Flux, Chroma, or something else to look up the right ratios.
The inputs and outputs that matter
model- your loaded diffusion model, straight from Load Diffusion Model (or after a LoRA loader, if you're stacking one). Output is a patchedmodelyou send to your sampler.model_type- pick the one matching what you loaded:flux,flux_kontext,chroma,hunyuan_video, and several Wan 2.1/2.2 variants (1.3B/14B, i2v 480p/720p, VACE). Get this wrong and the magnitude table doesn't match your model - that's the single most common way to get bad output from this node.magcache_thresh(default 0.24) - how aggressively to cache. Higher skips more steps (faster, rougher); lower is conservative.retention_ratio(default 0.2) - the fraction of steps at the start of sampling that run untouched before caching kicks in, so early structure-setting steps aren't skipped.magcache_K(default 4) - the max number of consecutive steps it's allowed to skip in a row.start_step/end_step(0 / -1) - restrict which step range MagCache is active over, if you want it off for part of the schedule.
The README ships a table of recommended values per model (Flux, Chroma, Qwen-Image, HunyuanVideo, every Wan variant) - start there instead of the raw defaults, since the defaults are tuned for maximum speed and can look rough straight out of the box.
How to install it
- ComfyUI Manager - search ComfyUI-MagCache, install, restart.
- Manual:
then restart ComfyUI.cd ComfyUI/custom_nodes git clone https://github.com/Zehong-Ma/ComfyUI-MagCache cd ComfyUI-MagCache pip install -r requirements.txt
No model weights to download for the node itself - it patches whatever diffusion model you already have loaded. You do need that model in ComfyUI format for one of the supported families (the README links the standard Wan/HunyuanVideo/FLUX/Chroma download guides if you're missing one).
Common issues & troubleshooting
Output looks noticeably worse than normal. This is the expected trade-off, not a bug - the defaults are tuned for the fastest end of the 2-3x range. Turn down magcache_thresh and magcache_K together; the README says this explicitly, and it's the first thing to try before anything else.
Barely any speedup, or worse quality, on a 4-step distilled model. MagCache needs a reasonable number of steps to have anything worth skipping - the underlying paper's numbers assume 50-step Wan2.1, and community testing found real benefit starting around 7+ steps. If you're already on a heavily distilled speed LoRA (LightX2V, CausVid-style 4-step setups), there's not enough schedule left for caching to help; save MagCache for full-step runs instead of stacking it under a distillation LoRA.
Bad results on Wan 2.1 specifically, right after installing. Early adopters hit a real bug in how mag_ratios were indexed for Wan2.1, which the author fixed shortly after launch. If output looks wrong, git pull (or update via Manager) before assuming it's your settings.
No Skip Layer Guidance support. Some users hit this at launch - worth checking the pack's GitHub issues if you rely on SLG, since the project has kept shipping model support (Qwen-Image and HunyuanVideo-1.5 both landed in late 2025) and this may have moved since.
Your model isn't in the model_type list. See the companion MagCache Calibration node - it generates the magnitude table for models that need a custom fit.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The diffusion model the MagCache will be applied to. | |
| model_type | COMBO | wan2.1_t2v_1.3B | Supported diffusion model. |
| magcache_thresh | FLOAT | 0.240–0.3 | How strongly to cache the output of diffusion model. This value must be non-negative. |
| retention_ratio | FLOAT | 0.200.1–0.3 | The start percentage of the steps that will apply MagCache. |
| magcache_K | INT | 40–6 | The maxium skip steps of MagCache. |
| start_step | INT | 00–100 | The maxium skip steps of MagCache. |
| end_step | INT | -1-100–100 | The maxium skip steps of MagCache. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |