Nodes/ComfyUI-DonutNodes/Donut SDXL TeaCache Stats
ComfyUI Node

Donut SDXL TeaCache Stats

See what TeaCache actually did to your SDXL model

By DonutsDelivery·Created about a year ago·Updated about 12 hours ago· 25
Donut SDXL TeaCache Stats
  • model
  • model
  • stats

TeaCache is the speed trick that reuses a UNet's output when consecutive denoising steps barely change the input. It's genuinely good, but it's also black-box - you flip on caching, the image renders faster, and you have no idea how many steps actually got skipped or whether the cache even kicked in. Donut SDXL TeaCache Stats is the dashboard for that: a tiny companion node that reads the caching state off a TeaCache-patched model and tells you what's happening.

What it does

You give it a model that has been through Donut SDXL TeaCache, and it hands back:

  • model - the same model, passed through untouched. This means you can drop it inline in your chain without disturbing anything.
  • stats - a STRING report showing the accumulated cache distance, whether the last step calculated fresh or used the cache, and whether a cached output exists.

That last string is the useful part. Wire it into a text-display node (or anything that renders STRING) and you get a readout like "Cache Status: ✅ USING CACHE" vs "❌ CALCULATING" - which tells you, at a glance, whether your threshold is tuned for actual skips or if every step is still computing.

Where it goes in the graph

TeaCache state lives on the diffusion model object, so the stats node has to be wired to the same patched model the sampler uses:

Load Checkpoint → Donut SDXL TeaCache → Donut SDXL TeaCache Stats → KSampler

Note the position. If you put it before the TeaCache node, or on a different model branch, you'll get the honest message "No TeaCache state found. Model may not have TeaCache applied or hasn't been run yet." That's not a bug - the state only appears after a model carrying the cache patch actually gets sampled, and it resets at the start of each run.

Using it well

This is a tuning tool, not a permanent fixture. The workflow: set your cache_threshold and cache_mode, run, and read whether the cache is engaging. If it reports "CALCULATING" constantly, your threshold is too strict for this sampler and you're paying full compute - nudge the threshold up. If it's "USING CACHE" on nearly every step, check the image quality, because aggressive skipping is where artifacts creep in. You're looking for the middle: mostly cached, occasionally fresh.

The same caveat applies here as to the main node - TeaCache is a 2025-era SDXL optimization, and its wins come from iterative work (prompt sweeps, batches, A/B tests) rather than single generations. On those workloads the stats node earns its place by turning a gut feeling about "did that help?" into a number you can read.

Install

It's part of the ComfyUI-DonutNodes pack - install the pack, get this node:

  1. ComfyUI Manager → search "DonutNodes" → install → restart.
  2. Or git clone https://github.com/DonutsDelivery/ComfyUI-DonutNodes.git into ComfyUI/custom_nodes (the README clones it as donutnodes), then pip install -r requirements.txt with the same Python that runs ComfyUI.

Dependencies are light - opencv-python-headless, scipy, matplotlib, psutil, tqdm, requests - and there's nothing model-sized to download. It pairs naturally with DonutSDXLTeaCache and the rest of the Donut enhancement family, but it'll happily sit in a stock SDXL workflow too.

CategoryDonutNodes

Inputs (1)

NameTypeDefaultDescription
modelMODELTeaCache-enabled SDXL model to get stats from.

Outputs (2)

NameTypeDescription
modelMODEL
statsSTRING