cubiq / ComfyUI_InstantID

Apache License 2.0
945 stars 50 forks source link

Help me ! Error occurred when executing InstantIDFaceAnalysis: FaceAnalysis.__init__() got an unexpected keyword argument 'providers' #152

Open zengpan618 opened 1 month ago

zengpan618 commented 1 month ago

Could you please tell me how to deal with this problem?

错误1

Error occurred when executing InstantIDFaceAnalysis:

FaceAnalysis.init() got an unexpected keyword argument 'providers'

File "D:\ComfyUI-aki-v1.1\execution.py", line 155, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\ComfyUI-aki-v1.1\execution.py", line 85, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "D:\ComfyUI-aki-v1.1\execution.py", line 78, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) File "D:\ComfyUI-aki-v1.1\custom_nodes\ComfyUI_InstantID-main\InstantID.py", line 202, in load_insight_face model = FaceAnalysis(name="antelopev2", root=INSIGHTFACE_DIR, providers=[provider + 'ExecutionProvider',]) # alternative to buffalo_l

cubiq commented 1 month ago

you probably just need to refresh your browser. upgrade the extension and try it in incognito mode

LIYUU122 commented 1 month ago

Have you found a solution now

luckyluckyluckky commented 1 month ago

Have you found a solution now

chancameo commented 1 month ago

i have the same problom, have you found the solution yet

luckyluckyluckky commented 1 month ago

我解决这个问题了,https://github.com/Gourieff/comfyui-reactor-node,参考这个链接解决的

a1640727878 commented 1 month ago

According to comfyui-reactor method

I. (For Windows users) If you still cannot build Insightface for some reasons or just don't want to install Visual Studio or VS C++ Build Tools - do the following:

  1. (ComfyUI Portable) From the root folder check the version of Python:
    run CMD and type python_embeded\python.exe -V
  2. Download prebuilt Insightface package for Python 3.10 or for Python 3.11 (if in the previous step you see 3.11) or for Python 3.12 (if in the previous step you see 3.12) and put into the stable-diffusion-webui (A1111 or SD.Next) root folder (where you have "webui-user.bat" file) or into ComfyUI root folder if you use ComfyUI Portable
  3. From the root folder run:
    • (SD WebUI) CMD and .\venv\Scripts\activate
    • (ComfyUI Portable) run CMD
  4. Then update your PIP:
    • (SD WebUI) python -m pip install -U pip
    • (ComfyUI Portable) python_embeded\python.exe -m pip install -U pip
  5. Then install Insightface:
    • (SD WebUI) pip install insightface-0.7.3-cp310-cp310-win_amd64.whl (for 3.10) or pip install insightface-0.7.3-cp311-cp311-win_amd64.whl (for 3.11) or pip install insightface-0.7.3-cp312-cp312-win_amd64.whl (for 3.12)
    • (ComfyUI Portable) python_embeded\python.exe -m pip install insightface-0.7.3-cp310-cp310-win_amd64.whl (for 3.10) or python_embeded\python.exe -m pip install insightface-0.7.3-cp311-cp311-win_amd64.whl (for 3.11) or python_embeded\python.exe -m pip install insightface-0.7.3-cp312-cp312-win_amd64.whl (for 3.12)
  6. Enjoy!
Roirros commented 1 month ago

Error occurred when executing InstantIDFaceAnalysis:

FaceAnalysis.init() got an unexpected keyword argument 'providers'

File "E:\ComfyUI-aki-v1.1\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI-aki-v1.1\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI-aki-v1.1\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "E:\ComfyUI-aki-v1.1\custom_nodes\ComfyUI_InstantID\InstantID.py", line 209, in load_insight_face model = FaceAnalysis(name="antelopev2", root=INSIGHTFACE_DIR, providers=[provider + 'ExecutionProvider',]) # alternative to buffalo_l

cubiq commented 1 month ago
luckyluckyluckky commented 1 month ago

根据 comfyui-reactor 方法

I.(对于Windows用户),如果您仍然无法构建Insightface,或者只是不想安装Visual Studio或VS C ++构建工具 - 请执行以下操作:

  1. (comfyui Portable)从根文件夹中检查Python的版本:运行CMD和type python_embeded\python.exe -V
  2. 下载预构建的Insightface软件包对于Python 3.10 或(如果在上一步中,则看到3.12)并将其放入稳定中 - 扩散 - webui(A1111或SD.Next)根文件夹(您具有“ webui-user.bat&quort”文件)或comfyui root文件夹(如果使用comfyui portable 对于Python 3.12 (如果在上一步中看到3.11)或对于Python 3.11
  3. 从根文件夹运行:

    • (SD WebUI)CMD和.\venv\Scripts\activate
    • (comfyui Portable)运行CMD
  4. 然后更新您的pip:

    • (SD WebUI)python -m pip install -U pip
    • (Comfyui Portable)python_embeded\python.exe -m pip install -U pip
  5. 然后安装Insightface:

    • (SD webui)pip install insightface-0.7.3-cp310-cp310-win_amd64.whl(3.10)或pip install insightface-0.7.3-cp311-cp311-win_amd64.whl(对于3.11)或pip install insightface-0.7.3-cp312-cp312-win_amd64.whl(用于3.12)
    • (comfyui portable)python_embeded\python.exe -m pip install insightface-0.7.3-cp310-cp310-win_amd64.whl(3.10)或python_embeded\python.exe -m pip install insightface-0.7.3-cp311-cp311-win_amd64.whl(对于3.11)或python_embeded\python.exe -m pip install insightface-0.7.3-cp312-cp312-win_amd64.whl(用于3.12)
  6. 享受!

是的,是的,我就这样解决问题的

firofame commented 1 month ago

I forgot to unzip antelopev2.zip

sdxwmlyl commented 2 weeks ago

Maybe need install these gays

  1. https://visualstudio.microsoft.com/zh-hans/visual-cpp-build-tools/ >>> VC++ 140 & Windows SDK (be care for win10 or win11 ) & C++ x64/x86 build tools
  2. python.exe -m pip install pyproject-toml
  3. python.exe -m pip install Insightface==0.7.3

ohh, if you use chinese akii's comfyui launcher, u can try to use comfyui/run_cpu or run_nvidia_gpu to run again