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 error after installing VLM nodes #75

Open
kikoferrer opened this issue Apr 18, 2024 · 2 comments
Open

Moondream error after installing VLM nodes #75

kikoferrer opened this issue Apr 18, 2024 · 2 comments

Comments

@kikoferrer
Copy link

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)

@gokayfem
Copy link
Owner

is it moondream1 or moondream2 ?

@QL-boy
Copy link

QL-boy commented Apr 26, 2024

@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

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

3 participants