Open SmoothBrainApe opened 2 months ago
is it moondream1 or moondream2 ?
@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
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)