Nodes/ComfyUI Easy Use/easy cleanGpuUsed
ComfyUI Node Runs on cloud

easy cleanGpuUsed

Flush VRAM mid-workflow

By yolain·Created 3 years ago·Updated 12 days ago· 2,647
easy cleanGpuUsed
  • anything
  • output

easy cleanGpuUsed is the manual "flush the GPU" lever. Wire it between two memory-hungry stages of a workflow, and when execution reaches it, it forcibly unloads ComfyUI's resident models and empties the CUDA cache so the next stage starts with the VRAM it needs. It's a passthrough - data goes in one side and out the other unchanged - so dropping it on a wire doesn't alter your pipeline, it just clears memory at that point.

It's a small Logic node in the ComfyUI Easy Use pack by yolain (an efficiency pack built on the older TinyTerra nodes). It was rewritten in v1.1.5 to actually clear ComfyUI's model memory, and got its passthrough output slot in v1.2.3 - the version that made it easy to splice into a graph rather than dangle off the end. One casing wobble: the class is easy cleanGpuUsed but older notes call it easy cleanGPUUsed. Same node.

The problem it solves

VRAM is a hard ceiling. When a model doesn't fit, your options are grim: spilling to system RAM is roughly 11x slower over PCIe, so "just use more RAM" isn't really a thing for generation. ComfyUI manages VRAM automatically and does a decent job, but it can't always predict a graph where two heavy models want to be resident at once.

That's the case this node is built for: multi-stage workflows that OOM at the handoff. Generate an image with a big base model, then upscale it with a different model. Run a Flux pass, then a separate video or refiner stage. The first model is still sitting in VRAM when the second one tries to load, and you hit CUDA out-of-memory even though neither model alone would blow the budget. Insert easy cleanGpuUsed between the two stages and it evicts the first before the second loads.

How it works

The mechanism is the type-preserving passthrough. The one input, anything, accepts a wildcard type (*) - a latent, an image, a model, whatever you route through it - and output hands back the exact same thing, same type. Its side effect, not its data flow, is the point: reaching this node triggers ComfyUI to unload models and clear the GPU cache before passing the value along.

Two things make that reliable. It's an output node, so ComfyUI always executes it rather than pruning it as dead weight. And because it's a passthrough on the wire, placement controls timing - put it on the wire carrying your finished first-stage result into the second stage, and the eviction lands in the gap between them, exactly where you want it.

Using it

There's really only one input that matters: anything. Wire the output of the stage you just finished into it, and take output into the next stage. That's it - the node is a pipe with a broom attached.

The one thing to get right is where it sits. It only frees memory when it runs, and it only runs when the graph reaches it. Route it off to the side, off the critical path between your two big models, and the flush fires at the wrong moment and you OOM anyway. Keep it directly on the wire between the stages you're separating.

Where people get it wrong

It frees memory; it can't create it. If a single model doesn't fit your card, no amount of cleanup rescues it - there's nothing useful to evict. The structural fix there is quantization (a GGUF Q4–Q6 or fp8 build) or a lower resolution, not this node. Reach for cleanGpuUsed only when each stage fits individually but they collide when resident together.

On a single-model workflow it does close to nothing. ComfyUI already manages VRAM for one model; there's no second stage to make room for. If you sprinkled these in expecting a speedup, that's not what they do - it's a targeted tool for the multi-model OOM, not a performance knob.

It's a workaround, not a cure. It papers over a workflow asking for more VRAM than you have at one instant. Legitimate - plenty of good two-model pipelines need exactly this - but if you're inserting three of them to keep a graph alive, the honest read is that the graph wants a bigger card or smaller models.

Installing it

You install the whole pack:

  • ComfyUI Manager - search ComfyUI Easy Use (or ComfyUI-Easy-Use), install, restart.
  • Manual - cd ComfyUI/custom_nodes && git clone https://github.com/yolain/ComfyUI-Easy-Use, install the requirements (install.bat on Windows, or pip install -r requirements.txt), and restart.

No model download, no companion pack - one of the pack's leanest nodes. As with any custom node, the pack installs Python into your shared ComfyUI environment, so if something breaks right after adding Easy Use, suspect dependency conflicts first. But cleanGpuUsed itself is about as self-contained as nodes get.

CategoryEasyUse/Logic

Inputs (1)

NameTypeDefaultDescription
anything*

Outputs (1)

NameTypeDescription
output*