WASasquatch / was-node-suite-comfyui

An extensive node suite for ComfyUI with over 210 new nodes
MIT License
1.23k stars 178 forks source link

Passthrough_Stat_System update to add AMD GPU data on linux with pyamdgpuinfo #392

Open ricperry opened 7 months ago

ricperry commented 7 months ago

I'm not sure if you have time or the capacity to throw a little love toward us linux AMD GPU users. But if you do, the pyamdgpuinfo package seems to be pretty easy and straightforward. It's got polling, and all the data equivalent to the nvidia stuff in pytorch.

Pretty simple:

>>> import pyamdgpuinfo
>>> n_devices = pyamdgpuinfo.detect_gpus()
>>> print(n_devices)
1
>>> first_gpu = pyamdgpuinfo.get_gpu(0)
>>> print(first_gpu.memory_info)
{'vram_size': 17105879040, 'gtt_size': 16761364480, 'vram_cpu_accessible_size': 17105879040}
>>> vram_usage = first_gpu.query_vram_usage()
>>> print(vram_usage)
11448217600
>>> gpu_load = first_gpu.query_load()
>>> print(gpu_load)
0.0