crystian / ComfyUI-Crystools

A powerful set of tools for ComfyUI
MIT License
735 stars 39 forks source link

Issue calling GPU #59

Closed Mortorojo closed 3 months ago

Mortorojo commented 4 months ago

Describe the bug
Node installs, but seems to erroring when calling the GPU info

Expected behavior

[Crystools INFO] Crystools version: 1.12.0
[Crystools INFO] CPU: AMD Ryzen 9 5900X 12-Core Processor - Arch: x86_64 - OS: Linux 5.15.146.1-microsoft-standard-WSL2
[Crystools INFO] GPU/s:
[Crystools INFO] 0) NVIDIA GeForce RTX 4080 SUPER
[Crystools INFO] NVIDIA Driver: 555.85

Error in console:

[Crystools INFO] GPU/s:
Traceback (most recent call last):
  File "/home/mort/ComfyUI/nodes.py", line 1879, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/__init__.py", line 24, in <module>
    from .server import *
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/server/__init__.py", line 1, in <module>
    from .monitor import *
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/server/monitor.py", line 4, in <module>
    from ..general import cmonitor
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/general/__init__.py", line 1, in <module>
    from .monitor import *
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/general/monitor.py", line 66, in <module>
    cmonitor = CMonitor(1, True, True, True, True, True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/general/monitor.py", line 20, in __init__
    self.hardwareInfo = CHardwareInfo(switchCPU, switchGPU, switchHDD, switchRAM, switchVRAM)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/general/hardware.py", line 44, in __init__
    self.GPUInfo = CGPUInfo()
                   ^^^^^^^^^^
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/general/gpu.py", line 45, in __init__
    gpuName = pynvml.nvmlDeviceGetName(deviceHandle)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mort/.pyenv/versions/3.11.9/lib/python3.11/site-packages/pynvml/nvml.py", line 1744, in wrapper
    return res.decode()
           ^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf8 in position 0: invalid start byte

Cannot import /home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools module for custom nodes: 'utf-8' codec can't decode byte 0xf8 in position 0: invalid start byte

Versions:

** Python version: 3.11.9 (main, May 27 2024, 15:11:09) [GCC 11.4.0]
Total VRAM 16376 MB, total RAM 32052 MB
pytorch version: 2.3.0+cu121
Set vram state to: NORMAL_VRAM
[Crystools INFO] Crystools version: 1.12.0
[Crystools INFO] CPU: AMD Ryzen 9 5900X 12-Core Processor - Arch: x86_64 - OS: Linux 5.15.146.1-microsoft-standard-WSL2
[Crystools INFO] GPU/s:
Traceback (most recent call last):
  File "/home/mort/ComfyUI/nodes.py", line 1879, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/__init__.py", line 24, in <module>
    from .server import *
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/server/__init__.py", line 1, in <module>
    from .monitor import *
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/server/monitor.py", line 4, in <module>
    from ..general import cmonitor
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/general/__init__.py", line 1, in <module>
    from .monitor import *
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/general/monitor.py", line 66, in <module>
    cmonitor = CMonitor(1, True, True, True, True, True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/general/monitor.py", line 20, in __init__
    self.hardwareInfo = CHardwareInfo(switchCPU, switchGPU, switchHDD, switchRAM, switchVRAM)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/general/hardware.py", line 44, in __init__
    self.GPUInfo = CGPUInfo()
                   ^^^^^^^^^^
  File "/home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools/general/gpu.py", line 45, in __init__
    gpuName = pynvml.nvmlDeviceGetName(deviceHandle)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/mort/.pyenv/versions/3.11.9/lib/python3.11/site-packages/pynvml/nvml.py", line 1744, in wrapper
    return res.decode()
           ^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf8 in position 0: invalid start byte

Cannot import /home/mort/ComfyUI/custom_nodes/ComfyUI-Crystools module for custom nodes: 'utf-8' codec can't decode byte 0xf8 in position 0: invalid start byte
### Loading: ComfyUI-Manager (V2.35.1)
### ComfyUI Revision: 2213 [34030fed] | Released on '2024-05-27'

Additional context
Add any other context about the problem here.

Ainaemaet commented 4 months ago

Very frustrating this hasn't been addressed, but I understand people have lives outside of the programs they are creating - and it looks like the author hasn't updated anything in quite a while.

I'm getting the same error, have you found a fix by chance?

Ainaemaet commented 4 months ago

Ok, so after looking through issues on the main ComfyUI repo, it looks like @comfyanonymous (ComfyUI creator) deprecated some nodes, and in the process broke compatibility for a number of custom_nodes.

He reverted some changes, and most custom nodes work again, but it looks like this one still needs to be updated!

@crystian can you please update to allow compatibility with new version of ComfyUI?

crystian commented 4 months ago

I use the latest version of nvidia drive 555.85, and reinstall all nodes, and works! ¯_(ツ)_/¯

can be the language? which language do you use? I use English and spanish (windows)

@Ainaemaet @Mortorojo

Artur3d commented 4 months ago

Hello, same problem here , node re-installation does not work, ComfyUi and All nodes updated, RTX 3090 / Nvidia 555.85 / Win 11 French & English. This is the only node, but essential, that doesn't work for me, very happy if we could find a solution.

[Crystools INFO] CPU: AMD Ryzen 9 3900X 12-Core Processor - Arch: x86_64 - OS: Linux 5.15.146.1-microsoft-standard-WSL2
[Crystools INFO] GPU/s:
Traceback (most recent call last):
  File "/home/arox/ComfyUI/nodes.py", line 1879, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "/home/arox/ComfyUI/custom_nodes/ComfyUI-Crystools/__init__.py", line 24, in <module>
    from .server import *
  File "/home/arox/ComfyUI/custom_nodes/ComfyUI-Crystools/server/__init__.py", line 1, in <module>
    from .monitor import *
  File "/home/arox/ComfyUI/custom_nodes/ComfyUI-Crystools/server/monitor.py", line 4, in <module>
    from ..general import cmonitor
  File "/home/arox/ComfyUI/custom_nodes/ComfyUI-Crystools/general/__init__.py", line 1, in <module>
    from .monitor import *
  File "/home/arox/ComfyUI/custom_nodes/ComfyUI-Crystools/general/monitor.py", line 66, in <module>
    cmonitor = CMonitor(1, True, True, True, True, True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arox/ComfyUI/custom_nodes/ComfyUI-Crystools/general/monitor.py", line 20, in __init__
    self.hardwareInfo = CHardwareInfo(switchCPU, switchGPU, switchHDD, switchRAM, switchVRAM)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arox/ComfyUI/custom_nodes/ComfyUI-Crystools/general/hardware.py", line 44, in __init__
    self.GPUInfo = CGPUInfo()
                   ^^^^^^^^^^
  File "/home/arox/ComfyUI/custom_nodes/ComfyUI-Crystools/general/gpu.py", line 45, in __init__
    gpuName = pynvml.nvmlDeviceGetName(deviceHandle)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/arox/miniconda3/envs/comfyui/lib/python3.12/site-packages/pynvml/nvml.py", line 1744, in wrapper
    return res.decode()
           ^^^^^^^^^^^^
UnicodeDecodeError: 'utf-8' codec can't decode byte 0xf8 in position 0: invalid start byte

Cannot import /home/arox/ComfyUI/custom_nodes/ComfyUI-Crystools module for custom nodes: 'utf-8' codec can't decode byte 0xf8 in position 0: invalid start byte
ComfyUI-Manager (V2.36)
ComfyUI Revision: 2222 [809cc85a] | Released on '2024-06-02'
PurplefinNeptuna commented 3 months ago

gpuopenanalytics/pynvml#53 it's NVML bug, just wait for driver update or rollback driver

crystian commented 3 months ago

Please update this extension (1.13.0) and try again!