Donut SDXL TeaCache
Skip the UNet steps that barely change
- model
- model
TeaCache was the acceleration trick of early 2025 - every SDXL and Flux workflow thread had someone asking why their denoise was suddenly skipping steps. It works by noticing something most people don't: during denoising, consecutive steps often feed the UNet inputs that are nearly identical. Recompute them anyway and you've paid full price for a few percent of change.
Donut SDXL TeaCache is a drop-in version for SDXL checkpoints. You slot it between your checkpoint loader and your KSampler, and it patches the model's forward pass so that when the input between steps hasn't drifted past a threshold, the previous UNet output gets reused instead of recomputed. Same output socket, same wiring, fewer flops.
How it works
The node wraps the UNet forward and compares each new input against the previous one with a relative L1 distance. That distance feeds a small polynomial, and the value accumulates across steps. When the accumulated distance stays under your threshold, the model returns the cached output from the last real compute; once it crosses, it computes fresh and resets the counter. There's a real quality lever hiding in that math - raise the threshold and more steps skip, but the error compounds, so "aggressive" is a mood, not a promise.
The inputs that matter
- cache_threshold - a percentage, oddly, despite the slider. The tooltip is honest about what the numbers mean: 4% = quality, 5% = balanced, 10%+ = speed. Start at 5.
- cache_mode -
conservative/balanced/aggressive. This is just a multiplier on the threshold (0.5x / 1.0x / 1.5x), so it's a second way to say the same thing. Pick one and tune the threshold, don't fight both. - start_percent / end_percent - which slice of denoising gets caching. Caching late denoising steps is where the artifacts hide, so
0.0 → 0.8is a common compromise. - cache_device -
cuda(fast, eats VRAM) orcpu(slower but frees memory). On a card that's already tight,cpuis the move. - enable - yes, you can leave the node in place and flip this off. Handy for A/B testing speed vs. quality in the same graph.
The single output is model, and it feeds straight into the model input of any KSampler. That's the whole graph: Load Checkpoint → Donut SDXL TeaCache → KSampler → VAE Decode.
Install
This ships inside the ComfyUI-DonutNodes pack. Easiest path:
- In ComfyUI Manager, search for "DonutNodes" and install.
- Restart ComfyUI.
Manual, if you prefer:
cd ComfyUI/custom_nodes
git clone https://github.com/DonutsDelivery/ComfyUI-DonutNodes.git donutnodes
cd donutnodes
python -m pip install -r requirements.txt
Run the pip line with the same Python that launches ComfyUI. The pack pulls in opencv-python-headless, scipy, matplotlib, psutil, tqdm, and requests - nothing model-sized, no downloads.
Where people get burned
- It helps iterative work, not one-offs. TeaCache's wins come when similar inputs repeat - prompt refinement, batch generation, parameter sweeps. A single unique generation at low step counts won't show much.
- Quality loss at aggressive settings is real, not a rumor. If faces start wobbling or fine texture goes glassy, raise the threshold toward 4% or shrink the cached range.
- VRAM, not just speed. CUDA caching holds the previous output on the GPU. On 8GB cards the "free speed" can cost you elsewhere;
cpucache device is the escape hatch. - TeaCache is a 2025 technology. It's genuinely still useful on SDXL, but if you're chasing raw speed and don't have a loyalty to SDXL, the reason the hype cooled is that distilled models (Lightning/Turbo, Z-Image Turbo) got the same job done faster with no cache at all. Use this to make your existing SDXL workflow faster - not to start a new one.
The author, DonutsDelivery, is a CivitAI SDXL photorealism workflow creator, and this node comes from that same pack of LoRA-stacking, detailing, and enhancement tools. If you're already in the Donut ecosystem, this is the zero-risk speed knob.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The SDXL diffusion model TeaCache will be applied to. | |
| cache_threshold | FLOAT | 10.000–100 | Cache threshold % - higher values = more aggressive caching (4%=quality, 5%=balanced, 10%+=speed) |
| start_percent | FLOAT | 0.000–1 | Start percentage of denoising steps to apply TeaCache. |
| end_percent | FLOAT | 1.000–1 | End percentage of denoising steps to apply TeaCache. |
| cache_device | COMBO | cuda | Device where cache will reside. |
| enable | BOOLEAN | true | Enable/disable TeaCache. |
| cache_mode | COMBO | balanced | Cache mode preset that adjusts cache_threshold. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |