Extensions/ComfyUI Vitals Plus
ComfyUI Extension

ComfyUI Vitals Plus

A lightweight resource monitor for ComfyUI with CPU, RAM, NVIDIA GPU, VRAM, temperature and power readings, plus on-demand cache clearing.

By kaerozhi·Created 2 months ago·Updated about 23 hours ago· 0
kaerozhi/ComfyUI_Vitals
Nodes—
On cloudLocal install
Stars0
Updatedabout 23 hours ago
Readme

ComfyUI-Vitals-Plus - Resource monitor for ComfyUI

A lightweight resource monitor for ComfyUI with CPU, RAM, NVIDIA GPU, VRAM, temperature and board power readings. View usage in the sidebar, pin a compact line to the top bar, or detach a movable bar while working on your workflow. It can also drop cached models and execution outputs on demand. No workflow nodes or connections are required.

This is a fork of bradsec/ComfyUI_Vitals that adds GPU board power monitoring and on-demand cache clearing. It is published to the registry as comfyui-vitals-plus, because the upstream comfyui-vitals id belongs to the original author.

Features

  • CPU model, physical core and logical processor counts in the sidebar.
  • CPU and RAM usage, plus utilization, VRAM, temperature and board power for each NVIDIA GPU.
  • Power draw in watts against the card's enforced limit, so a saturated GPU pulling well under its limit is visible at a glance.
  • A Clear cache control in the panel and a Clear memory cache entry in the canvas context menu, for reclaiming VRAM and the execution output cache when switching to a heavier workflow.
  • Shaded history graphs with a latest-reading marker and subtle guides.
  • Usage colors: teal below 70%, amber from 70% to below 90%, and coral at 90% or above. The power card scales against the card's own limit, with coral at 85% of it.
  • Automatic detection of multiple NVIDIA GPUs, with an All GPUs / individual GPU display filter.
  • Detachable bar with a visible move handle, keyboard movement and automatic docking back into the sidebar.
  • Optional top bar line that stays visible without opening the sidebar.
  • Refresh intervals of 1, 2 or 5 seconds, plus Pause and Resume.
  • Sampling stops when the monitor is closed, paused or in a hidden browser tab.
  • No chart libraries, sampling subprocesses, CUDA allocations or outbound requests.

Preview

Sidebar

<img src="preview_sidepanel.png" alt="Vitals sidebar showing CPU details, RAM, GPU utilization and VRAM history graphs" width="420">

Detached bar

Detached Vitals bar with compact Pause and Dock controls, CPU and RAM graphs, and GPU and VRAM readings

Top bar

Vitals readout overlaid on the right of the ComfyUI workflow tab bar

Action bar

Vitals readout as a second row of the ComfyUI action bar, below its button row

Both bar placements show the same single compact line - CPU, RAM, GPU, VRAM and power with small history traces - and both stay visible without opening the sidebar, which is useful when screen space is at a premium. Absolute VRAM stays visible as 12.0 / 24.0 GiB, and power as 210 / 450 W.

Top bar overlays the line on the right of the ComfyUI top bar, next to the user avatar. Action bar appends it as a second row of the action bar card, right-aligned so the readings sit under that card's own controls. The card is a flex column sized by its first row, so the extra row does not widen it, and the row is independent of the workflow tabs.

Each value in that line is pinned to the width of the longest reading it can show, with tabular figures and right alignment, so 7% and 100% take the same space and nothing shifts sideways as the numbers change. Without that, the action bar card would resize on every refresh and drag its own menu row along with it.

In the action bar, the card's button row is right-aligned while the readout is attached, so the readings and the buttons end at the same edge instead of the buttons sitting at the card's left edge with a gap to their right.

Requirements

  • A working ComfyUI installation with the custom-sidebar extension API.
  • Python 3.10 or newer, subject to your ComfyUI version's own requirements.
  • psutil>=5.9.8 for CPU and RAM readings; ComfyUI already requires psutil.
  • nvidia-ml-py>=12.560.30 and a working NVIDIA driver for NVIDIA GPU readings.
  • aiohttp, supplied by ComfyUI, for the local resource endpoint.

CPU and RAM monitoring work without NVIDIA hardware. AMD, Intel, Apple GPU and MIG-specific monitoring are not implemented. An unavailable GPU sensor shows N/A without hiding other available readings. A device that cannot be enumerated does not prevent detection of other GPUs. Power draw and the enforced power limit come from NVML, so they follow the same availability as the other GPU readings.

Installation

Manual install

Place the package in your ComfyUI installation with this structure:

ComfyUI/
└── custom_nodes/
    └── ComfyUI_Vitals/
        ├── __init__.py
        ├── collector.py
        ├── service.py
        ├── requirements.txt
        └── js/

From the ComfyUI directory, install dependencies using the same Python environment that runs ComfyUI:

python -m pip install -r custom_nodes/ComfyUI_Vitals/requirements.txt

For ComfyUI Windows portable, run this from the portable installation's root directory instead:

.\python_embeded\python.exe -m pip install -r .\ComfyUI\custom_nodes\ComfyUI_Vitals\requirements.txt

Restart ComfyUI, refresh the browser, and select Vitals in the left sidebar. There is no node to search for in the Add Node menu.

ComfyUI Manager

Search for ComfyUI Vitals Plus in ComfyUI Manager, or install it from the registry:

comfy node install comfyui-vitals-plus

The registry package is published as comfyui-vitals-plus, because the upstream comfyui-vitals id belongs to the original author.

Usage

| Control | Behaviour | |---|---| | Refresh | Choose 1, 2 or 5 seconds. Default: 2 seconds. | | Pause / Resume | Stop or restart resource updates. | | Detach | Move the monitor into a compact floating bar. | | Top bar / Dock | Move the readout into the ComfyUI top bar as a single compact line, or return it to the sidebar. | | Move icon / Vitals label | Drag the bar. With the handle focused, use arrow keys; hold Shift to move farther. | | Dock | Open the Vitals sidebar automatically and return the bar to it. | | Dock here | Return the floating bar or any bar readout to an already open Vitals sidebar. | | Clear cache | Unload cached models, drop the execution output cache and re-read memory. | | GPU | Show all detected NVIDIA GPUs or one device. Appears only with multiple GPUs. |

Use Dock to return the floating bar or either bar readout to the sidebar, then close the sidebar to dismiss the monitor. Pause stops updates without dismissing it.

The floating bar uses compact rows of controls beside the graphs, with an extra GPU selector row when multiple devices are detected. The floating bar keeps updating when the sidebar closes. On narrow screens or with many GPUs, it scrolls horizontally; selecting one GPU reduces its width. The floating bar groups GPU usage and VRAM beneath a shared short device name, with the full name in its tooltip. Used/total VRAM remains visible below its graph in compact mode, for example 12.0 / 24.0 GiB. Hover over a metric for its memory or temperature detail. VRAM details include available memory, calculated from the existing total and used readings.

Graphs hold up to 60 samples on a fixed 0 to 100% scale, with the newest reading on the right. The whole trace uses the current reading's color. High GPU usage during generation is normal; these colors indicate utilization, not faults or temperature warnings. The power card is the exception: its trace is the share of the card's enforced power limit in use, so the same colors mean "how hard the card is being pushed against its cap" rather than a percentage of an arbitrary ceiling.

Clearing caches

Clear cache in the panel and Clear memory cache in the canvas context menu both ask ComfyUI to unload every cached model, drop the execution output cache and empty the CUDA allocator cache. Use it when switching to a model that needs much more memory than the one you just ran, for example from a small workflow to a large video model: the previous model otherwise stays resident and the next run either starts slowly or spills to system RAM.

The request is handed to ComfyUI's prompt worker rather than executed inside the HTTP handler, so it never races a running prompt. If a prompt is already running the response says the clear is queued and the memory is released as soon as that prompt finishes. The toast reports how much VRAM and RAM came back, and the panel re-reads immediately so the change is visible without waiting for the next tick.

Clearing is not a substitute for a ComfyUI restart: it releases what ComfyUI tracks, and the operating system may still hold freed pages briefly.

History is preserved when docking, detaching or switching browser tabs. Hidden tabs stop polling; returning resumes updates with a break in the trace to mark the unsampled period. The break does not represent its duration. Pause, request errors, closing the monitor and refresh interval changes reset history.

Refresh interval, GPU selection, floating position and the chosen placement (sidebar, floating, top bar or action bar) are saved locally in your browser. Restored positions stay within the viewport, and a restored bar readout appears without opening the sidebar. History and open/closed state are not saved.

Understanding the readings

  • CPU and RAM: system-wide usage on the ComfyUI server, including other apps.
  • RAM used: total minus available memory, treating reclaimable cache as available.
  • GPU and VRAM: system-wide readings for each physical NVIDIA GPU visible to NVML. The GPU selector does not change ComfyUI's execution device. NVML indices are not necessarily CUDA device indices.
  • PWR: board power draw in watts as reported by NVML, against the card's enforced power limit. The card reads draw / limit W in compact modes and N W with Limit N W · N W headroom in the sidebar. A GPU near 100% load that draws well under its limit is waiting on something else - CPU work, a slow disk, a swap to system RAM, or a model split across devices - so the workflow, not the card, is the bottleneck.
  • Power limit: the enforced limit NVML reports, which is usually below the marketing wattage and can differ from it after a BIOS or vendor profile change. If a driver does not expose it, the card falls back to a 600 W reference scale.
  • Memory units: GiB. Temperature is shown in degrees Celsius.
  • N/A: unavailable sensor or CPU baseline warmup. CPU can show N/A on the first sample and after a long pause.
  • Pause / Resume: the button indicates whether updates are manually paused. Dimmed readings are stale while paused, hidden, waiting for data or offline. Request errors appear in the Pause button tooltip.

GPU detection runs on the first sample. Restart ComfyUI after changing drivers or available GPUs.

CPU identity and core counts are detected once, on first demand. Linux reads /proc/cpuinfo; Windows reads the processor name from the registry. Other platforms show architecture and available counts when the model is unavailable. The detached bar keeps CPU details in the metric tooltip.

Resource use

One worker collects readings on demand. A shared one-second cache combines requests from multiple clients. There is no background sampling loop, and history is kept only in the browser. An in-flight driver query may finish after the monitor closes.

The read-only /vitals/stats endpoint uses the ComfyUI server's access controls. Clients that can access it can read system-wide resource metrics.

POST /vitals/purge unloads cached models and drops the execution cache. It has no effect on a running prompt other than queuing the release behind it, and it cannot start, queue or cancel prompts. Like /vitals/stats it uses the ComfyUI server's access controls, so any client that can reach the API can free memory.

Compatibility

Tested on ComfyUI 0.45.0, frontend 1.59.1, Python 3.12, Windows and an NVIDIA RTX 4090, and previously on ComfyUI 0.35.0, frontend 1.52.7, Python 3.12.12, Linux and an NVIDIA RTX 3090. Multiple-GPU display and partial sensor failures were tested with simulated devices; physical multi-GPU hardware remains unverified.

The package uses V3 extension registration on supported backends and a V1 fallback on older backends. It registers no executable workflow nodes. The V3 path was runtime-tested; the V1 path has simulated import tests only. Older frontends, Windows and macOS have not been runtime-tested.

Troubleshooting

  • Vitals is missing: restart ComfyUI, check its startup log for import errors, then hard-refresh the browser with Ctrl+Shift+R.
  • GPU readings are missing: install requirements in ComfyUI's Python environment and confirm the NVIDIA driver works. Restart ComfyUI afterwards.
  • Readings stay dimmed: select Resume if paused. Otherwise, hover over Pause for a request error, confirm ComfyUI is running and inspect its log.
  • Power readings are missing: the driver does not expose power draw for this card, or the GPU is not an NVIDIA device NVML can read. The card shows N/A and the rest of the readout keeps working.
  • Clear cache says the clear is queued: a prompt was still running. The memory is released as soon as it finishes; run it again afterwards to see the totals.
  • Old controls remain after an update: hard-refresh the browser.

To uninstall, remove the ComfyUI_Vitals folder from custom_nodes and restart ComfyUI. If you installed using a symlink, remove only that symlink.

Development

From the package directory:

python -m unittest discover -s tests -v
node --input-type=module --check < js/vitals.js

Tests require psutil and aiohttp. ComfyUI and NVIDIA hardware are not required for the unit tests. Node.js is needed only for the JavaScript syntax check.

The optional browser regressions use Playwright against an isolated running ComfyUI server. Install Playwright in your test environment, then run python tests/browser_visibility.py, python tests/browser_topbar.py, python tests/browser_actionbar.py or python tests/browser_power.py. Set VITALS_TEST_URL (default http://127.0.0.1:8189) and CHROME_PATH to your test server and Chrome executable.

Start that server with only this package loaded, so the readout is not delayed by other custom nodes:

python main.py --port 8189 --listen 127.0.0.1 \
  --disable-all-custom-nodes --whitelist-custom-nodes ComfyUI_Vitals

browser_visibility.py simulates visibility changes in the actual frontend and verifies history, polling suspension and resume gaps in both display modes. browser_topbar.py and browser_actionbar.py cover placement, live updates, self re-attach and the round trip back to the sidebar. browser_power.py checks the power card against the /vitals/stats payload and exercises both cache-clear entry points.

Support

If you find this useful, please consider starring the repo. Stars help other people discover these nodes.