DeepCache_Fix
ComfyUI's free-lunch SDXL speedup (and why it keeps breaking)
- model
- MODEL
DeepCache_Fix is one of those "too good to be true" nodes that mostly lives up to the hype while it works. Drop it between your checkpoint and your sampler and it makes each denoise step cheaper by caching part of the UNet, cutting render times by roughly a third - no retraining, no LoRA, no distilled checkpoint. The catch: it's a single-file Chinese pack that reaches straight into ComfyUI's internals, so it's a time capsule. The community consensus by late 2025 was that it doesn't run on current ComfyUI builds unless you pin the version. Great when it works, and honest about what it is.
What it's actually for
The README targets SDXL + LCM specifically: "ensures consistency pre and post acceleration, ideal for bulk image production." That's the pitch - if you're cranking out hundreds of images from a static workflow, you want them all to share the same look, and caching keeps accelerated and unaccelerated outputs visually consistent in a way distillation can't. It also plays nice with distilled models like LCM or Turbo, which get you to 4–16 steps and then this node shaves those steps further. It's not the tool for a one-off hero image; it's the tool for the batch job.
How it works
The mechanism comes from the DeepCache paper (same idea mcmonkey had gisted back in 2023 - the technique has had legs). Each denoising step, the shallow, low-resolution part of the UNet recomputes fully, but the deep, high-res feature maps barely change from step to step. So DeepCache_Fix computes the deep layers once, then reuses that cached output for the next few steps instead of recomputing them. It's a wrapper around your MODEL, and it's real - the code monkey-patches the UNet forward pass, and on "cache" steps it early-breaks the input blocks, skips the middle block, and loads the saved deep features back in.
The wrinkle the author adds over vanilla DeepCache is start_steps / end_steps: caching only runs inside that step window. Their own workflow runs 10 steps with caching on steps 0–6, then hands the last 4 steps to the full, uncached model to "polish" the details. Leave the final few steps unaccelerated and you keep most of the speed while dodging the muddy-detail failure mode.
The inputs that matter
Only one input is a model - the rest are four integers and three toggles, and honestly you'll touch maybe two:
- cache_interval (default 3) - how often the deep layers get fully recomputed. Every N steps a fresh cache is built; in between, it's reused. Lower = slower but cleaner.
- cache_depth (default 3) - how many UNet output blocks get skipped. Higher = more speed, more risk of artifacts.
- start_steps / end_steps (defaults 0 / 12) - the window where caching is active. Set
end_stepsa few below your total step count. - input_cache / middle_cahce / output_cache - Yes/No toggles for the three cache layers. Note the typo in
middle_cahce: that's the actual name in the node UI, not a mistake on your end.
The single output is a MODEL - wire it into your KSampler exactly where the raw checkpoint used to go.
Installing it
Via ComfyUI Manager, search "DeepCache-Fix", or:
cd ComfyUI/custom_nodes
git clone https://github.com/SoftMeng/ComfyUI-DeepCache-Fix
Then restart ComfyUI. There are no dependencies and no model downloads - no requirements.txt, it just imports comfy and torch. That's the good news and the bad news.
Where people get burned
The fragile part is that it imports comfy.ldm.modules.diffusionmodules.openaimodel directly - private plumbing, not a public API. Every ComfyUI release can quietly move that furniture, and one already did. A well-upvoted October 2025 thread asking "is there a way to accelerate SDXL in the latest ComfyUI" opens with: the deepcache-fix node provided huge acceleration for SDXL, but hasn't been updated in a year and doesn't work with the latest versions. So:
- If it errors out after a ComfyUI update, that's expected - pin ComfyUI to the release it worked on, or accept it's retired.
- Alternatives people actually switched to: ComfyUI-FSampler (step skipping, converging samplers only - no Euler-A), or styler00dollar/ComfyUI-deepcache.
- Quality: too aggressive (interval 1–2, depth high) makes details blurry. And the original DeepCache was known to distort AnimateDiff output - don't expect free speed on video.
It's a niche, dated, genuinely useful node. If you run a big SDXL LCM batch and your ComfyUI version is old enough to host it, grab it. If you're on current ComfyUI, treat it as the reason those FSampler forks exist.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| cache_interval | INT | 31–1000 | — |
| cache_depth | INT | 30–12 | — |
| start_steps | INT | 00–100 | — |
| end_steps | INT | 120–100 | — |
| input_cache | COMBO | Yes | 2 options: No, Yes |
| middle_cahce | COMBO | Yes | 2 options: No, Yes |
| output_cache | COMBO | Yes | 2 options: No, Yes |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |