Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Moondream issue #94

Open
gobshyte opened this issue Jun 6, 2024 · 6 comments
Open

Moondream issue #94

gobshyte opened this issue Jun 6, 2024 · 6 comments

Comments

@gobshyte
Copy link

gobshyte commented Jun 6, 2024

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
Copy link
Owner

gokayfem commented Jun 6, 2024

is this moondream2 or moondream1?

@gobshyte
Copy link
Author

gobshyte commented Jun 6, 2024

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
Copy link
Owner

gokayfem commented Jun 6, 2024

its probably related to transformers version of your comfyui python

@gobshyte
Copy link
Author

gobshyte commented Jun 6, 2024

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

@gokayfem
Copy link
Owner

gokayfem commented Jun 7, 2024

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

@gobshyte
Copy link
Author

gobshyte commented Jun 7, 2024

Cool, I will try again later then, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants