gokayfem / ComfyUI_VLM_nodes

Custom ComfyUI nodes for Vision Language Models, Large Language Models, Image to Music, Text to Music, Consistent and Random Creative Prompt Generation
Apache License 2.0
382 stars 31 forks source link

Moondream issue #94

Open gobshyte opened 3 months ago

gobshyte commented 3 months ago

Hi I am still getting this error despite trying all the fixes noted for previous issues on the subject? Is it broken again?

Traceback (most recent call last):
  File "C:\SDAI\ComfyUI\ComfyUI\nodes.py", line 1876, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\SDAI\ComfyUI\ComfyUI\custom_nodes\ComfyUI_VLM_nodes\__init__.py", line 70, in <module>
    imported_module = importlib.import_module(f".nodes.{module_name}", __name__)
  File "importlib\__init__.py", line 126, in import_module
  File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
  File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
  File "<frozen importlib._bootstrap>", line 1006, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "C:\SDAI\ComfyUI\ComfyUI\custom_nodes\ComfyUI_VLM_nodes\nodes\moondream_script.py", line 1, in <module>
    from .moondream import VisionEncoder, TextModel
  File "C:\SDAI\ComfyUI\ComfyUI\custom_nodes\ComfyUI_VLM_nodes\nodes\moondream\__init__.py", line 1, in <module>
    from .vision_encoder import VisionEncoder
  File "C:\SDAI\ComfyUI\ComfyUI\custom_nodes\ComfyUI_VLM_nodes\nodes\moondream\vision_encoder.py", line 4, in <module>
    from torchvision.transforms.v2 import (
ImportError: cannot import name 'ToImage' from 'torchvision.transforms.v2' (C:\SDAI\ComfyUI\python_embeded\lib\site-packages\torchvision\transforms\v2\__init__.py)

Cannot import C:\SDAI\ComfyUI\ComfyUI\custom_nodes\ComfyUI_VLM_nodes module for custom nodes: cannot import name 'ToImage' from 'torchvision.transforms.v2' (C:\SDAI\ComfyUI\python_embeded\lib\site-packages\torchvision\transforms\v2\__init__.py)
gokayfem commented 3 months ago

is this moondream2 or moondream1?

gobshyte commented 3 months ago

No idea sorry, this is fresh install of the VLM custom nodes. I am not even using the moondream nodes/models, I worked around this by commenting them out in the nodelist in init.py, like this:


init()

node_list = [
#    "moondream_script",
    "simpletext",
    "llavaloader",
    "suggest",
    "joytag",
    "internlm",
    "uform",
    "kosmos2",
    "audioldm2",
    "playmusic",
    "mcllava",
#    "moondream2",
]
gokayfem commented 3 months ago

its probably related to transformers version of your comfyui python

gobshyte commented 3 months ago

I already tried with transformers>=4.38.2 but made no difference...

gokayfem commented 3 months ago

i will remove moondream1 node since probably everybody use moondream2 because they are almost same size.

gobshyte commented 3 months ago

Cool, I will try again later then, thanks