ZHO-ZHO-ZHO / ComfyUI-InstantID

Unofficial implementation of InstantID for ComfyUI
1.21k stars 67 forks source link

无法加载工作流节点文件 #7

Open jiehwa opened 5 months ago

jiehwa commented 5 months ago

image

如图,我使用comfyUI的load按钮,加载ComfyUI\custom_nodes\ComfyUI-InstantID\INSTANTID WORKFLOWS目录下的工作流文件,报错了,缺少这些节点

Semonxue commented 5 months ago

可以使用Comfyui Manager中的”Install Missing Custom Nodes“功能去安装

norsizu commented 5 months ago

检查一下启动的时候ComfyUI-InstantID节点有没有报错,我刚才因为insightface没安装上折腾了几小时

norsizu commented 5 months ago

Check the startup information of comfyui, it's very likely that insightface installation didn't succeed causing ComfyUI-InstantID to fail to load.I had the same problem earlier.

Hansynily commented 5 months ago

It says missing module named diffusers, so just simply install diffusers

Actually, you have to use the venv directory to install the requirements.txt or otherwise it will just install the "diffusers" system wide

on cmd:

python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-InstantID\requirements.txt

aetherwu commented 5 months ago

I've tried all way to install including local files. No mistake returns while run these installation tasks.

python -c "import insightface" works fine. python -c "import insightface.app" works fine. Same work fine in python console mode.

While ComfyUI console still says "No module named 'insightface'" then InstantID import failed.

norsizu commented 5 months ago

My node works, but the generated image results are very different from the official website, the author tweeted that it's most likely a problem with insightface or cn loading, I just did a whole reinstall of my ComfyUI, and I finally seem to be getting the right results! From this ... ComfyUI_temp_gytrx_00001_ to this ... ComfyUI_temp_uxana_00001_

norsizu commented 5 months ago

If you use ComfyUI_portable for windows, remember to use “your path”\ComfyUI_windows_portable\python_embedded\python.exe -m pip install ... to run the install command. Please also refer to the description in this link to resolve Insightface installation issues: https://github.com/Gourieff/comfyui-reactor-node?tab=readme-ov-file#troubleshooting

jiehwa commented 5 months ago

If you use ComfyUI_portable for windows, remember to use “your path”\ComfyUI_windows_portable\python_embedded\python.exe -m pip install ... to run the install command. Please also refer to the description in this link to resolve Insightface installation issues: https://github.com/Gourieff/comfyui-reactor-node?tab=readme-ov-file#troubleshooting

image

如图,我使用comfyUI的load按钮,加载ComfyUI\custom_nodes\ComfyUI-InstantID\INSTANTID WORKFLOWS目录下的工作流文件,报错了,缺少这些节点

执行上面大佬们的建议,解决了大部分的节点报错 python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-InstantID\requirements.txt

现在只剩下一个节点的问题了 image

jiehwa commented 5 months ago

I've tried all way to install including local files. No mistake returns while run these installation tasks.

python -c "import insightface" works fine. python -c "import insightface.app" works fine. Same work fine in python console mode.

While ComfyUI console still says "No module named 'insightface'" then InstantID import failed.

应该是没有成功安装insightface,你重新安装试试

jiehwa commented 5 months ago

It says missing module named diffusers, so just simply install diffusers

Actually, you have to use the venv directory to install the requirements.txt or otherwise it will just install the "diffusers" system wide

on cmd:

python_embeded\python.exe -m pip install -r ComfyUI\custom_nodes\ComfyUI-InstantID\requirements.txt

it's work , thx!

deriek813 commented 4 months ago

我遇到下面的錯誤訊息,請問我該如何解決

Traceback (most recent call last): File "D:\comfyui_windows_portable\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1893, 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 "D:\comfyui_windows_portable\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID__init.py", line 1, in from .InstantIDNode import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS File "D:\comfyui_windows_portable\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID\InstantIDNode.py", line 1, in import diffusers File "D:\comfyui_windows_portable\ComfyUI_windows_portable\python_embeded\lib\site-packages\diffusers__init__.py", line 28, in from .models import ( File "D:\comfyui_windows_portable\ComfyUI_windows_portable\python_embeded\lib\site-packages\diffusers\models\init__.py", line 25, in from .control_net_model import ControlNetModel ModuleNotFoundError: No module named 'diffusers.models.control_net_model'

Cannot import D:\comfyui_windows_portable\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID module for custom nodes: No module named 'diffusers.models.control_net_model'

deriek813 commented 4 months ago

An error occurred when installing requirements.txt

