ComfyUI Node

Deep Cache

A free speedup for SD1.5/SDXL that doesn't need a special checkpoint

By styler00dollar·Created 3 years ago·Updated 2 years ago· 11
Deep Cache
  • model
  • MODEL
cache_interval5
cache_depth3
start_step0
end_step1000

If you've ever put TeaCache or EasyCache on a Wan video workflow, you already get DeepCache - it's the same idea, just older and built for still images instead of video. Diffusion sampling wastes a lot of compute recomputing things that barely changed since the last step. DeepCache notices that and skips the redundant work. No LoRA, no swapping to a distilled checkpoint, no touching CFG. You patch the model, sample exactly like you normally would, and it just finishes faster.

That "no special checkpoint" part is the whole pitch, and it's worth sitting with for a second. Techniques like SDXL Lightning or LCM get their speed by training a different model that needs different CFG and a different step count - get those settings wrong and you get oversaturated garbage. DeepCache is training-free: it wraps the model you already loaded and leaves your normal sampler settings alone. That's a genuinely different category of speedup, and it's why it's still worth knowing even though the node itself hasn't been touched since it shipped in December 2023.

How it actually works

The underlying research (DeepCache, from horseee, published as a paper right around when this node came out) exploits the U-Net's structure: the deep, high-level features inside the network change very little from one denoising step to the next, while the shallow, low-level features change more. So instead of recomputing the whole network every step, DeepCache reuses the cached high-level features and only redoes the cheap low-level part - then, every so often, does a full uncached pass to keep the cache from drifting. The original paper reports roughly a 2.3x speedup on SD1.5 with barely any measurable quality loss. This specific ComfyUI packaging is styler00dollar wrapping that idea into a node - the README says as much itself, crediting laksjdjf's original gist and noting the repo exists purely so you can git clone it instead of copy-pasting a gist.

The inputs and outputs that matter

It's a model patcher, same shape as a LoRA loader: model in, patched model out, wire it between your checkpoint loader and your KSampler.

  • model - the model to patch.
  • cache_interval (default 5, range 1–1000) - how many steps between full, uncached refresh passes. Lower is safer and slower; push it higher and you save more time but risk the cache going stale.
  • cache_depth (default 3, range 0–12) - how far into the U-Net the caching reaches. Higher depth caches more of the network for more speed, at more risk to fine detail. Set it to 0 and you've basically turned the node off.
  • start_step / end_step (default 0 and 1000) - the step range caching is active over, given in absolute step counts, not percentages. Since almost no real workflow runs anywhere near 1000 steps, the defaults mean "active for the entire run." Tighten end_step down if you want the last few steps computed fully, uncached, to recover detail right at the finish line.

Output is just MODEL - feed it straight into your sampler like any other model patch.

Installing it

Two ways, both standard:

  • ComfyUI Manager - search "ComfyUI-deepcache," install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/styler00dollar/ComfyUI-deepcache, then restart.

There's genuinely nothing else to it. The README is three sentences long and doesn't mention any dependencies or model downloads, because there aren't any - it's a pure model-patching node, not something that needs its own weights.

Common issues & troubleshooting

Animation workflows get distorted. People running this with AnimateDiff have reported it doesn't play nicely with context_options - you can see real distortion in the output, even while getting a real 30-40% reduction in render time. If you're doing anything frame-windowed, test carefully before trusting it on a long run.

Faces and fine detail go soft first. This is the general caching tax, not a bug - push cache_interval and cache_depth too high and the parts of the image that change most between steps (faces, texture) are what visibly degrade. If a result looks mushy, back off cache_depth before you touch anything else.

No changelog, no maintenance. The repo hasn't moved since it shipped, so there's no upstream fix to check if something behaves oddly on a newer checkpoint architecture. If you hit weirdness that isn't explained by the above, the fastest diagnosis is pulling the node out and comparing - there's no author support to lean on here.

Categoryloaders

Inputs (5)

NameTypeDefaultDescription
modelMODEL
cache_intervalINT51–1000
cache_depthINT30–12
start_stepINT00–1000
end_stepINT10000–1000

Outputs (1)

NameTypeDescription
MODELMODEL