Gourieff / comfyui-reactor-node

Fast and Simple Face Swap Extension Node for ComfyUI
GNU General Public License v3.0
1.6k stars 155 forks source link

ValueError installing Reactor numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject #482

Open Skettalee opened 4 days ago

Skettalee commented 4 days ago

First, confirm

What happened?

I have been trying for days to get reactor working on my comfyui install with no success, especially when trying to use chatgpt's help. But today I wiped my whole comfyui install and reinstalled it from scratch and after getting the manager nodes I tried to install it using the manager and it failed, i then cleared it and tried the manual way with the same results. I keep getting this error : Traceback (most recent call last): File "C:!Sd\Comfy\ComfyUI\nodes.py", line 2012, in load_custom_node module_spec.loader.exec_module(module) File "", line 995, in exec_module File "", line 488, in _call_with_frames_removed File "C:!Sd\Comfy\ComfyUI\custom_nodes\comfyui-reactor-node__init.py", line 23, in from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS File "C:!Sd\Comfy\ComfyUI\custom_nodes\comfyui-reactor-node\nodes.py", line 15, in from insightface.app.common import Face File "C:!Sd\Comfy\python_embeded\Lib\site-packages\insightface__init__.py", line 18, in from . import app File "C:!Sd\Comfy\python_embeded\Lib\site-packages\insightface\app__init.py", line 2, in from .mask_renderer import * File "C:!Sd\Comfy\python_embeded\Lib\site-packages\insightface\app\mask_renderer.py", line 8, in from ..thirdparty import face3d File "C:!Sd\Comfy\python_embeded\Lib\site-packages\insightface\thirdparty\face3d\init__.py", line 3, in from . import mesh File "C:!Sd\Comfy\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

Cannot import C:!Sd\Comfy\ComfyUI\custom_nodes\comfyui-reactor-node module for custom nodes: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject Workspace manager - Openning file hash dict 🦄🦄Loading: Workspace Manager (V2.1.0)

Import times for custom nodes: 0.0 seconds: C:!Sd\Comfy\ComfyUI\custom_nodes\websocket_image_save.py 0.1 seconds: C:!Sd\Comfy\ComfyUI\custom_nodes\comfyui-workspace-manager 0.3 seconds: C:!Sd\Comfy\ComfyUI\custom_nodes\ComfyUI-Manager 0.9 seconds (IMPORT FAILED): C:!Sd\Comfy\ComfyUI\custom_nodes\comfyui-reactor-node

Steps to reproduce the problem

Installed comfyui, added the manager nodes and then through comfyui i tried installing reactor in the manager and got the error.

Sysinfo

Windows 11 Pro Nvidia rtx 4070 cuda 12.1 and comfyui standalone with the python_embeded which uses Python 3.12.7 Pip list is : aiohappyeyeballs 2.4.3 aiohttp 3.10.10 aiosignal 1.3.1 albucore 0.0.20 albumentations 1.4.21 annotated-types 0.7.0 attrs 24.2.0 certifi 2024.8.30 cffi 1.17.1 charset-normalizer 3.4.0 click 8.1.7 colorama 0.4.6 coloredlogs 15.0.1 contourpy 1.3.0 cryptography 43.0.3 cycler 0.12.1 Cython 3.0.11 Deprecated 1.2.14 easydict 1.13 einops 0.8.0 eval_type_backport 0.2.0 filelock 3.16.1 flatbuffers 24.3.25 fonttools 4.54.1 frozenlist 1.5.0 fsspec 2024.10.0 gitdb 4.0.11 GitPython 3.1.43 huggingface-hub 0.26.2 humanfriendly 10.0 idna 3.10 imageio 2.36.0 insightface 0.7.3 Jinja2 3.1.4 joblib 1.4.2 kiwisolver 1.4.7 kornia 0.7.3 kornia_rs 0.1.7 lazy_loader 0.4 markdown-it-py 3.0.0 MarkupSafe 3.0.2 matplotlib 3.9.2 matrix-client 0.4.0 mdurl 0.1.2 mpmath 1.3.0 multidict 6.1.0 networkx 3.4.2 numpy 2.1.3 onnx 1.17.0 onnxruntime-gpu 1.20.0 opencv-python 4.10.0.84 opencv-python-headless 4.10.0.84 packaging 24.1 pandas 2.2.3 pillow 11.0.0 pip 24.3.1 prettytable 3.12.0 propcache 0.2.0 protobuf 5.28.3 psutil 6.1.0 py-cpuinfo 9.0.0 pycparser 2.22 pydantic 2.9.2 pydantic_core 2.23.4 pygit2 1.16.0 PyGithub 2.5.0 Pygments 2.18.0 PyJWT 2.9.0 PyNaCl 1.5.0 pyparsing 3.2.0 pyreadline3 3.5.4 python-dateutil 2.9.0.post0 pytz 2024.2 PyYAML 6.0.2 regex 2024.9.11 requests 2.32.3 rich 13.9.4 safetensors 0.4.5 scikit-image 0.24.0 scikit-learn 1.5.2 scipy 1.14.1 seaborn 0.13.2 segment-anything 1.0 Send2Trash 1.8.3 sentencepiece 0.2.0 setuptools 75.3.0 shellingham 1.5.4 simsimd 6.0.3 six 1.16.0 smmap 5.0.1 soundfile 0.12.1 spandrel 0.4.0 stringzilla 3.10.9 sympy 1.13.1 threadpoolctl 3.5.0 tifffile 2024.9.20 tokenizers 0.20.1 torch 2.5.1+cu124 torchaudio 2.5.1+cu124 torchsde 0.2.6 torchvision 0.20.1+cu124 tqdm 4.66.6 trampoline 0.1.2 transformers 4.46.1 typer 0.13.0 typing_extensions 4.12.2 tzdata 2024.2 ultralytics 8.3.28 ultralytics-thop 2.0.11 urllib3 1.26.20 wcwidth 0.2.13 wrapt 1.16.0 yarl 1.17.1

