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

Installation and Use Error #2686

Open
mferry1 opened this issue Nov 13, 2024 · 5 comments
Open

Installation and Use Error #2686

mferry1 opened this issue Nov 13, 2024 · 5 comments

Comments

@mferry1
Copy link

mferry1 commented Nov 13, 2024

Attempting to pip install insightface gets me this error message

ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
numba 0.60.0 requires numpy<2.1,>=1.22, but you have numpy 2.1.3 which is incompatible.

Successfully installed Pillow-11.0.0 PyYAML-6.0.2 albucore-0.0.20 albumentations-1.4.21 annotated-types-0.7.0 certifi-2024.8.30 charset-normalizer-3.4.0 colorama-0.4.6 contourpy-1.3.1 cycler-0.12.1 cython-3.0.11 easydict-1.13 eval-type-backport-0.2.0 fonttools-4.54.1 idna-3.10 imageio-2.36.0 insightface-0.7.3 joblib-1.4.2 kiwisolver-1.4.7 lazy-loader-0.4 matplotlib-3.9.2 networkx-3.4.2 numpy-2.1.3 onnx-1.17.0 opencv-python-headless-4.10.0.84 packaging-24.2 prettytable-3.12.0 protobuf-5.28.3 pydantic-2.9.2 pydantic-core-2.23.4 pyparsing-3.2.0 python-dateutil-2.9.0.post0 requests-2.32.3 scikit-image-0.24.0 scikit-learn-1.5.2 scipy-1.14.1 simsimd-6.0.5 six-1.16.0 stringzilla-3.10.10 threadpoolctl-3.5.0 tifffile-2024.9.20 tqdm-4.67.0 typing-extensions-4.12.2 urllib3-2.2.3 wcwidth-0.2.13

numpy is forcefully installed to version 2.1.3, which it then complains about saying it needs 1.22

Any time I try to run InsightFace using ComfyUI, I get this error message.

!!! Exception during processing !!! numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Traceback (most recent call last):
File "E:\AIArt\ComfyUI_windows_portable\ComfyUI\execution.py", line 323, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\AIArt\ComfyUI_windows_portable\ComfyUI\execution.py", line 198, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\AIArt\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in map_node_over_list
process_inputs(input_dict, i)
File "E:\AIArt\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\AIArt\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\IPAdapterPlus.py", line 674, in load_insightface
return (insightface_loader(provider, model_name=model_name),)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\AIArt\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus\utils.py", line 159, in insightface_loader
from insightface.app import FaceAnalysis
File "E:\AIArt\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface_init
.py", line 18, in
from . import app
File "E:\AIArt\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\app_init
.py", line 2, in
from .mask_renderer import *
File "E:\AIArt\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\app\mask_renderer.py", line 8, in
from ..thirdparty import face3d
File "E:\AIArt\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\thirdparty\face3d_init_.py", line 3, in
from . import mesh
File "E:\AIArt\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\thirdparty\face3d\mesh_init_.py", line 9, in
from .cython import mesh_core_cython
File "insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.pyx", line 1, in init insightface.thirdparty.face3d.mesh.cython.mesh_core_cython
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

@zhangbing01
Copy link

I have the same problem, my error is File "insightface\thirdparty\face3d\mesh\cython\mesh_core_cython.pyx", line 1, in init insightface.thirdparty.face3d.mesh.cython.mesh_core_cython
ValueError: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject

@mferry1
Copy link
Author

mferry1 commented Nov 20, 2024

As of 11/19/2024, the problem still persists. Tried the installation with Python version 3.11 and 3.12

@zhangbing01
Copy link

I try uninstall opnecv-python-headless and install opencv-python was successful

@mferry1
Copy link
Author

mferry1 commented Nov 20, 2024

I try uninstall opnecv-python-headless and install opencv-python was successful

Unrelated

@wcde
Copy link

wcde commented Dec 10, 2024

You should install it from git, try this:
pip install -e "git+https://github.com/deepinsight/insightface.git#egg=insightface&subdirectory=python-package"

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