zhongpei / Comfyui_image2prompt

image to prompt by vikhyatk/moondream1
GNU General Public License v3.0
239 stars 14 forks source link

error during startup comfyui after install node #18

Open nikolaiusa opened 4 months ago

nikolaiusa commented 4 months ago

File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\Comfyui_image2prompt__init__.py", line 1, in from .image2text import Image2Text, LoadImage2TextModel File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\Comfyui_image2prompt\image2text.py", line 1, in from .moondream_model import MoondreamModel File "I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\Comfyui_image2prompt\moondream_model.py", line 8, in from torchvision.transforms.v2 import ( ImportError: cannot import name 'ToImage' from 'torchvision.transforms.v2' (I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\torchvision\transforms\v2__init__.py)

Cannot import I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\Comfyui_image2prompt module for custom nodes: cannot import name 'ToImage' from 'torchvision.transforms.v2' (I:\ComfyUI_windows_portable_nvidia_cu118_or_cpu\ComfyUI_windows_portable\python_embeded\lib\site-packages\torchvision\transforms\v2__init__.py)

nikolaiusa commented 4 months ago

what version torchvision i need?

zhongpei commented 4 months ago

you can try transformers==4.36.2

NeoAnthropocene commented 3 months ago

you can try transformers==4.36.2

I have the same error output. How we should run it with transformers==4.36.2 ? I believe there should be a reuirements.txt file.

Tromazing commented 3 months ago

I have the same issue. I'm running transformers 4.38.2 and torchvision 0.15.1.

wsry888 commented 3 months ago

print(transformers.version) 4.38.2

encounter the same problem. hope optimize this problem. Thank you.