Relevant console log

C:\!Sd\Comfy>.\python_embeded\python.exe -s ComfyUI\main.py --windows-standalone-build
[START] Security scan
[DONE] Security scan
## ComfyUI-Manager: installing dependencies done.
** ComfyUI startup time: 2024-11-10 18:18:24.451205
** Platform: Windows
** Python version: 3.12.7 (tags/v3.12.7:0b05ead, Oct  1 2024, 03:06:41) [MSC v.1941 64 bit (AMD64)]
** Python executable: C:\!Sd\Comfy\python_embeded\python.exe
** ComfyUI Path: C:\!Sd\Comfy\ComfyUI
** Log path: C:\!Sd\Comfy\comfyui.log

Prestartup times for custom nodes:
   1.0 seconds: C:\!Sd\Comfy\ComfyUI\custom_nodes\ComfyUI-Manager

Total VRAM 12282 MB, total RAM 65225 MB
pytorch version: 2.5.1+cu124
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4070 : cudaMallocAsync
Using pytorch cross attention
[Prompt Server] web root: C:\!Sd\Comfy\ComfyUI\web
C:\!Sd\Comfy\python_embeded\Lib\site-packages\kornia\feature\lightglue.py:44: FutureWarning: `torch.cuda.amp.custom_fwd(args...)` is deprecated. Please use `torch.amp.custom_fwd(args..., device_type='cuda')` instead.
  @torch.cuda.amp.custom_fwd(cast_inputs=torch.float32)
### Loading: ComfyUI-Manager (V2.51.9)
### ComfyUI Revision: 2808 [69667290] *DETACHED | Released on '2024-11-04'
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/model-list.json[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/github-stats.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/extension-node-map.json
[ComfyUI-Manager] default cache updated: https://raw.githubusercontent.com/ltdrdata/ComfyUI-Manager/main/custom-node-list.json
Traceback (most recent call last):
  File "C:\!Sd\Comfy\ComfyUI\nodes.py", line 2012, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 995, in exec_module
  File "<frozen importlib._bootstrap>", line 488, in _call_with_frames_removed
  File "C:\!Sd\Comfy\ComfyUI\custom_nodes\comfyui-reactor-node\__init__.py", line 23, in <module>
    from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "C:\!Sd\Comfy\ComfyUI\custom_nodes\comfyui-reactor-node\nodes.py", line 15, in <module>
    from insightface.app.common import Face
  File "C:\!Sd\Comfy\python_embeded\Lib\site-packages\insightface\__init__.py", line 18, in <module>
    from . import app
  File "C:\!Sd\Comfy\python_embeded\Lib\site-packages\insightface\app\__init__.py", line 2, in <module>
    from .mask_renderer import *
  File "C:\!Sd\Comfy\python_embeded\Lib\site-packages\insightface\app\mask_renderer.py", line 8, in <module>
    from ..thirdparty import face3d
  File "C:\!Sd\Comfy\python_embeded\Lib\site-packages\insightface\thirdparty\face3d\__init__.py", line 3, in <module>
    from . import mesh
  File "C:\!Sd\Comfy\python_embeded\Lib\site-packages\insightface\thirdparty\face3d\mesh\__init__.py", line 9, in <module>
    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

Cannot import C:\!Sd\Comfy\ComfyUI\custom_nodes\comfyui-reactor-node module for custom nodes: numpy.dtype size changed, may indicate binary incompatibility. Expected 96 from C header, got 88 from PyObject
Workspace manager - Openning file hash dict
🦄🦄Loading: Workspace Manager (V2.1.0)

Import times for custom nodes:
   0.0 seconds: C:\!Sd\Comfy\ComfyUI\custom_nodes\websocket_image_save.py
   0.0 seconds: C:\!Sd\Comfy\ComfyUI\custom_nodes\comfyui-workspace-manager
   0.3 seconds: C:\!Sd\Comfy\ComfyUI\custom_nodes\ComfyUI-Manager
   0.5 seconds (IMPORT FAILED): C:\!Sd\Comfy\ComfyUI\custom_nodes\comfyui-reactor-node

Starting server

To see the GUI go to: http://127.0.0.1:8188
FETCH DATA from: C:\!Sd\Comfy\ComfyUI\custom_nodes\ComfyUI-Manager\extension-node-map.json [DONE]

Additional information

Im unsure if there is anything else I could supply to help you understand my errors to be able to help. If there is anything more please let me know

Gourieff commented 2 days ago

Try to downgrade numpy to 1.26.3