ComfyUI_VLM_nodes icon indicating copy to clipboard operation
ComfyUI_VLM_nodes copied to clipboard

Moondream error after installing VLM nodes

Open kikoferrer opened this issue 10 months ago • 2 comments

Here is what I got from the terminal. I use linux mint

File "/home/chupz22/ComfyUI/custom_nodes/ComfyUI_VLM_nodes/nodes/moondream_script.py", line 1, in from .moondream import VisionEncoder, TextModel File "/home/chupz22/ComfyUI/custom_nodes/ComfyUI_VLM_nodes/nodes/moondream/init.py", line 1, in from .vision_encoder import VisionEncoder File "/home/chupz22/ComfyUI/custom_nodes/ComfyUI_VLM_nodes/nodes/moondream/vision_encoder.py", line 4, in from torchvision.transforms.v2 import ( ImportError: cannot import name 'ToImage' from 'torchvision.transforms.v2' (/home/chupz22/venv/sdvenv/lib/python3.10/site-packages/torchvision/transforms/v2/init.py)

Cannot import /home/chupz22/ComfyUI/custom_nodes/ComfyUI_VLM_nodes module for custom nodes: cannot import name 'ToImage' from 'torchvision.transforms.v2' (/home/chupz22/venv/sdvenv/lib/python3.10/site-packages/torchvision/transforms/v2/init.py)

kikoferrer avatar Apr 18 '24 03:04 kikoferrer

is it moondream1 or moondream2 ?

gokayfem avatar Apr 21 '24 08:04 gokayfem

@SmoothBrainApe I also encountered some errors while using Moondream 2 node, but I solved it by replacing the two original code files below. You can also try it and see if it works.

configuration_moondream.py modeling_phi.py

I've put the replaced code file on Google Drive. Google Drive

QL-boy avatar Apr 26 '24 03:04 QL-boy