easy clearCacheAll
Force ComfyUI to dump its caches mid-graph
- anything
- output
ComfyUI is aggressive about caching. It keeps models resident, holds node outputs so it can skip re-running unchanged branches, and generally hoards memory to stay fast. Ninety percent of the time that's exactly what you want. The other ten percent - a long batch that creeps toward an out-of-memory crash, a workflow chaining several big models, a machine you'd like to hand back to something else afterward - you want a button that says let go of all of it right now. That's easy clearCacheAll.
It forcibly clears ComfyUI's cached memory usage: the node-output cache and the model cache both. Think of it as the manual override for ComfyUI's memory manager, dropped into the graph exactly where you need the flush to happen.
How it works, and the clever part
Here's the thing that trips people up about "utility" nodes in a graph: a node only runs when something downstream needs its output. A cache-clear node with no connections is a node ComfyUI can skip. So clearCacheAll is built as a pass-through - it takes one input, anything, and hands it straight back out as output. You don't bolt it on the side; you splice it into a wire. The value flows through untouched, and as it passes, the caches get dumped.
That means the placement is the whole design. Wire it between the stage that just finished with a big model and the stage that's about to load the next one, and you get the flush at precisely the moment you have the most to free and haven't yet allocated what's next. Put it at the tail of a loop body and each iteration cleans up after itself.
The inputs and outputs
There's exactly one of each, and that's the point:
anything(input, any type) - whatever you want to route through. A latent, an image, a model, a plain string - it doesn't care. It's a passenger; the node just needs a wire to sit on so it's guaranteed to execute.output(any type) - the same value, passed through unchanged, so the rest of your graph continues as if the node weren't there.
No settings, no options. It clears everything it can, every time it runs.
Installing it
ComfyUI Manager: search ComfyUI Easy Use, install, restart. Or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/yolain/ComfyUI-Easy-Use
then install the requirements (install.bat on Windows, otherwise pip install -r ComfyUI-Easy-Use/requirements.txt) and restart. No extra models or downloads for this one - it's pure plumbing.
Common issues & when to actually use it
The memory buildup this addresses is real and people hit it. One well-liked thread on the pack is a user reporting ComfyUI getting sluggish after ~100 SDXL generations and finding the Easy-Use nodes cleared it up - the same family of problem this node targets head-on.
A couple of things to keep straight:
- It costs you the cache you cleared. The next time a dropped model is needed, it reloads from disk. That's the trade - free memory now, pay a reload later. So don't sprinkle it everywhere; place it where a genuine memory cliff is.
- If it seems to do nothing, check it's actually in the execution path. Because it works by passing a value through, a clearCacheAll whose output isn't wired to anything ComfyUI ends up rendering will simply never run. Splice it into a live wire, not a dead end.
- If you specifically want to free VRAM off the GPU rather than clear the node cache, note the pack also ships
easy cleanGPUUsed- related idea, different target.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| anything | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | — |