Performance Stats (CPU/GPU)
Watch CPU, VRAM and GPU temp from inside ComfyUI
- stats
You know that moment - a render that should take 40 seconds is crawling, and you're mashing the window switcher to check whether VRAM is pegged, your CPU is fine, or something is thermal-throttling. PerformanceStats is the pack that puts that answer on top of the ComfyUI window so you stop guessing. It ships as ComfyUI-performstat, a small monitoring plugin by JHBOY-ha, and it does two things: drop a floating always-on-top stats panel on your screen, and give you a node that spits the same numbers out as text you can wire into your workflow.
The important thing to understand right away: the panel and the node are two separate surfaces. The floating panel isn't tied to the node being in your graph at all. It's a web extension that ComfyUI loads on startup, and it polls a built-in endpoint every second. So install the pack, restart, and you'll get the panel whether or not you ever touch the node. The node exists for the times you want the stats as data - say, to log them to a file, display them next to your image, or just have them sitting in the graph while you debug a memory leak.
How it works
On the backend there's a tiny HTTP route (/performstat) that samples the machine and returns JSON. The node's get_stats method calls the same sampler and formats the result as a text block: a timestamp, the hostname, CPU load, RAM and swap, then GPU stats. That text block is the stats STRING output you get.
The clever part is how it gathers GPU info. It tries NVIDIA's NVML (via pynvml) first, which gives you the full picture: per-GPU utilization, memory utilization, VRAM used/total, and temperature - including every GPU if you're running multi-card. If NVML isn't available, it falls back to torch's CUDA memory accounting, which only knows allocated/reserved bytes - no utilization, no temperature. That's the expected degradation, not a bug. On Apple Silicon it uses torch MPS memory metrics plus ioreg for utilization and temperature, which the README honestly flags as best-effort on macOS.
Dependencies are genuinely light: psutil and pynvml, both pip-installable, both tiny. No model files, no weights, nothing to download. It uses ComfyUI's built-in PromptServer for the endpoint, so there's no extra web framework to fight with.
The inputs that matter
The node has exactly one input, and it barely matters:
sample_interval_ms(INT, default 100, range 0–1000) - how long the CPU sampler waits to measure load. Higher = more accurate CPU% but a slightly longer blocking read. 100ms is a fine default; leave it alone.
The single output, stats, is a plain text string. Wire it into a Text Display node, a log writer, or just leave it unconnected - the node doesn't care.
Installing
Either route works, and it's quick:
cd ComfyUI/custom_nodes
git clone https://github.com/JHBOY-ha/ComfyUI-performstat.git
cd ComfyUI-performstat
pip install -r requirements.txt
Then restart ComfyUI. Or, if you use ComfyUI Manager, search the pack and install from there - no pip step needed. Because this is exactly the kind of small, dependency-free utility the ecosystem is full of, it slots in without the dependency-hell headaches the KB documents for bigger packs.
Common issues
The two things people trip on are both expectations, not failures. First, the panel only appears after a restart - you can't install and see it without one. Second, if your stats show "allocated / reserved" instead of utilization percentages, you're on the torch fallback (NVML missing or unsupported), and there's nothing to fix unless you install pynvml in the right Python environment - the same environment ComfyUI runs in, not whatever your system Python is.
Otherwise, drag the panel wherever you want, resize it, and press Y to show or hide it quickly. Toggle individual rows (memory, GPU, VRAM, temp) in ComfyUI's settings under the PerformStat section. It's a small pack with one job, and for the two minutes it costs to install, it's a genuinely handy one.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| sample_interval_ms | INT | 1000–1000 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| stats | STRING | — |