StFist - GPU Monitor
A live VRAM readout you can actually wire into your graph
- status
- usage_percent
- used_mb
- total_mb
- gpu_name
This is the honest half of the StrawberryFist VRAM Optimizer pack. The "optimizer" sibling is a wrapper around torch.cuda.empty_cache() (more on that in its own article); the GPU Monitor just tells you what's actually sitting in your card - to the megabyte, in real time, in numbers you can feed to other nodes. No exaggeration needed, because the thing it does, it does fine.
You find it under StrawberryFist - system in the node menu. Drop it on the canvas and it starts a background thread that polls your GPU on an interval and prints a running dashboard to the ComfyUI terminal - memory bar, current usage percent, and a warning line when you cross your threshold. It's the sort of node you add during a long queue when you're watching VRAM creep and wondering whether the next image is going to OOM.
How it works
Under the hood it uses GPUtil, the only real dependency this pack ships (alongside PyTorch, which you already have). GPUtil doesn't talk to the driver directly - it parses nvidia-smi output, so if nvidia-smi works, this works. A daemon thread polls once per update_interval (default 1 second), appends each reading to a rolling history capped at history_length (default 60 entries), and checks it against warning_threshold (default 80%). Because the node's IS_CHANGED always returns a fresh value, it re-executes on every queue run and refreshes its outputs continuously.
One honest caveat: it reads the first GPU only (gpus[0] in the code). Multi-GPU rigs get the primary card and nothing else - the README lists multi-GPU support as "planned," so don't hold your breath.
Inputs and outputs that matter
You mostly set three things:
- update_interval (0.1–10s) - how often to poll. Default 1s is fine; drop it to 0.1 only if you're debugging something frantic.
- warning_threshold (50–95%) - where the terminal starts shouting at you.
- monitoring_enabled - the off switch. The thread only runs while this is On.
refresh_trigger is a manual "poke it" control: change the number and it forces an immediate update instead of waiting for the interval.
The outputs are where this node earns its keep, because they're real numbers, not just terminal decoration:
- status (STRING) - a human-readable report, including average/max/min across the recent history and a trend line.
- usage_percent (FLOAT), used_mb (FLOAT), total_mb (FLOAT) - the numbers themselves.
- gpu_name (STRING) - e.g. "NVIDIA GeForce RTX 4090".
Wire used_mb and total_mb into a Show Text node and you've got a live VRAM HUD in your workflow. That's the whole party trick, and it's a good one.
Installing it
Same story as the whole pack: ComfyUI Manager → search "StrawberryFist VRAM Optimizer" → Install → restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/strawberryPunch/vram_optimizer
Restart ComfyUI after either route. GPUtil gets installed automatically on first run - there are no model files and no heavy dependencies to download, which is a relief in a custom-node ecosystem that's otherwise dependency hell.
Common issues
- Zeros everywhere / "Cannot get GPU information" - GPUtil either isn't installed or can't parse
nvidia-smi. The code falls back to a mock that returns an empty GPU list, so you get 0.0 outputs instead of a crash. Checkpip show GPUtiland thatnvidia-smiruns in your terminal. - Monitoring "not updating" - usually means the interval is set too high or monitoring got toggled Off mid-run; bump the interval down and check the terminal log.
- Readings never change - you're on a multi-GPU box and the node is watching card 0 while you work on card 1. That's the single-GPU limitation, not a bug.
Is it essential? No. If you already run nvidia-smi -l 1 in a side terminal you're getting 90% of the value. But if you want the readout inside ComfyUI, wired into the graph and prettily logged, this is the least fussy way to get it.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| monitoring_enabled | COMBO | On | Enable/disable real-time GPU monitoring |
| update_interval | FLOAT | 1.00.1–10 | Monitoring update interval (seconds) |
| history_length | INT | 6010–300 | Number of history entries to keep |
| warning_threshold | FLOAT | 8050–95 | Warning threshold (%) |
| refresh_trigger | INT | 00–9999 | Change value to trigger immediate update |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| status | STRING | — |
| usage_percent | FLOAT | — |
| used_mb | FLOAT | — |
| total_mb | FLOAT | — |
| gpu_name | STRING | — |