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

Insightface installation failing in ComfyUI? #164

Closed
SNK6x opened this issue Jun 1, 2024 · 3 comments
Closed

Insightface installation failing in ComfyUI? #164

SNK6x opened this issue Jun 1, 2024 · 3 comments

Comments

@SNK6x
Copy link

SNK6x commented Jun 1, 2024

Not sure what's going on but it looks like insightface installation is failing.

#######################################################################
[ComfyUI-Manager] Starting dependency installation/(de)activation for the extension

[notice] A new release of pip is available: 23.3.2 -> 24.0
[notice] To update, run: D:\Program Files\Stable Diffusion\ComfyUI_windows_portable\python_embeded\python.exe -m pip install --upgrade pip

ComfyUI-Manager: EXECUTE => ['D:\Program Files\Stable Diffusion\ComfyUI_windows_portable\python_embeded\python.exe', '-m', 'pip', 'install', 'insightface']

Execute install/(de)activation script for 'D:\Program Files\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_InstantID'

Collecting insightface
Using cached insightface-0.7.3.tar.gz (439 kB)
Installing build dependencies: started
Installing build dependencies: finished with status 'done'
Getting requirements to build wheel: started
Getting requirements to build wheel: finished with status '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 "D:\Program Files\Stable Diffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
[!] main()
[!] File "D:\Program Files\Stable Diffusion\ComfyUI_windows_portable\python_embeded\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 "D:\Program Files\Stable Diffusion\ComfyUI_windows_portable\python_embeded\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 "D:\Program Files\Stable Diffusion\ComfyUI_windows_portable\python_embeded\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 "D:\Program Files\Stable Diffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\setuptools\build_meta.py", line 295, in _get_build_requires
[!] self.run_setup()
[!] File "D:\Program Files\Stable Diffusion\ComfyUI_windows_portable\python_embeded\Lib\site-packages\setuptools\build_meta.py", line 311, in run_setup
[!] exec(code, locals())
[!] File "", line 11, in
[!] ModuleNotFoundError: No module named 'Cython'
[!] [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.
[!]
[!] [notice] A new release of pip is available: 23.3.2 -> 24.0
[!] [notice] To update, run: D:\Program Files\Stable Diffusion\ComfyUI_windows_portable\python_embeded\python.exe -m pip install --upgrade pip
install/(de)activation script failed: D:\Program Files\Stable Diffusion\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_InstantID

[ComfyUI-Manager] Startup script completed.
#######################################################################

@SNK6x
Copy link
Author

SNK6x commented Jun 1, 2024

Screenshot 2024-06-01 125636
Looks like this in the manager, tried every option still fails in the same way. Is there any way to do a manual install?

@cubiq
Copy link
Owner

cubiq commented Jun 1, 2024

always update pip first

maybe you just need to install Cython, anyway there's a lengthy thread on the ipadapter on how to install insightface cubiq/ComfyUI_IPAdapter_plus#162

@cubiq cubiq closed this as completed Jun 1, 2024
@Reign-in-blood
Copy link

If you encounter the following error while trying to install InsightFace for InstantID in ComfyUI:

insightface-0.7.3-cp311-cp311-win_amd64_.whl is not a supported wheel on this platform

Here is the procedure I used to successfully install InsightFace:

Steps to Follow:

  1. Check the Python version in ComfyUI:

    • Go to the ~/comfyui/python_embedded folder and double-click on python.exe.
    • Note the version of Python (e.g., 3.09, 3.10, 3.11, or 3.12).
  2. Install the same version of Python on Windows:

    • Make sure the version of Python installed on your Windows system matches the one in ~/comfyui/python_embedded.
    • If it doesn't, download and install the correct version from python.org.
  3. Install InsightFace:

    • Navigate to the folder where Python is installed on your system, typically:

C:\Users\UserName\AppData\Local\Programs\Python\Python311

  • Click on the address bar in File Explorer, type cmd, and press Enter to open a command prompt.
  • Run the following command to install InsightFace:

.\python.exe -m pip install insightface

  1. Copy the "insightface" folder to ComfyUI:
    • After the installation, a folder named "insightface" should appear.
    • Copy this folder and paste it into ~/comfyui/python_embedded in your ComfyUI installation.
    • Then, in this folder, open a command prompt by typing cmd in the address bar and run the following command:

.\python.exe -m pip install insightface

After this, InsightFace should be successfully installed, and you should be able to install and use InstantID without any issues!

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