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

[SOLVED] ImportError: DLL load failed while importing onnx_cpp2py_export #400

Closed
3 tasks done
hodgesb45 opened this issue Aug 22, 2024 · 4 comments
Closed
3 tasks done

Comments

@hodgesb45
Copy link

First, confirm

  • I have read the instruction carefully
  • I have searched the existing issues
  • I have updated the extension to the latest version

What happened?

I was able to install and get the node to work, but then restarted my computer the next day and it no longer loads.

Steps to reproduce the problem

Re-install comfyUI portable fresh
Follow instructions on Reactor Node installation
(Install VS 2022 Community w/ C++ desktop and mobile development modules)
(Install VSBT w/ C++ desktop and Mobile development modules)
(Git clone the repository)
(run install.bat)
Error: Getting requirements to build wheel did not run successfully when building insight face
Follow troubleshooting steps to install insight face manually
Run ComfyUI and find Import Failed on ReactorNode

Sysinfo

Windows 10, NVIDIA GeForce RTX 2070

Relevant console log

ImportError: DLL load failed while importing onnx_cpp2py_export: A dynamic link library (DLL) initialization routine failed.

Cannot import D:\SD\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node module for custom nodes: DLL load failed while importing onnx_cpp2py_export: A dynamic link library (DLL) initialization routine failed.

Import times for custom nodes:
   0.0 seconds: D:\SD\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py
   2.3 seconds (IMPORT FAILED): D:\SD\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node


### Additional information

_No response_
@hodgesb45 hodgesb45 added bug Something isn't working new labels Aug 22, 2024
@hodgesb45
Copy link
Author

hodgesb45 commented Aug 22, 2024

Going through another install just to collect more logs:
install.bat:
`Installing...
[ReActor] Downloading inswapper_128.onnx to D:\SD\ComfyUI_windows_portable\ComfyUI\models\insightface\inswapper_128.onnx: 529MB [00:12, 44.7MB/s]
CUDA 12.1
Status: The 'onnxruntime-gpu' distribution was not found and is required by the application
Looking in indexes: https://pypi.org/simple, https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/
Collecting onnxruntime-gpu
Using cached onnxruntime_gpu-1.19.0-cp311-cp311-win_amd64.whl.metadata (4.5 kB)
Collecting coloredlogs (from onnxruntime-gpu)
Downloading https://aiinfra.pkgs.visualstudio.com/2692857e-05ef-43b4-ba9c-ccf1c22c437c/_packaging/9387c3aa-d9ad-4513-968c-383f6f7f53b8/pypi/download/coloredlogs/15.0.1/coloredlogs-15.0.1-py2.py3-none-any.whl (46 kB)
Collecting flatbuffers (from onnxruntime-gpu)
Downloading https://aiinfra.pkgs.visualstudio.com/2692857e-05ef-43b4-ba9c-ccf1c22c437c/_packaging/9387c3aa-d9ad-4513-968c-383f6f7f53b8/pypi/download/flatbuffers/24.3.25/flatbuffers-24.3.25-py2.py3-none-any.whl (26 kB)
Requirement already satisfied: numpy>=1.21.6 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from onnxruntime-gpu) (1.26.4)
Requirement already satisfied: packaging in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from onnxruntime-gpu) (24.1)
Collecting protobuf (from onnxruntime-gpu)
Using cached protobuf-5.27.3-cp310-abi3-win_amd64.whl.metadata (592 bytes)
Requirement already satisfied: sympy in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from onnxruntime-gpu) (1.13.1)
Collecting humanfriendly>=9.1 (from coloredlogs->onnxruntime-gpu)
Downloading https://aiinfra.pkgs.visualstudio.com/2692857e-05ef-43b4-ba9c-ccf1c22c437c/_packaging/9387c3aa-d9ad-4513-968c-383f6f7f53b8/pypi/download/humanfriendly/10/humanfriendly-10.0-py2.py3-none-any.whl (86 kB)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from sympy->onnxruntime-gpu) (1.3.0)
Collecting pyreadline3 (from humanfriendly>=9.1->coloredlogs->onnxruntime-gpu)
Using cached pyreadline3-3.4.1-py3-none-any.whl.metadata (2.0 kB)
Using cached onnxruntime_gpu-1.19.0-cp311-cp311-win_amd64.whl (223.2 MB)
Using cached protobuf-5.27.3-cp310-abi3-win_amd64.whl (426 kB)
Using cached pyreadline3-3.4.1-py3-none-any.whl (95 kB)
Installing collected packages: pyreadline3, flatbuffers, protobuf, humanfriendly, coloredlogs, onnxruntime-gpu
Successfully installed coloredlogs-15.0.1 flatbuffers-24.3.25 humanfriendly-10.0 onnxruntime-gpu-1.19.0 protobuf-5.27.3 pyreadline3-3.4.1
Status: The 'insightface==0.7.3' distribution was not found and is required by the application
Collecting insightface==0.7.3
Using cached insightface-0.7.3.tar.gz (439 kB)
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 "D:\SD\ComfyUI_windows_portable\python_embeded\Lib\site-packages\pip_vendor\pyproject_hooks_in_process_in_process.py", line 353, in
main()
File "D:\SD\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:\SD\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:\SD\ComfyUI_windows_portable\python_embeded\Lib\site-packages\setuptools\build_meta.py", line 332, in get_requires_for_build_wheel
return self._get_build_requires(config_settings, requirements=[])
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\SD\ComfyUI_windows_portable\python_embeded\Lib\site-packages\setuptools\build_meta.py", line 302, in _get_build_requires
self.run_setup()
File "D:\SD\ComfyUI_windows_portable\python_embeded\Lib\site-packages\setuptools\build_meta.py", line 318, 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.
Status: The 'onnx>=1.14.0' distribution was not found and is required by the application
Collecting onnx>=1.14.0
Using cached onnx-1.16.2-cp311-cp311-win_amd64.whl.metadata (16 kB)
Requirement already satisfied: numpy>=1.20 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from onnx>=1.14.0) (1.26.4)
Requirement already satisfied: protobuf>=3.20.2 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from onnx>=1.14.0) (5.27.3)
Using cached onnx-1.16.2-cp311-cp311-win_amd64.whl (14.4 MB)
Installing collected packages: onnx
Successfully installed onnx-1.16.2
Status: The 'opencv-python>=4.7.0.72' distribution was not found and is required by the application
Collecting opencv-python>=4.7.0.72
Using cached opencv_python-4.10.0.84-cp37-abi3-win_amd64.whl.metadata (20 kB)
Requirement already satisfied: numpy>=1.21.2 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from opencv-python>=4.7.0.72) (1.26.4)
Using cached opencv_python-4.10.0.84-cp37-abi3-win_amd64.whl (38.8 MB)
Installing collected packages: opencv-python
Successfully installed opencv-python-4.10.0.84
Status: The 'segment_anything' distribution was not found and is required by the application
Collecting segment_anything
Using cached segment_anything-1.0-py3-none-any.whl.metadata (487 bytes)
Using cached segment_anything-1.0-py3-none-any.whl (36 kB)
Installing collected packages: segment_anything
Successfully installed segment_anything-1.0
Status: The 'ultralytics' distribution was not found and is required by the application
Collecting ultralytics
Using cached ultralytics-8.2.80-py3-none-any.whl.metadata (41 kB)
Requirement already satisfied: numpy<2.0.0,>=1.23.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from ultralytics) (1.26.4)
Collecting matplotlib>=3.3.0 (from ultralytics)
Using cached matplotlib-3.9.2-cp311-cp311-win_amd64.whl.metadata (11 kB)
Requirement already satisfied: opencv-python>=4.6.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from ultralytics) (4.10.0.84)
Requirement already satisfied: pillow>=7.1.2 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from ultralytics) (10.4.0)
Requirement already satisfied: pyyaml>=5.3.1 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from ultralytics) (6.0.1)
Requirement already satisfied: requests>=2.23.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from ultralytics) (2.32.3)
Requirement already satisfied: scipy>=1.4.1 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from ultralytics) (1.14.0)
Requirement already satisfied: torch>=1.8.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from ultralytics) (2.3.1+cu121)
Requirement already satisfied: torchvision>=0.9.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from ultralytics) (0.18.1+cu121)
Requirement already satisfied: tqdm>=4.64.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from ultralytics) (4.66.4)
Requirement already satisfied: psutil in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from ultralytics) (6.0.0)
Collecting py-cpuinfo (from ultralytics)
Using cached py_cpuinfo-9.0.0-py3-none-any.whl.metadata (794 bytes)
Collecting pandas>=1.1.4 (from ultralytics)
Using cached pandas-2.2.2-cp311-cp311-win_amd64.whl.metadata (19 kB)
Collecting seaborn>=0.11.0 (from ultralytics)
Using cached seaborn-0.13.2-py3-none-any.whl.metadata (5.4 kB)
Collecting ultralytics-thop>=2.0.0 (from ultralytics)
Using cached ultralytics_thop-2.0.5-py3-none-any.whl.metadata (8.9 kB)
Collecting contourpy>=1.0.1 (from matplotlib>=3.3.0->ultralytics)
Using cached contourpy-1.2.1-cp311-cp311-win_amd64.whl.metadata (5.8 kB)
Collecting cycler>=0.10 (from matplotlib>=3.3.0->ultralytics)
Using cached cycler-0.12.1-py3-none-any.whl.metadata (3.8 kB)
Collecting fonttools>=4.22.0 (from matplotlib>=3.3.0->ultralytics)
Using cached fonttools-4.53.1-cp311-cp311-win_amd64.whl.metadata (165 kB)
Collecting kiwisolver>=1.3.1 (from matplotlib>=3.3.0->ultralytics)
Using cached kiwisolver-1.4.5-cp311-cp311-win_amd64.whl.metadata (6.5 kB)
Requirement already satisfied: packaging>=20.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib>=3.3.0->ultralytics) (24.1)
Collecting pyparsing>=2.3.1 (from matplotlib>=3.3.0->ultralytics)
Using cached pyparsing-3.1.2-py3-none-any.whl.metadata (5.1 kB)
Collecting python-dateutil>=2.7 (from matplotlib>=3.3.0->ultralytics)
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl.metadata (8.4 kB)
Collecting pytz>=2020.1 (from pandas>=1.1.4->ultralytics)
Using cached pytz-2024.1-py2.py3-none-any.whl.metadata (22 kB)
Collecting tzdata>=2022.7 (from pandas>=1.1.4->ultralytics)
Using cached tzdata-2024.1-py2.py3-none-any.whl.metadata (1.4 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from requests>=2.23.0->ultralytics) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from requests>=2.23.0->ultralytics) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from requests>=2.23.0->ultralytics) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from requests>=2.23.0->ultralytics) (2024.7.4)
Requirement already satisfied: filelock in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from torch>=1.8.0->ultralytics) (3.15.4)
Requirement already satisfied: typing-extensions>=4.8.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from torch>=1.8.0->ultralytics) (4.12.2)
Requirement already satisfied: sympy in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from torch>=1.8.0->ultralytics) (1.13.1)
Requirement already satisfied: networkx in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from torch>=1.8.0->ultralytics) (3.3)
Requirement already satisfied: jinja2 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from torch>=1.8.0->ultralytics) (3.1.4)
Requirement already satisfied: fsspec in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from torch>=1.8.0->ultralytics) (2024.6.1)
Requirement already satisfied: mkl<=2021.4.0,>=2021.1.1 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from torch>=1.8.0->ultralytics) (2021.4.0)
Requirement already satisfied: colorama in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from tqdm>=4.64.0->ultralytics) (0.4.6)
Requirement already satisfied: intel-openmp==2021.* in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch>=1.8.0->ultralytics) (2021.4.0)
Requirement already satisfied: tbb==2021.* in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from mkl<=2021.4.0,>=2021.1.1->torch>=1.8.0->ultralytics) (2021.13.0)
Collecting six>=1.5 (from python-dateutil>=2.7->matplotlib>=3.3.0->ultralytics)
Using cached six-1.16.0-py2.py3-none-any.whl.metadata (1.8 kB)
Requirement already satisfied: MarkupSafe>=2.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from jinja2->torch>=1.8.0->ultralytics) (2.1.5)
Requirement already satisfied: mpmath<1.4,>=1.1.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from sympy->torch>=1.8.0->ultralytics) (1.3.0)
Using cached ultralytics-8.2.80-py3-none-any.whl (869 kB)
Using cached matplotlib-3.9.2-cp311-cp311-win_amd64.whl (7.8 MB)
Using cached pandas-2.2.2-cp311-cp311-win_amd64.whl (11.6 MB)
Using cached seaborn-0.13.2-py3-none-any.whl (294 kB)
Using cached ultralytics_thop-2.0.5-py3-none-any.whl (25 kB)
Using cached py_cpuinfo-9.0.0-py3-none-any.whl (22 kB)
Using cached contourpy-1.2.1-cp311-cp311-win_amd64.whl (188 kB)
Using cached cycler-0.12.1-py3-none-any.whl (8.3 kB)
Using cached fonttools-4.53.1-cp311-cp311-win_amd64.whl (2.2 MB)
Using cached kiwisolver-1.4.5-cp311-cp311-win_amd64.whl (56 kB)
Using cached pyparsing-3.1.2-py3-none-any.whl (103 kB)
Using cached python_dateutil-2.9.0.post0-py2.py3-none-any.whl (229 kB)
Using cached pytz-2024.1-py2.py3-none-any.whl (505 kB)
Using cached tzdata-2024.1-py2.py3-none-any.whl (345 kB)
Using cached six-1.16.0-py2.py3-none-any.whl (11 kB)
Installing collected packages: pytz, py-cpuinfo, tzdata, six, pyparsing, kiwisolver, fonttools, cycler, contourpy, python-dateutil, ultralytics-thop, pandas, matplotlib, seaborn, ultralytics
Successfully installed contourpy-1.2.1 cycler-0.12.1 fonttools-4.53.1 kiwisolver-1.4.5 matplotlib-3.9.2 pandas-2.2.2 py-cpuinfo-9.0.0 pyparsing-3.1.2 python-dateutil-2.9.0.post0 pytz-2024.1 seaborn-0.13.2 six-1.16.0 tzdata-2024.1 ultralytics-8.2.80 ultralytics-thop-2.0.5
Ok
Done
Press any key to continue . . .`

