Nodes/Multimodal — LLM (Local-first: GGUF + Transformers)/Multimodal — Unload in-ComfyUI LLM / VLM cache
ComfyUI Node

Multimodal — Unload in-ComfyUI LLM / VLM cache

The eject button for models that ComfyUI forgot it loaded

By theonetwoone·Created 4 months ago·Updated 23 days ago· 1
Multimodal — Unload in-ComfyUI LLM / VLM cache
    • status
    runtrue

    Here's a ComfyUI quirk that bites everyone eventually: a node loads a model, the node's done, but the model isn't gone. The keep_models_loaded option in this pack's LLM node caches HF pipelines and llama-cpp instances so your next run isn't a cold start - and that cache is real RAM and VRAM you'll want back when you're about to sample a checkpoint. ComfyUI's own unload buttons don't know this pack's cache exists. Enter this node, the dedicated eject button.

    Everything about it fits in a tweet: one boolean input (run, default true) and one string output (status). Toggle run, and the node calls the extension's cache-clearer, which drops the in-process HF transformers pipelines and llama-cpp model instances this pack holds onto. The status output confirms what happened - something like "multimodal extension HF cache cleared (Comfy models unchanged)" - or "skipped" if you flipped run off.

    That last parenthetical is the whole design philosophy, so it's worth underlining: it only clears this extension's cache, not ComfyUI's own loaded models. Your loaded checkpoint, CLIP model, and VAE stay right where they are. It's deliberately scoped - the pack's author wrote it so you can reclaim memory from LLM components without nuking the diffusion pipeline you're about to keep using. If you want everything gone, you still reach for ComfyUI's normal model unloading.

    Where does this slot into a real workflow? Put it in front of a heavy sampling stage, or run it as a manual "tidy up" step when you're toggling between an LLM-heavy edit loop and a KSampler-heavy batch. If you're the type who forgets a 4B Qwen is still resident in VRAM and then wonders why your Flux run started swapping, wire this node in before the sampling phase and let it pay for itself.

    Is it essential? No - if you never run the LLM node with keep_models_loaded on, there's usually nothing cached to unload. But once you turn caching on for speed, this is the safety valve that makes caching feel safe. A one-input, one-output utility node that does exactly what its name says, nothing more, and nothing less. There's a certain virtue in that.

    Categoryllm/multimodal

    Inputs (1)

    NameTypeDefaultDescription
    runBOOLEANtrue

    Outputs (1)

    NameTypeDescription
    statusSTRING