Files

88 lines
3.3 KiB
Markdown

# XPUSYS-Monitor-NG
> **Proof of Concept** — Native Windows ROCm support for ComfyUI-XPUSYS-Monitor
This is a derived work based on [ComfyUI-XPUSYS-Monitor](https://github.com/allanmeng/ComfyUI-XPUSYS-Monitor)
by allanmeng. It is published separately solely because the changes
are narrowly scoped to Windows AMD ROCm and were developed with AI
agent assistance — the author does not wish to push Agent generated
changes into the original repository out of respect for the developer.
## Intent
The upstream project is an excellent hardware monitor for ComfyUI, but its AMD
GPU support depended on `rocm_smi_lib`, which cannot be installed on Windows.
This POC replaces the AMD provider's GPU monitoring with Windows-native APIs:
- **VRAM**: `torch.cuda.mem_get_info()` — works on ROCm 6+ for Windows
- **GPU load**: `typeperf` (Windows built-in) — reads WDDM engine counters
- **Temperature / Power / Clock**: Unavailable — the AMD Windows driver does
not expose these through standard Python-accessible APIs on this hardware
## Relationship to Upstream
This project has **no intention to fork** the original. The changes here are
narrowly scoped to making the AMD provider work on Windows ROCm. AI agent-
assisted modifications were used during development, and the author does not
want to push AI-generated changes into allanmeng's original repository.
If the upstream maintainer wishes to incorporate any of these changes, they
are welcome to take whatever is useful.
## Status
| Metric | Source | Status |
|---|---|---|
| VRAM free / total | `torch.cuda.mem_get_info(0)` | ✅ |
| VRAM allocated / reserved | `torch.cuda.memory_allocated()` / `memory_reserved()` | ✅ |
| GPU utilisation | `typeperf` WDDM engine counters (max) | ✅ |
| Device name | `torch.cuda.get_device_name(0)` | ✅ |
| GPU core temperature | Driver does not expose via Windows API | ❌ |
| Power draw | Driver does not expose via Windows API | ❌ |
| Core clock | Driver does not expose via Windows API | ❌ |
| `rocm_smi_lib` dependency | Removed; no replacement needed | ✅ |
| Windows ROCm detection | `getattr(torch.version, 'roc', None)` + GPU name fallback | ✅ |
## Tested Hardware
This plugin has only been tested on a single configuration:
- **GPU**: AMD Radeon RX 9070 XT (ROCm 7.2, Windows)
- **PyTorch**: 2.9.1+rocm7.2.1
- **ComfyUI**: v0.24.0
Other AMD GPUs may work but have not been validated. Results on older AMD cards (RX 6000 series, Instinct) or different ROCm versions may vary.
## Requirements
- ComfyUI (any recent version)
- [ROCm for Windows](https://rocm.docs.amd.com/) 6+ (tested on ROCm 7.2)
- PyTorch ROCm build (e.g. `pytorch 2.9.1+rocm7.2.1`)
- `psutil` (`pip install psutil`)
## Installation
Clone into ComfyUI `custom_nodes/`:
```cmd
cd ComfyUI/custom_nodes
git clone https://github.com/forkless/XPUSYS-Monitor-NG
cd XPUSYS-Monitor-NG
pip install -r requirements.txt
```
Restart ComfyUI. The plugin auto-detects AMD ROCm and loads the AMDProvider.
## Support
This plugin is provided **as-is**, free to use and modify under the MIT License.
It is a proof of concept with no guarantee of ongoing maintenance, support, or
compatibility with future versions of ComfyUI, ROCm, or PyTorch.
If it works for you — great. If it doesn't — issues and pull requests are
welcome, but responses should not be expected.
## License
[MIT](LICENSE.md) — Copyright (c) 2026 forkless