Delete Model (Passthrough Any)
Delete a model from VRAM (and system RAM) without breaking your workflow
- data
- model
- output
You're running a long workflow on 8GB of VRAM, and it keeps dying with an OOM error at the exact moment the diffusion model loads. ComfyUI's memory manager sees you're done with the CLIP, so it doesn't drop it - it unloads it into system RAM, ready to be reloaded fast if you need it again. That's great until your RAM is full too, and then nothing works. This node's answer: actually delete the model instead of parking it, while passing whatever data you care about straight through the graph.
The flagship node of Isi-dev's little pack is refreshingly simple. It takes two inputs, both typed as "anything": data (the output you want to keep flowing, say a CONDITIONING or LATENT) and model (the loaded model to destroy). Out the other end comes output - your data, untouched. The model never touches the output; it's just collateral the node uses to clean house.
How it actually works
Peek at the source and it's a proper cleanup, not a casual del. The node first removes the model from ComfyUI's loaded_models() registry so the built-in memory manager stops tracking it, then walks the object detaching every parameter and buffer, nulling out heavy attributes (transformers, tokenizers), and finally hits it with gc.collect(), torch.cuda.empty_cache() and torch.cuda.ipc_collect(). It prints a before/after report to your console - how many models ComfyUI is tracking, RAM percent change, and how many GB of VRAM came back.
Here's the honest catch, and the author's own code confirms it: the full node also calls free_memory(1e30, ...), which tells ComfyUI to free everything it's currently managing, not just your target. So despite the name, "Delete Model (Passthrough Any)" is a blunt instrument - it can evict models you still wanted around. If you want a surgical delete that only touches the model you point at, use its sibling Delete Model Light instead. This one is for "the CLIP is done, I never want it again, get it all out of my way."
When it's worth it (and when it's a trap)
ComfyUI's default behavior - offload to RAM, keep a cache - is genuinely good if you have enough system RAM. This node throws that away on purpose: the model is gone, and if any node downstream still expects it, your run breaks. The README lists the trade-offs plainly: slower reloads from disk, no caching benefit, and a one-way door. Reach for it only when the model is truly finished, in a low-RAM machine, or in a workflow that stacks multiple heavy models (a text encoder, a ControlNet, a full checkpoint) that can't all live at once. If you're deleting a model that another node still references, you'll see PARTIAL: Model may still be referenced somewhere in the console - that's the node telling you something else has a grip on it.
Install
ComfyUI Manager, search "DeleteModelPassthrough", or clone it manually:
cd ComfyUI/custom_nodes
git clone https://github.com/Isi-dev/ComfyUI_DeleteModelPassthrough
pip install -r requirements.txt
Restart ComfyUI. There are no model files to download - requirements.txt is just torch and psutil, and you already have torch; psutil is the real dependency. The pack labels itself WIP and the README's clone URL points at a differently-named repo, so install through Manager to avoid that little trap. One workflow note: wire the node after the last place the model is consumed, and connect your still-needed data into data so it rides through to the sampler.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| data | * | — | |
| model | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output | * | — |