Nodes/ComfyUI-MemoryManagement/Memory Monitor πŸ“Š
ComfyUI Node

Memory Monitor πŸ“Š

A dashboard you can wire into your workflow

By kaaskoek232Β·Created about a year agoΒ·Updated 3 months agoΒ· 7
Memory Monitor πŸ“Š
    • memory_summary
    • detailed_report
    • memory_percent
    • under_pressure
    • recommendation
    β—„refresh_trigger0β–Ί
    β—„show_detailedtrueβ–Ί
    β—„show_gpu_infotrueβ–Ί
    β—„memory_threshold_warning80β–Ί

    You can't fix a memory problem you can't see. Memory Monitor is the readout node of the ComfyUI-MemoryManagement pack - it samples your RAM and GPU usage, hands you a summary string and some structured numbers, and tells you whether the machine is under pressure. Nothing gets cleaned, nothing gets moved. It's the instrument panel, and in a pack full of hammers, that makes it quietly the most useful place to start.

    If you're trying to figure out why your generations keep choking, the README's own advice is to monitor first, then act. This is the monitor.

    How it works

    At execution time it reads system RAM via psutil and, when CUDA is available, per-GPU usage from torch. Then it builds two strings - a one-line memory_summary and a fuller detailed_report - and compares current usage against your warning threshold to set under_pressure. There's no background thread; it samples when the queue reaches it. That's worth knowing: it's a snapshot, not a live graph.

    The inputs that matter

    • refresh_trigger (INT) - bump this to re-read. It's the only required input.
    • show_detailed (BOOLEAN, default true) - include the full breakdown in detailed_report.
    • show_gpu_info (BOOLEAN, default true) - add the per-GPU numbers to the summary. Only does anything if torch sees CUDA.
    • memory_threshold_warning (FLOAT, 50–95%, default 80) - the line that decides under_pressure.

    Outputs

    memory_summary and detailed_report (STRING) are the human-readable ones - wire them into a text display node if you want it on screen. The structured ones are the interesting part: memory_percent (FLOAT, current system RAM percent) and under_pressure (BOOLEAN). Those two are what make this node more than a pretty status line, because you can wire them into logic.

    recommendation (STRING) is generated advice based on the pressure state - read it, ignore it if it doesn't apply.

    Installing it

    Same as the whole pack - no models, and psutil is the only real dependency (torch is already in ComfyUI). ComfyUI Manager β†’ search "Memory Management" β†’ install β†’ restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/kaaskoek232/ComfyUI-MemoryManagement
    pip install -r ComfyUI-MemoryManagement/requirements.txt
    

    The README's "Quick Deployment" clone URL is broken (it points at a ComfyUI/ComfyUI-MemoryManagement that doesn't exist) - the kaaskoek232 URL above is the right one.

    Common issues & how to actually use it

    • "Why is it always showing the same number?" - because it samples once per execution. Bump refresh_trigger, or wire a node that produces a changing integer (a step counter, a timer) into it to make it re-read.
    • The GPU info line is missing - that's the CUDA check failing on your torch build. The RAM numbers still work; install CUDA-enabled PyTorch if you want the GPU half.
    • under_pressure is your lever. The genuinely clever use of this node is wiring under_pressure (or memory_percent) into a cleanup trigger or a gate so the workflow cleans up only when it needs to. That turns a readout into the sensor for your own mini memory manager.

    There are flashier nodes in this pack, but this one earns its keep on day one: add it to a workflow, watch the numbers during a long batch, and you'll finally know whether your RAM or your VRAM is the thing that's dying. Fixes start there.

    CategoryMemory Management

    Inputs (4)

    NameTypeDefaultDescription
    refresh_triggerINT00–1000000β€”
    show_detailedoptBOOLEANtrueβ€”
    show_gpu_infooptBOOLEANtrueβ€”
    memory_threshold_warningoptFLOAT8050–95β€”

    Outputs (5)

    NameTypeDescription
    memory_summarySTRINGβ€”
    detailed_reportSTRINGβ€”
    memory_percentFLOATβ€”
    under_pressureBOOLEANβ€”
    recommendationSTRINGβ€”