Gourieff / comfyui-reactor-node

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

(SOLVED) REACTOR - DLL load failed while importing onnx_cpp2py_export (HELP) #431

Closed RodrigoValentain closed 6 hours ago

RodrigoValentain commented 7 hours ago

First, confirm

What happened?

I can't use REACTOR. I get the message: ImportError: DLL load failed while importing onnx_cpp2py_export

  1. (all troubleshooting steps were performed without success) 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:
  2. onnxruntime 1.16.1 / cuda 11.8

I accept all guidance to correct this error.

unfortunately I have not found a definitive solution for this. 2 months.

Steps to reproduce the problem

Traceback (most recent call last): File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1994, in load_custom_node module_spec.loader.exec_module(module) File "", line 940, in exec_module File "", line 241, in _call_with_frames_removed File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node__init.py", line 23, in from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\nodes.py", line 15, in from insightface.app.common import Face File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface__init__.py", line 16, in from . import model_zoo File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\init.py", line 1, in from .model_zoo import get_model File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in from .arcface_onnx import * File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in import onnx File "T:\STABLE DIFFUSION\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: Uma rotina de inicialização da biblioteca de vínculo dinâmico (DLL) falhou.

image image

Sysinfo

32gb ram Geforce RTX 3060 ti 8gb

Relevant console log

when starting COMFYUI I get the following::

T:\STABLE DIFFUSION\ComfyUI_windows_portable>.\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-09-21 21:43:16.632026
** Platform: Windows
** Python version: 3.11.8 (tags/v3.11.8:db85d51, Feb  6 2024, 22:03:32) [MSC v.1937 64 bit (AMD64)]
** Python executable: T:\STABLE DIFFUSION\ComfyUI_windows_portable\python_embeded\python.exe
** ComfyUI Path: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI
** Log path: T:\STABLE DIFFUSION\ComfyUI_windows_portable\comfyui.log

Prestartup times for custom nodes:
   0.0 seconds: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\rgthree-comfy
   3.6 seconds: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager

Total VRAM 8191 MB, total RAM 32725 MB
pytorch version: 2.3.1+cu121
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 3060 Ti : cudaMallocAsync
Using pytorch cross attention

←[91m ### Mixlab Nodes: ←[93mLoaded
ChatGPT.available True
edit_mask.available True
## clip_interrogator_model not found: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\models\clip_interrogator\Salesforce\blip-image-captioning-base, pls download from https://huggingface.co/Salesforce/blip-image-captioning-base
ClipInterrogator.available True
## text_generator_model not found: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\models\prompt_generator\text2image-prompt-generator, pls download from https://huggingface.co/succinctly/text2image-prompt-generator/tree/main
## zh_en_model not found: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\models\prompt_generator\opus-mt-zh-en, pls download from https://huggingface.co/Helsinki-NLP/opus-mt-zh-en/tree/main
PromptGenerate.available True
ChinesePrompt.available True
RembgNode_.available True
ffmpeg could not be found. Using ffmpeg from imageio-ffmpeg.
TripoSR.available
MiniCPMNode.available
Scenedetect.available
FishSpeech.available
←[93m -------------- ←[0m
Traceback (most recent call last):
  File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\nodes.py", line 1994, in load_custom_node
    module_spec.loader.exec_module(module)
  File "<frozen importlib._bootstrap_external>", line 940, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\__init__.py", line 23, in <module>
    from .nodes import NODE_CLASS_MAPPINGS, NODE_DISPLAY_NAME_MAPPINGS
  File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\nodes.py", line 15, in <module>
    from insightface.app.common import Face
  File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\__init__.py", line 16, in <module>
    from . import model_zoo
  File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\__init__.py", line 1, in <module>
    from .model_zoo import get_model
  File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in <module>
    from .arcface_onnx import *
  File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in <module>
    import onnx
  File "T:\STABLE DIFFUSION\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnx\__init__.py", line 77, in <module>
    from onnx.onnx_cpp2py_export import ONNX_ML
ImportError: DLL load failed while importing onnx_cpp2py_export: Uma rotina de inicialização da biblioteca de vínculo dinâmico (DLL) falhou.

Cannot import T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node module for custom nodes: DLL load failed while importing onnx_cpp2py_export: Uma rotina de inicialização da biblioteca de vínculo dinâmico (DLL) falhou.
T:\STABLE DIFFUSION\ComfyUI_windows_portable
############################################
T:\STABLE DIFFUSION\ComfyUI_windows_portable\custom_nodes\ComfyUI-NAI-styler\CSV
############################################
[]
############################################

Import times for custom nodes:
   0.0 seconds: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\websocket_image_save.py
   0.0 seconds: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_IPAdapter_plus
   0.1 seconds: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\facerestore_cf
   0.1 seconds: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI_Comfyroll_CustomNodes
   0.2 seconds: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Inspire-Pack
   0.4 seconds: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager
   2.3 seconds: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-art-venture
   3.4 seconds: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\was-node-suite-comfyui
   3.7 seconds (IMPORT FAILED): T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node
   4.0 seconds: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-mixlab-nodes
  13.7 seconds: T:\STABLE DIFFUSION\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfy_mtb

Starting server
←[93mTo see the GUI go to: http://192.168.0.6:8188 or http://127.0.0.1:8188
←[93mTo see the GUI go to: https://192.168.0.6:8189 or https://127.0.0.1:8189

Additional information

nvidia-smi +---------------------------------------------------------------------------------------+ | NVIDIA-SMI 536.23 Driver Version: 536.23 CUDA Version: 12.2 | |-----------------------------------------+----------------------+----------------------+ | GPU Name TCC/WDDM | Bus-Id Disp.A | Volatile Uncorr. ECC | | Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. | | | | MIG | 0 NVIDIA GeForce RTX 3060 Ti WDDM | 00000000:01:00.0 On | N/A | | 0% 35C P8 12W / 225W | 379MiB / 8192MiB | 2% Default | | | | N/A | +-----------------------------------------+----------------------+--------------------

nvcc --version nvcc: NVIDIA (R) Cuda compiler driver Copyright (c) 2005-2022 NVIDIA Corporation Built on Wed_Sep_21_10:41:10_Pacific_Daylight_Time_2022 Cuda compilation tools, release 11.8, V11.8.89 Build cuda_11.8.r11.8/compiler.31833905_0


exllamav2 0.2.2 insightface 0.7.3 onnx 1.14.0 onnxconverter-common 1.14.0 onnxruntime 1.16.1 onnxruntime-gpu 1.16.1 open-clip-torch 2.20.0 openai 1.46.1 opencv-contrib-python 4.10.0.84 opencv-python 4.10.0.84 opencv-python-headless 4.10.0.84 packaging 24.1 pip 24.2 protobuf 3.20.2 python-dateutil 2.9.0.post0 python-multipart 0.0.9 pytorch-lightning 1.9.4 safetensors 0.4.2 tensorboard-data-server 0.7.2 torch 2.4.1 torchaudio 2.4.1 torchdiffeq 0.2.3 torchmetrics 1.4.1 torchsde 0.2.6 torchvision 0.19.1 ultralytics 8.2.82 ultralytics-thop 2.0.5

RodrigoValentain commented 6 hours ago

(SOLVED) Run winget install --id Microsoft.VCRedist.2015+.x64 --source winget on cmd/shell, after download dll libomp140.x86_64.dll and put on system32 folder