Relevant Logs after running comfyui from this step:
`File "D:\SD\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\nodes.py", line 15, in
from insightface.app.common import Face
ModuleNotFoundError: No module named 'insightface'

Cannot import D:\SD\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node module for custom nodes: No module named 'insightface'

Import times for custom nodes:
0.0 seconds: D:\SD\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py
0.5 seconds (IMPORT FAILED): D:\SD\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node`

Installing insightface-0.7.3-cp311-cp311-win_amd64 manually

`D:\SD\ComfyUI_windows_portable>python_embeded\python.exe -m pip install "C:\Users\hodge\Downloads\insightface-0.7.3-cp311-cp311-win_amd64.whl"
Processing c:\users\hodge\downloads\insightface-0.7.3-cp311-cp311-win_amd64.whl
Requirement already satisfied: numpy in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (1.26.4)
Requirement already satisfied: onnx in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (1.16.2)
Requirement already satisfied: tqdm in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (4.66.4)
Requirement already satisfied: requests in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (2.32.3)
Requirement already satisfied: matplotlib in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (3.9.2)
Requirement already satisfied: Pillow in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (10.4.0)
Requirement already satisfied: scipy in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from insightface==0.7.3) (1.14.0)
Collecting scikit-learn (from insightface==0.7.3)
Using cached scikit_learn-1.5.1-cp311-cp311-win_amd64.whl.metadata (12 kB)
Collecting scikit-image (from insightface==0.7.3)
Using cached scikit_image-0.24.0-cp311-cp311-win_amd64.whl.metadata (14 kB)
Collecting easydict (from insightface==0.7.3)
Using cached easydict-1.13-py3-none-any.whl.metadata (4.2 kB)
Collecting cython (from insightface==0.7.3)
Using cached Cython-3.0.11-cp311-cp311-win_amd64.whl.metadata (3.2 kB)
Collecting albumentations (from insightface==0.7.3)
Using cached albumentations-1.4.14-py3-none-any.whl.metadata (38 kB)
Collecting prettytable (from insightface==0.7.3)
Using cached prettytable-3.11.0-py3-none-any.whl.metadata (30 kB)
Requirement already satisfied: PyYAML in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from albumentations->insightface==0.7.3) (6.0.1)
Requirement already satisfied: typing-extensions>=4.9.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from albumentations->insightface==0.7.3) (4.12.2)
Collecting pydantic>=2.7.0 (from albumentations->insightface==0.7.3)
Using cached pydantic-2.8.2-py3-none-any.whl.metadata (125 kB)
Collecting albucore>=0.0.13 (from albumentations->insightface==0.7.3)
Using cached albucore-0.0.13-py3-none-any.whl.metadata (3.1 kB)
Collecting eval-type-backport (from albumentations->insightface==0.7.3)
Using cached eval_type_backport-0.2.0-py3-none-any.whl.metadata (2.2 kB)
Collecting opencv-python-headless>=4.9.0.80 (from albumentations->insightface==0.7.3)
Using cached opencv_python_headless-4.10.0.84-cp37-abi3-win_amd64.whl.metadata (20 kB)
Requirement already satisfied: networkx>=2.8 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from scikit-image->insightface==0.7.3) (3.3)
Collecting imageio>=2.33 (from scikit-image->insightface==0.7.3)
Using cached imageio-2.35.1-py3-none-any.whl.metadata (4.9 kB)
Collecting tifffile>=2022.8.12 (from scikit-image->insightface==0.7.3)
Using cached tifffile-2024.8.10-py3-none-any.whl.metadata (31 kB)
Requirement already satisfied: packaging>=21 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from scikit-image->insightface==0.7.3) (24.1)
Collecting lazy-loader>=0.4 (from scikit-image->insightface==0.7.3)
Using cached lazy_loader-0.4-py3-none-any.whl.metadata (7.6 kB)
Requirement already satisfied: contourpy>=1.0.1 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->insightface==0.7.3) (1.2.1)
Requirement already satisfied: cycler>=0.10 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->insightface==0.7.3) (0.12.1)
Requirement already satisfied: fonttools>=4.22.0 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->insightface==0.7.3) (4.53.1)
Requirement already satisfied: kiwisolver>=1.3.1 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->insightface==0.7.3) (1.4.5)
Requirement already satisfied: pyparsing>=2.3.1 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->insightface==0.7.3) (3.1.2)
Requirement already satisfied: python-dateutil>=2.7 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from matplotlib->insightface==0.7.3) (2.9.0.post0)
Requirement already satisfied: protobuf>=3.20.2 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from onnx->insightface==0.7.3) (5.27.3)
Collecting wcwidth (from prettytable->insightface==0.7.3)
Using cached wcwidth-0.2.13-py2.py3-none-any.whl.metadata (14 kB)
Requirement already satisfied: charset-normalizer<4,>=2 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from requests->insightface==0.7.3) (3.3.2)
Requirement already satisfied: idna<4,>=2.5 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from requests->insightface==0.7.3) (3.7)
Requirement already satisfied: urllib3<3,>=1.21.1 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from requests->insightface==0.7.3) (2.2.2)
Requirement already satisfied: certifi>=2017.4.17 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from requests->insightface==0.7.3) (2024.7.4)
Collecting joblib>=1.2.0 (from scikit-learn->insightface==0.7.3)
Using cached joblib-1.4.2-py3-none-any.whl.metadata (5.4 kB)
Collecting threadpoolctl>=3.1.0 (from scikit-learn->insightface==0.7.3)
Using cached threadpoolctl-3.5.0-py3-none-any.whl.metadata (13 kB)
Requirement already satisfied: colorama in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from tqdm->insightface==0.7.3) (0.4.6)
Collecting tomli>=2.0.1 (from albucore>=0.0.13->albumentations->insightface==0.7.3)
Using cached tomli-2.0.1-py3-none-any.whl.metadata (8.9 kB)
Collecting annotated-types>=0.4.0 (from pydantic>=2.7.0->albumentations->insightface==0.7.3)
Using cached annotated_types-0.7.0-py3-none-any.whl.metadata (15 kB)
Collecting pydantic-core==2.20.1 (from pydantic>=2.7.0->albumentations->insightface==0.7.3)
Using cached pydantic_core-2.20.1-cp311-none-win_amd64.whl.metadata (6.7 kB)
Requirement already satisfied: six>=1.5 in d:\sd\comfyui_windows_portable\python_embeded\lib\site-packages (from python-dateutil>=2.7->matplotlib->insightface==0.7.3) (1.16.0)
Using cached albumentations-1.4.14-py3-none-any.whl (177 kB)
Using cached scikit_image-0.24.0-cp311-cp311-win_amd64.whl (12.8 MB)
Using cached Cython-3.0.11-cp311-cp311-win_amd64.whl (2.8 MB)
Using cached easydict-1.13-py3-none-any.whl (6.8 kB)
Using cached prettytable-3.11.0-py3-none-any.whl (28 kB)
Using cached scikit_learn-1.5.1-cp311-cp311-win_amd64.whl (11.0 MB)
Using cached albucore-0.0.13-py3-none-any.whl (8.5 kB)
Using cached imageio-2.35.1-py3-none-any.whl (315 kB)
Using cached joblib-1.4.2-py3-none-any.whl (301 kB)
Using cached lazy_loader-0.4-py3-none-any.whl (12 kB)
Using cached opencv_python_headless-4.10.0.84-cp37-abi3-win_amd64.whl (38.8 MB)
Using cached pydantic-2.8.2-py3-none-any.whl (423 kB)
Using cached pydantic_core-2.20.1-cp311-none-win_amd64.whl (1.9 MB)
Using cached threadpoolctl-3.5.0-py3-none-any.whl (18 kB)
Using cached tifffile-2024.8.10-py3-none-any.whl (225 kB)
Using cached eval_type_backport-0.2.0-py3-none-any.whl (5.9 kB)
Using cached wcwidth-0.2.13-py2.py3-none-any.whl (34 kB)
Using cached annotated_types-0.7.0-py3-none-any.whl (13 kB)
Using cached tomli-2.0.1-py3-none-any.whl (12 kB)
Installing collected packages: wcwidth, easydict, tomli, tifffile, threadpoolctl, pydantic-core, prettytable, opencv-python-headless, lazy-loader, joblib, imageio, eval-type-backport, cython, annotated-types, scikit-learn, scikit-image, pydantic, albucore, albumentations, insightface
WARNING: The scripts lsm2bin.exe, tiff2fsspec.exe, tiffcomment.exe and tifffile.exe are installed in 'D:\SD\ComfyUI_windows_portable\python_embeded\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The scripts imageio_download_bin.exe and imageio_remove_bin.exe are installed in 'D:\SD\ComfyUI_windows_portable\python_embeded\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The scripts cygdb.exe, cython.exe and cythonize.exe are installed in 'D:\SD\ComfyUI_windows_portable\python_embeded\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
WARNING: The script insightface-cli.exe is installed in 'D:\SD\ComfyUI_windows_portable\python_embeded\Scripts' which is not on PATH.
Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.
Successfully installed albucore-0.0.13 albumentations-1.4.14 annotated-types-0.7.0 cython-3.0.11 easydict-1.13 eval-type-backport-0.2.0 imageio-2.35.1 insightface-0.7.3 joblib-1.4.2 lazy-loader-0.4 opencv-python-headless-4.10.0.84 prettytable-3.11.0 pydantic-2.8.2 pydantic-core-2.20.1 scikit-image-0.24.0 scikit-learn-1.5.1 threadpoolctl-3.5.0 tifffile-2024.8.10 tomli-2.0.1 wcwidth-0.2.13

D:\SD\ComfyUI_windows_portable>`

