crystian / ComfyUI-Crystools

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

Stopped working, multiple errors. #61

Closed Ainaemaet closed 4 months ago

Ainaemaet commented 4 months ago

Describe the bug
After updating ComfyUI CrysTools stopped working and produces errors on both startup and a traceback. To Reproduce
Start ComyUI using the regular method. Expected behavior
No errors to appear and CrysTools to work propelry.

Error in console:
Here is the error I get in WSL2 Ubuntu Terminal when trying to startup:

[Crystools INFO] Crystools version: 1.12.0 [Crystools INFO] CPU: AMD Ryzen 7 5800X3D 8-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/myML/ComfyUI/nodes.py", line 1879, in load_custom_node module_spec.loader.exec_module(module) File "", line 995, in exec_module File "", line 488, in _call_with_frames_removed File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/init.py", line 24, in from .server import File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/server/init.py", line 1, in from .monitor import File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/server/monitor.py", line 4, in from ..general import cmonitor File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/general/init.py", line 1, in from .monitor import * File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/general/monitor.py", line 66, in cmonitor = CMonitor(1, True, True, True, True, True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/general/monitor.py", line 20, in init self.hardwareInfo = CHardwareInfo(switchCPU, switchGPU, switchHDD, switchRAM, switchVRAM) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/general/hardware.py", line 44, in init self.GPUInfo = CGPUInfo() ^^^^^^^^^^ File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/general/gpu.py", line 45, in init gpuName = pynvml.nvmlDeviceGetName(deviceHandle) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/home/myML/anaconda3/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

Versions:
Copy the output of the console (4 parts), like this:

** Python version: 3.12.3 | packaged by Anaconda, Inc. | (main, May  6 2024, 19:46:43) [GCC 11.2.0]
Total VRAM 24564 MB, total RAM 23990 MB
Set vram state to: NORMAL_VRAM
[Crystools INFO] Crystools version: 1.9.2
[Crystools INFO] CPU: AMD Ryzen 9 5950X 16-Core Processor - Arch: AMD64 - OS: Windows 10
[Crystools INFO] GPU/s: 
Traceback (most recent call last):
  File "/home/myML/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/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/__init__.py", line 24, in <module>
    from .server import *
  File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/server/__init__.py", line 1, in <module>
    from .monitor import *
  File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/server/monitor.py", line 4, in <module>
    from ..general import cmonitor
  File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/general/__init__.py", line 1, in <module>
    from .monitor import *
  File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/general/monitor.py", line 66, in <module>
    cmonitor = CMonitor(1, True, True, True, True, True)
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/general/monitor.py", line 20, in __init__
    self.hardwareInfo = CHardwareInfo(switchCPU, switchGPU, switchHDD, switchRAM, switchVRAM)
                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/general/hardware.py", line 44, in __init__
    self.GPUInfo = CGPUInfo()
                   ^^^^^^^^^^
  File "/home/myML/ComfyUI/custom_nodes/ComfyUI-Crystools/general/gpu.py", line 45, in __init__
    gpuName = pynvml.nvmlDeviceGetName(deviceHandle)
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/myML/anaconda3/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/myML/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 (V1.25.3)
### ComfyUI Revision: 1886 [6a10640f] | Released on '2024-01-08'

Additional context
The traceback error happens right after the '[Crystools INFO] GPU/s:', just as I put it.

Ainaemaet commented 4 months ago

Hello, I understand you are all likely very busy - but can somebody please help me with this? Crystools is important to me, and I would love to have it working again! :)

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

@Ainaemaet hi! today I'll check it!

crystian commented 4 months ago

I checked and it's working, please, uninstall and install again, if still happened please reopen this issue

Ainaemaet commented 4 months ago

Hi there. Not working for me, still the same error even after all other plugins disabled, fresh ComfyUI install, etc.

As I mentioned previously, a ComfyUI update a couple weeks ago broke many 3rd party nodes - but apparently the comfyanonymous changed some things again in order to afford better compatibility, but still many that don't work.

I've seen mention of a few other people having trouble with crystools in particular, but can't find them anymore. 🙃

File "/home/myML/anaconda3/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

Does the utf-8 error at the end of the traceback I posted mean the files aren't utf-8 encoded? Sorry, I'm not very well versed in python outside of setting up and running programs and some very minor scripting.

I'm running on WSL2 Ubuntu20.04 if that helps - though I never had any problems with Crystools in particular until a ComfyUI update a week or so ago!

(ty for the help).