D:\comfyui_windows_portable\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID>pip install -r requirements.txt Collecting opencv-python (from -r requirements.txt (line 1)) Using cached opencv_python-4.9.0.80-cp37-abi3-win_amd64.whl.metadata (20 kB) Collecting transformers (from -r requirements.txt (line 2)) Using cached transformers-4.37.2-py3-none-any.whl.metadata (129 kB) Collecting accelerate (from -r requirements.txt (line 3)) Using cached accelerate-0.26.1-py3-none-any.whl.metadata (18 kB) Collecting insightface (from -r requirements.txt (line 4)) Using cached insightface-0.7.3.tar.gz (439 kB) Installing build dependencies ... done Getting requirements to build wheel ... done Installing backend dependencies ... done Preparing metadata (pyproject.toml) ... done Collecting diffusers (from -r requirements.txt (line 5)) Using cached diffusers-0.26.1-py3-none-any.whl.metadata (18 kB) Collecting onnxruntime-gpu (from -r requirements.txt (line 6)) Using cached onnxruntime_gpu-1.17.0-cp312-cp312-win_amd64.whl.metadata (4.3 kB) Requirement already satisfied: numpy>=1.21.2 in c:\users\user\appdata\local\programs\python\python312\lib\site-packages (from opencv-python->-r requirements.txt (line 1)) (1.26.1) Collecting filelock (from transformers->-r requirements.txt (line 2)) Using cached filelock-3.13.1-py3-none-any.whl.metadata (2.8 kB) Collecting huggingface-hub<1.0,>=0.19.3 (from transformers->-r requirements.txt (line 2)) Using cached huggingface_hub-0.20.3-py3-none-any.whl.metadata (12 kB) Collecting packaging>=20.0 (from transformers->-r requirements.txt (line 2)) Using cached packaging-23.2-py3-none-any.whl.metadata (3.2 kB) Collecting pyyaml>=5.1 (from transformers->-r requirements.txt (line 2)) Using cached PyYAML-6.0.1-cp312-cp312-win_amd64.whl.metadata (2.1 kB) Collecting regex!=2019.12.17 (from transformers->-r requirements.txt (line 2)) Using cached regex-2023.12.25-cp312-cp312-win_amd64.whl.metadata (41 kB) Collecting requests (from transformers->-r requirements.txt (line 2)) Using cached requests-2.31.0-py3-none-any.whl.metadata (4.6 kB) Collecting tokenizers<0.19,>=0.14 (from transformers->-r requirements.txt (line 2)) Using cached tokenizers-0.15.1-cp312-none-win_amd64.whl.metadata (6.8 kB) Collecting safetensors>=0.4.1 (from transformers->-r requirements.txt (line 2)) Using cached safetensors-0.4.2-cp312-none-win_amd64.whl.metadata (3.9 kB) Collecting tqdm>=4.27 (from transformers->-r requirements.txt (line 2)) Using cached tqdm-4.66.1-py3-none-any.whl.metadata (57 kB) Collecting psutil (from accelerate->-r requirements.txt (line 3)) Using cached psutil-5.9.8-cp37-abi3-win_amd64.whl.metadata (22 kB) Collecting torch>=1.10.0 (from accelerate->-r requirements.txt (line 3)) Using cached torch-2.2.0-cp312-cp312-win_amd64.whl.metadata (26 kB) Collecting onnx (from insightface->-r requirements.txt (line 4)) Using cached onnx-1.15.0.tar.gz (12.3 MB) Installing build dependencies ... done Getting requirements to build wheel ... error error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> [18 lines of output] Traceback (most recent call last): File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in main() File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 335, in main json_out['return_val'] = hook(**hook_input['kwargs']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USER\AppData\Local\Programs\Python\Python312\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 118, in get_requires_for_build_wheel return hook(config_settings) ^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USER\AppData\Local\Temp\pip-build-env-f7fsjkyt\overlay\Lib\site-packages\setuptools\build_meta.py", line 325, in get_requires_for_build_wheel return self._get_build_requires(config_settings, requirements=['wheel']) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\Users\USER\AppData\Local\Temp\pip-build-env-f7fsjkyt\overlay\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires self.run_setup() File "C:\Users\USER\AppData\Local\Temp\pip-build-env-f7fsjkyt\overlay\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup exec(code, locals()) File "", line 61, in AssertionError: Could not find cmake in PATH [end of output]

note: This error originates from a subprocess, and is likely not a problem with pip. error: subprocess-exited-with-error

× Getting requirements to build wheel did not run successfully. │ exit code: 1 ╰─> See above for output.

note: This error originates from a subprocess, and is likely not a problem with pip.

D:\comfyui_windows_portable\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-InstantID>

deriek813 commented 4 months ago

For the above error, after searching Google and updating diffusers, the problem is gone.

sxg2020 commented 1 month ago

If you use ComfyUI_portable for windows, remember to use “your path”\ComfyUI_windows_portable\python_embedded\python.exe -m pip install ... to run the install command. Please also refer to the description in this link to resolve Insightface installation issues: https://github.com/Gourieff/comfyui-reactor-node?tab=readme-ov-file#troubleshooting

如果您使用Windows的ComfyUI_portable,请记住使用 “your path”\ComfyUI_windows_portable\python_embedded\python.exe-m pip install.运行install命令。 另请参阅此链接中的描述以解决Insightface安装问题:https://github.com/Gourieff/comfyui-reactor-node?tab= readme-over-file#故障排除

有用