Nuked88 / ComfyUI-N-Nodes

A suite of custom nodes for ConfyUI that includes GPT text-prompt generation, LoadVideo, SaveVideo, LoadFramesFromFolder and FrameInterpolator
MIT License
205 stars 22 forks source link

[BUG] #77

Closed shivanraptor closed 2 months ago

shivanraptor commented 2 months ago

Describe the bug After installing ComfyUI-N-Nodes via Custom Node Manager, stopped the server and installed llama-cpp-python via pip successfully, I started the server but the start log had an error:

TypeError: unsupported operand type(s) for |: 'type' and 'type'

To Reproduce Steps to reproduce the behavior:

  1. Go to ComfyUI, install ComfyUI-N-Nodes via Custom Node Manager.
  2. Stopped the server
  3. Installed llama-cpp-python via pip successfully
  4. See error: TypeError: unsupported operand type(s) for |: 'type' and 'type'

Expected behavior Should not have TypeError

Full log This is MANDATORY. By log I mean all the text in the console from the time ComfyUI was started until the time of the reported bug.

Bug reports that do not have this log will be closed.<<

Traceback (most recent call last):
File "/Users/adv/Documents/GitHub/ComfyUI/custom_nodes/ComfyUI-N-Nodes/__init__.py", line 64, in <module>
spec.loader.exec_module(module)
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/Users/adv/Documents/GitHub/ComfyUI/custom_nodes/ComfyUI-N-Nodes/py/gptcpp_node.py", line 11, in <module>
import joytag_models
File "/Users/adv/Documents/GitHub/ComfyUI/custom_nodes/ComfyUI-N-Nodes/libs/joytag_models.py", line 17, in <module>
class VisionModel(nn.Module):
File "/Users/adv/Documents/GitHub/ComfyUI/custom_nodes/ComfyUI-N-Nodes/libs/joytag_models.py", line 28, in VisionModel
def load_model(path: Path | str, device: str | None = None) -> 'VisionModel':
TypeError: unsupported operand type(s) for |: 'type' and 'type'

Screenshots If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

Additional context

Nuked88 commented 2 months ago

Hi! Are you using a Python version lower than 3.10?

shivanraptor commented 2 months ago

Hi! Are you using a Python version lower than 3.10?

Yes, version 3.9.19 via virtualenv

Nuked88 commented 2 months ago

That's the problem, that part of the code is only 3.10+ compatible.

shivanraptor commented 2 months ago

After upgrading to Python 3.12 and re-install all pip packages, it works fine without errors. Thanks.