Relavent logs Running ComfyUI after this step

File "D:\SD\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnx_init_.py", line 77, in
from onnx.onnx_cpp2py_export import ONNX_ML
ImportError: DLL load failed while importing onnx_cpp2py_export: A dynamic link library (DLL) initialization routine failed.

Cannot import D:\SD\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node module for custom nodes: DLL load failed while importing onnx_cpp2py_export: A dynamic link library (DLL) initialization routine failed.

Import times for custom nodes:
0.0 seconds: D:\SD\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py
2.3 seconds (IMPORT FAILED): D:\SD\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node

@hodgesb45
Copy link
Author

Fixed, I had to input the following commands from the comfyUI portable root folder:

python_embeded\python.exe -m pip uninstall onnx onnxruntime onnxruntime-gpu
python_embeded\python.exe -m pip install onnx onnx==1.14.0 onnxruntime-gpu==1.15.0

I'm not very literate in python or any of this. But I think it was running on onnx 1.16.2

@hodgesb45
Copy link
Author

Close

@Gourieff Gourieff changed the title DLL load failed while importing [SOLVED] ImportError: DLL load failed while importing onnx_cpp2py_export Sep 12, 2024
@Gourieff Gourieff added ✔ solved and removed bug Something isn't working new labels Sep 12, 2024
@Gourieff
Copy link
Owner

Gourieff commented Sep 15, 2024

Related
#384
Gourieff/sd-webui-reactor#524

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants