Model Cache Info
See exactly which models are eating your VRAM, inside your workflow
- cache_info
ComfyUI will happily load your Flux model, keep it in VRAM after the prompt finishes, and never once tell you it's still sitting there. That's fine right up until the next prompt OOMs for no obvious reason. Model Cache Info is the node that finally shows you what ComfyUI's model cache is actually holding - which models are loaded, how much VRAM and system RAM each one is using, and what's really free. It dumps the whole live state of the model registry as JSON, right there in your graph.
It's from comfyui-cache-monitor, a young pack whose headline feature is a graphical sidebar that watches the cache in real time. This node is the graph-visible cousin of that same data: no inputs, one output, drop it anywhere and it reports.
How it works
The node is a pure observer. It reads ComfyUI's live model registry - current_loaded_models - plus anything the pack has been asked to keep pinned, and serializes it all. It's marked not_idempotent in the source, which in ComfyUI terms means it re-executes on every prompt instead of being skipped by the execution cache. That's exactly what you want from a status node: the string it outputs is always current, never a stale snapshot from a previous run.
The JSON it returns has the shape you'd hope for:
models- one entry per loaded model, with the model class, its patcher type, which device it's on, whether it's a dynamic-offload model, and per-modelvram_bytes/system_ram_bytes. Apinnedflag marks models you've chosen to keep, andactivedistinguishes models in the current prompt from retained ones.system_ram- total and available RAM, plus a breakdown of active vs. retained vs. pinned model bytes and the process's own RSS. This is the number that tells you why a background ComfyUI is eating 20 GB.vram- one entry per GPU: total, available, what's reserved, and how much of that available memory is actually ComfyUI's own model cache vs. external.removed_modelsandvram_wait- a short history of models you've evicted, and the state of the pack's "wait for external VRAM" feature.
The one output you actually get
cache_info is a single STRING containing that JSON, indented so a human can read it. There's nothing to configure and nothing to wire for it to work.
For a beginner, the practical use is debugging: connect it to a text display or just read the widget in the node's own output area and you'll finally see what's holding your VRAM between runs. For anyone script-y, it's gold - feed it into a small Python node that parses the string and you can build workflow logic off real memory state ("skip this model if less than 4 GB is free") instead of guessing.
Fair warning: as plain text it truncates in small display nodes, so for heavy multi-GPU setups you'll want the pack's sidebar, which renders this same data as bars. This node is the backend; the sidebar is the pretty face.
Installing it
Install the whole pack - the node comes with it:
- ComfyUI Manager: search "comfyui-cache-monitor" and install.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/envy-ai/comfyui-cache-monitor, then restart ComfyUI.
No model downloads, no requirements.txt, no heavy dependencies - it's pure Python plus a web sidebar, and it reads psutil for process RAM. The one real requirement: the code targets ComfyUI's newer Nodes 2.0 extension API (comfy_api), so it needs a reasonably recent ComfyUI build. On an old install the node won't even appear.
Common issues
- Node doesn't show up - you're on an older ComfyUI that predates the extension API this pack is built on. Update ComfyUI, not the pack.
- Removal refused while a prompt runs - that's by design; the pack's "X" button and the model-remove endpoint return a 409 while something's executing, to avoid yanking a model mid-generation.
- Output looks stale - the node re-runs each prompt, so if you're staring at old values you're looking at the widget from a previous run. Re-run the prompt.
- You want the real-time view - that's the sidebar's job. This node snapshots at execution; the panel updates continuously.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| cache_info | STRING | — |