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

我尝试了从管理器,GIT,手动安装依赖包,但无法解决问题。麻烦请教 #21

Open
KennyChan3389 opened this issue Mar 11, 2024 · 4 comments

Comments

@KennyChan3389
Copy link

KennyChan3389 commented Mar 11, 2024

这是启动Comfyui时出现的报错:

Loading: Workspace Manager (V1.0.0)

[comfyui_controlnet_aux] | INFO -> Using ckpts path: F:\ComfyUI\custom_nodes\comfyui_controlnet_aux\ckpts
[comfyui_controlnet_aux] | INFO -> Using symlinks: False
[comfyui_controlnet_aux] | INFO -> Using ort providers: ['CUDAExecutionProvider', 'DirectMLExecutionProvider', 'OpenVINOExecutionProvider', 'ROCMExecutionProvider', 'CPUExecutionProvider', 'CoreMLExecutionProvider']
Traceback (most recent call last):
File "F:\ComfyUI-kn\nodes.py", line 1887, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "F:\ComfyUI-kn\custom_nodes\ComfyUI_LayerStyle_init
.py", line 60, in
imported_module = importlib.import_module(".py.{}".format(name), name)
File "C:\Users\kennychan\envs\Comfyui-new\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "F:\ComfyUI-kn\custom_nodes\ComfyUI_LayerStyle\py\channel_shake.py", line 1, in
from .imagefunc import *
File "F:\ComfyUI-kn\custom_nodes\ComfyUI_LayerStyle\py\imagefunc.py", line 24, in
from transformers import VitMatteImageProcessor, VitMatteForImageMatting
ImportError: cannot import name 'VitMatteImageProcessor' from 'transformers' (C:\Users\kennychan\envs\Comfyui-new\lib\site-packages\transformers_init
.py)

Cannot import F:\ComfyUI-kn\custom_nodes\ComfyUI_LayerStyle module for custom nodes: cannot import name 'VitMatteImageProcessor' from 'transformers' (C:\Users\kennychan\envs\Comfyui-new\lib\site-packages\transformers_init_.py)
web\extensions\BaiduTranslatePreview.js
custom_nodes\ComfyUI_Prompt_Translate_to_English\js\BaiduTranslatePreview.js
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/alter-list.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json

最终的结果是我无法装载[ComfyUI_LayerStyle]插件。
关于依赖包。全部更新为:
onnxruntime 1.17.0
onnxruntime-gpu 1.17.0
open-clip-torch 2.16.0
openai 1.10.0
opencv-contrib-python 4.9.0.80
opencv-python 4.9.0.80
opencv-python-headless 4.9.0.80
overrides 7.4.0
packaging 23.1
pandas 2.2.0
pandocfilters 1.5.0
我根据另外的 帖子,查看了comfyui-reactor-node的__init__.py文件,发现已经更新新。

我不明白是什么原因导致,期望给予解答,谢谢

@chflame163
Copy link
Owner

请尝试更新依赖包transformers到最新版

@KennyChan3389
Copy link
Author

谢谢,更新transformers,卸载opencv-contrib-python ,再重新安装opencv-contrib-python,就能使用了

@cyandddd
Copy link

我也是这个问题。我尝试更新了transformers和opencv-contrib-python,但是依旧无法加载,请帮忙!我现在的transformers是4.30.2,opencv-contrib-python是4.9.0.80

Cannot import C:\Users\moloc\ComfyUI\custom_nodes\Comfyui_Lama module for custom nodes: cannot import name 'SamplePadding' from 'kornia' (C:\Users\moloc\stable-diffusion-webui\venv\lib\site-packages\kornia_init_.py)
Traceback (most recent call last):
File "C:\Users\moloc\ComfyUI\nodes.py", line 1887, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\moloc\ComfyUI\custom_nodes\ComfyUI_LayerStyle_init
.py", line 60, in
imported_module = importlib.import_module(".py.{}".format(name), name)
File "C:\Users\moloc\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1050, in _gcd_import
File "", line 1027, in _find_and_load
File "", line 1006, in _find_and_load_unlocked
File "", line 688, in _load_unlocked
File "", line 883, in exec_module
File "", line 241, in call_with_frames_removed
File "C:\Users\moloc\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\channel_shake.py", line 1, in
from .imagefunc import *
File "C:\Users\moloc\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\imagefunc.py", line 24, in
from transformers import VitMatteImageProcessor, VitMatteForImageMatting
ImportError: cannot import name 'VitMatteImageProcessor' from 'transformers' (C:\Users\moloc\stable-diffusion-webui\venv\lib\site-packages\transformers_init
.py)

Cannot import C:\Users\moloc\ComfyUI\custom_nodes\ComfyUI_LayerStyle module for custom nodes: cannot import name 'VitMatteImageProcessor' from 'transformers' (C:\Users\moloc\stable-diffusion-webui\venv\lib\site-packages\transformers_init_.py)

@chflame163
Copy link
Owner

请更新transformers到最新版

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