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

ReActor fails in Forge: "DLL load failed while importing onnx_cpp2py_export" #524

Open
3 tasks done
tusharbhutt opened this issue Sep 4, 2024 · 14 comments
Open
3 tasks done
Labels
bug Something isn't working 🔥 HOT

Comments

@tusharbhutt
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 am unable to load ReActor in Forge due to errors in the DLL for ONNX_CPP2PY_EXPORT. Forge will start, but the extension does not appears at all.

Steps to reproduce the problem

  1. Run Forge
  2. Load WebUI
  3. ReActor fails in Console window

Sysinfo

This is on Windows 10 Pro (22H2) in Firefox with either RTX 3060 12 GB VRAm or 4060 Ti 16 GB VRAM cards. See sysinfo below.

sysinfo-2024-09-04-01-25.json

Relevant console log

Here is the console log:

venv "C:\Applications\StableDiffusion\Forge\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: f2.0.1v1.10.1-previous-501-g668e87f9
Commit hash: 668e87f920be30001bb87214d9001bf59f2da275
CUDA 12.1
Launching Web UI with arguments: --autolaunch --port 36743 --cuda-malloc
Using cudaMallocAsync backend.
Total VRAM 16380 MB, total RAM 48920 MB
pytorch version: 2.3.1+cu121
Set vram state to: NORMAL_VRAM
Device: cuda:0 NVIDIA GeForce RTX 4060 Ti : cudaMallocAsync
VAE dtype preferences: [torch.bfloat16, torch.float32] -> torch.bfloat16
CUDA Using Stream: False
Using pytorch cross attention
Using pytorch attention for VAE
ControlNet preprocessor location: C:\Applications\StableDiffusion\Forge\models\ControlNetPreprocessor
[-] ADetailer initialized. version: 24.9.0, num models: 23
CivitAI Browser+: Aria2 RPC started
*** Error loading script: console_log_patch.py
    Traceback (most recent call last):
      File "C:\Applications\StableDiffusion\Forge\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Applications\StableDiffusion\Forge\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\console_log_patch.py", line 4, in <module>
        import insightface
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\__init__.py", line 16, in <module>
        from . import model_zoo
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\__init__.py", line 1, in <module>
        from .model_zoo import get_model
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in <module>
        from .arcface_onnx import *
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in <module>
        import onnx
      File "C:\Applications\StableDiffusion\Forge\venv\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: A dynamic link library (DLL) initialization routine failed.

---
*** Error loading script: reactor_api.py
    Traceback (most recent call last):
      File "C:\Applications\StableDiffusion\Forge\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Applications\StableDiffusion\Forge\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_api.py", line 28, in <module>
        from scripts.reactor_swapper import EnhancementOptions, swap_face, DetectionOptions
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 11, in <module>
        import insightface
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\__init__.py", line 16, in <module>
        from . import model_zoo
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\__init__.py", line 1, in <module>
        from .model_zoo import get_model
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in <module>
        from .arcface_onnx import *
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in <module>
        import onnx
      File "C:\Applications\StableDiffusion\Forge\venv\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: A dynamic link library (DLL) initialization routine failed.

---
*** Error loading script: reactor_faceswap.py
    Traceback (most recent call last):
      File "C:\Applications\StableDiffusion\Forge\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Applications\StableDiffusion\Forge\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_faceswap.py", line 18, in <module>
        from reactor_ui import (
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\reactor_ui\__init__.py", line 2, in <module>
        import reactor_ui.reactor_tools_ui as ui_tools
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\reactor_ui\reactor_tools_ui.py", line 2, in <module>
        from scripts.reactor_swapper import build_face_model, blend_faces
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 11, in <module>
        import insightface
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\__init__.py", line 16, in <module>
        from . import model_zoo
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\__init__.py", line 1, in <module>
        from .model_zoo import get_model
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in <module>
        from .arcface_onnx import *
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in <module>
        import onnx
      File "C:\Applications\StableDiffusion\Forge\venv\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: A dynamic link library (DLL) initialization routine failed.

---
*** Error loading script: reactor_helpers.py
    Traceback (most recent call last):
      File "C:\Applications\StableDiffusion\Forge\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Applications\StableDiffusion\Forge\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_helpers.py", line 10, in <module>
        from insightface.app.common import Face
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\__init__.py", line 16, in <module>
        from . import model_zoo
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\__init__.py", line 1, in <module>
        from .model_zoo import get_model
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in <module>
        from .arcface_onnx import *
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in <module>
        import onnx
      File "C:\Applications\StableDiffusion\Forge\venv\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: A dynamic link library (DLL) initialization routine failed.

---
*** Error loading script: reactor_logger.py
    Traceback (most recent call last):
      File "C:\Applications\StableDiffusion\Forge\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Applications\StableDiffusion\Forge\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_logger.py", line 7, in <module>
        from scripts.reactor_helpers import addLoggingLevel
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_helpers.py", line 10, in <module>
        from insightface.app.common import Face
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\__init__.py", line 16, in <module>
        from . import model_zoo
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\__init__.py", line 1, in <module>
        from .model_zoo import get_model
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in <module>
        from .arcface_onnx import *
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in <module>
        import onnx
      File "C:\Applications\StableDiffusion\Forge\venv\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: A dynamic link library (DLL) initialization routine failed.

---
*** Error loading script: reactor_swapper.py
    Traceback (most recent call last):
      File "C:\Applications\StableDiffusion\Forge\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Applications\StableDiffusion\Forge\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 11, in <module>
        import insightface
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\__init__.py", line 16, in <module>
        from . import model_zoo
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\__init__.py", line 1, in <module>
        from .model_zoo import get_model
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in <module>
        from .arcface_onnx import *
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in <module>
        import onnx
      File "C:\Applications\StableDiffusion\Forge\venv\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: A dynamic link library (DLL) initialization routine failed.

---
*** Error loading script: reactor_version.py
    Traceback (most recent call last):
      File "C:\Applications\StableDiffusion\Forge\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Applications\StableDiffusion\Forge\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_version.py", line 4, in <module>
        from scripts.reactor_logger import logger, get_Run, set_Run
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_logger.py", line 7, in <module>
        from scripts.reactor_helpers import addLoggingLevel
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_helpers.py", line 10, in <module>
        from insightface.app.common import Face
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\__init__.py", line 16, in <module>
        from . import model_zoo
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\__init__.py", line 1, in <module>
        from .model_zoo import get_model
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in <module>
        from .arcface_onnx import *
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in <module>
        import onnx
      File "C:\Applications\StableDiffusion\Forge\venv\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: A dynamic link library (DLL) initialization routine failed.

---
*** Error loading script: reactor_xyz.py
    Traceback (most recent call last):
      File "C:\Applications\StableDiffusion\Forge\modules\scripts.py", line 525, in load_scripts
        script_module = script_loading.load_module(scriptfile.path)
      File "C:\Applications\StableDiffusion\Forge\modules\script_loading.py", line 13, in load_module
        module_spec.loader.exec_module(module)
      File "<frozen importlib._bootstrap_external>", line 883, in exec_module
      File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_xyz.py", line 8, in <module>
        from scripts.reactor_helpers import (
      File "C:\Applications\StableDiffusion\Forge\extensions\sd-webui-reactor\scripts\reactor_helpers.py", line 10, in <module>
        from insightface.app.common import Face
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\__init__.py", line 16, in <module>
        from . import model_zoo
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\__init__.py", line 1, in <module>
        from .model_zoo import get_model
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\model_zoo.py", line 11, in <module>
        from .arcface_onnx import *
      File "C:\Applications\StableDiffusion\Forge\venv\lib\site-packages\insightface\model_zoo\arcface_onnx.py", line 10, in <module>
        import onnx
      File "C:\Applications\StableDiffusion\Forge\venv\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: A dynamic link library (DLL) initialization routine failed.

---
2024-09-03 19:25:23,385 - ControlNet - INFO - ControlNet UI callback registered.
C:\Applications\StableDiffusion\Forge\extensions\sd-civitai-browser-plus\scripts\civitai_gui.py:204: GradioDeprecationWarning: unexpected argument for Button: label
  refresh = gr.Button(label="", value="", elem_id=refreshbtn, icon="placeholder")
Model selected: {'checkpoint_info': {'filename': 'C:\\Applications\\StableDiffusion\\Forge\\models\\Stable-diffusion\\Flux\\flux1-dev-fp8.safetensors', 'hash': 'be9881f4'}, 'additional_modules': ['C:\\Applications\\StableDiffusion\\Forge\\models\\VAE\\ae.safetensors'], 'unet_storage_dtype': None}
Using online LoRAs in FP16: False
Running on local URL:  http://127.0.0.1:36743

To create a public link, set `share=True` in `launch()`.
Startup time: 39.0s (prepare environment: 5.9s, import torch: 7.4s, initialize shared: 0.2s, other imports: 0.3s, list SD models: 0.2s, load scripts: 20.4s, create ui: 3.2s, gradio launch: 1.2s).
Environment vars changed: {'stream': False, 'inference_memory': 1015.0, 'pin_shared_memory': False}
[GPU Setting] You will use 93.80% GPU memory (15364.00 MB) to load weights, and use 6.20% GPU memory (1015.00 MB) to do matrix computation.

Additional information

I have done the following with no success:

  1. Installed VS Studio and appropriate workspace
  2. Went into VENV folders and reinstalled items as per instructions here
  3. Manually installed wheel as per this suggestion.
  4. Even tried reinstalling ONNXRUNTIME-GPU again, but it flew through with no problems
@tusharbhutt tusharbhutt added bug Something isn't working new labels Sep 4, 2024
@Malfrador
Copy link

Malfrador commented Sep 4, 2024

Supposed to be fixed by this commit here, but I am also still getting the same issue.

Also tried reinstalling the extension, no luck. Additionally I manually edited the requirements.txt to use an older version of onxxruntime, which did not solve the issue either.
I also tried the steps here (no luck) and installing various other versions of onnx manually, down to 1.14.0.
The FaceSwapLab extension is broken in the same way.

@tusharbhutt
Copy link
Author

Supposed to be fixed by this commit here, but I am also still getting the same issue.

Also tried reinstalling the extension, no luck. Additionally I manually edited the requirements.txt to use an older version of onxxruntime, which did not solve the issue either. I also tried the steps here (no luck) and installing various other versions of onnx manually, down to 1.14.0. The FaceSwapLap extension is broken in the same way.

Thanks for verifying; I had updated as well because of gradio and thought it would be fixed.

@Malfrador
Copy link

I have managed to solve the issue for me.

I completely installed Forge from scratch, only keeping my "models" folder. I've been using a rather old install that I updated from the normal A1111 webui and that also didn't include the bundled python environment it does now. Something there was likely broken.

@kalle07
Copy link

kalle07 commented Sep 8, 2024

since weeks on web forge ui

on start is all ok
13:40:25 - ReActor - STATUS - Running v0.7.1-a2 on Device: CUDA

BUT if i will use it:

100%|██████████████████████████████████████████████████████████████████████████████████| 13/13 [00:19<00:00, 1.54s/it]
[Unload] Trying to free 3100.49 MB for cuda:0 with 0 models keep loaded ... Current free memory is 3200.22 MB ... Done.
[Memory Management] Target: IntegratedAutoencoderKL, Free GPU: 3202.40 MB, Model Require: 159.87 MB, Previously Loaded: 0.00 MB, Inference Require: 1379.00 MB, Remaining: 1663.53 MB, All loaded to GPU.
Moving model(s) has taken 0.73 seconds
13:42:16 - ReActor - STATUS - Working: source face index [0], target face index [0]
13:42:16 - ReActor - STATUS - Analyzing Source Image...
13:42:17 - ReActor - STATUS - Analyzing Target Image...
13:42:18 - ReActor - STATUS - Detecting Source Face, Index = 0
13:42:18 - ReActor - STATUS - Detected: -42- y.o. Female
13:42:19 - ReActor - STATUS - Detecting Target Face, Index = 0
13:42:19 - ReActor - STATUS - Detected: -25- y.o. Female
13:42:19 - ReActor - STATUS - Swapping Source into Target
*** Error running postprocess_image: E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_faceswap.py
Traceback (most recent call last):
File "E:\WebUI_Forge\webui\modules\scripts.py", line 940, in postprocess_image
script.postprocess_image(p, pp, *script_args)
File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_faceswap.py", line 465, in postprocess_image
result, output, swapped = swap_face(
File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 616, in swap_face
result_image, output, swapped = operate(source_img,target_img,target_img_orig,model,source_faces_index,faces_index,source_faces,target_faces,gender_source,gender_target,source_face,wrong_gender,source_age,source_gender,output,swapped,mask_face,entire_mask_image,enhancement_options,detection_options)
File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 770, in operate
swapped_image = face_swapper.get(result, target_face, source_face)
TypeError: ArcFaceONNX.get() takes 3 positional arguments but 4 were given


Total progress: 13it [00:23, 1.80s/it]
Total progress: 13it [00:23, 1.57s/it]

if i reduce the detecton level 0.2:

100%|████████████████████████████████████████████████████████████████████████████████████| 18/18 [00:05<00:00, 3.20it/s]
[Unload] Trying to free 2892.66 MB for cuda:0 with 1 models keep loaded ... Current free memory is 8154.91 MB ... Done.s]
13:45:34 - ReActor - STATUS - Working: source face index [0], target face index [0]
13:45:34 - ReActor - STATUS - Using Hashed Source Face(s) Model...
13:45:34 - ReActor - STATUS - Analyzing Target Image...
13:45:35 - ReActor - STATUS - Detecting Source Face, Index = 0
13:45:35 - ReActor - STATUS - Detected: -42- y.o. Female
13:45:35 - ReActor - STATUS - Detecting Target Face, Index = 0
13:45:35 - ReActor - STATUS - Detected: -27- y.o. Female
13:45:35 - ReActor - STATUS - Swapping Source into Target
*** Error running postprocess_image: E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_faceswap.py
Traceback (most recent call last):
File "E:\WebUI_Forge\webui\modules\scripts.py", line 940, in postprocess_image
script.postprocess_image(p, pp, *script_args)
File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_faceswap.py", line 465, in postprocess_image
result, output, swapped = swap_face(
File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 616, in swap_face
result_image, output, swapped = operate(source_img,target_img,target_img_orig,model,source_faces_index,faces_index,source_faces,target_faces,gender_source,gender_target,source_face,wrong_gender,source_age,source_gender,output,swapped,mask_face,entire_mask_image,enhancement_options,detection_options)
File "E:\WebUI_Forge\webui\extensions\sd-webui-reactor\scripts\reactor_swapper.py", line 770, in operate
swapped_image = face_swapper.get(result, target_face, source_face)
TypeError: ArcFaceONNX.get() takes 3 positional arguments but 4 were given


Total progress: 100%|████████████████████████████████████████████████████████████████████| 18/18 [00:06<00:00, 2.69it/s]
Total progress: 100%|████████████████████████████████████████████████████████████████████| 18/18 [00:06<00:00, 3.42it/s]

>>>>_

if i change from
gfpgan_1.4.onnx
too
inswapper_128.onnx
all works fine
so where i change the model permanently, i can edit py

@tusharbhutt
Copy link
Author

I have managed to solve the issue for me.

I completely installed Forge from scratch, only keeping my "models" folder. I've been using a rather old install that I updated from the normal A1111 webui and that also didn't include the bundled python environment it does now. Something there was likely broken.

That's interestin, I downloaded Forge a few weeks ago can't recall if it was the all-in-one package or not. I'll have to reinstall as a last resort. Someone on Reddit said they solved the issue for Forge and FaceSwapLab, so maybe I'll check that out too.

https://www.reddit.com/r/StableDiffusion/comments/1fc29kd/faceswaplab_extension_in_forge_i_got_it_working/

@tusharbhutt
Copy link
Author

since weeks on web forge ui

on start is all ok 13:40:25 - ReActor - STATUS - Running v0.7.1-a2 on Device: CUDA

I can't even get it to load though.

@kalle07
Copy link

kalle07 commented Sep 9, 2024

i dont remember , possible i installed it by hand
webui\extensions\sd-webui-reactor
open cmd or admin cmd
and
pip install -r- requirements.txt

@KatD98
Copy link

KatD98 commented Sep 12, 2024

I've been suffering from the same error constantly. If i reinstall forge, it appears to work during that session, but once a new session begins, I get the ImportError: DLL load failed while importing onnx_cpp2py_export: A dynamic link library (DLL) initialization routine failed error again.

@tusharbhutt
Copy link
Author

I've been suffering from the same error constantly. If i reinstall forge, it appears to work during that session, but once a new session begins, I get the ImportError: DLL load failed while importing onnx_cpp2py_export: A dynamic link library (DLL) initialization routine failed error again.

Good to know, I was just about to reinstall. Seems to be a real bug affecting more than a few people

@KatD98
Copy link

KatD98 commented Sep 15, 2024

Whats now even more strange, is if I launch re-forge, it works in there, but not in forge. Exact same settings...

@kalle07
Copy link

kalle07 commented Sep 15, 2024

one hint ... try it at first with one face image ...
you may have to calculate the face mode option-again

@Gourieff Gourieff added 🔥 HOT and removed new labels Sep 15, 2024
@Gourieff
Copy link
Owner

@andypotato
Copy link

Forge uses CUDA 12.1 so you need to install an onnxruntime-gpu version that supports CUDA 12.1

If you are on Windows, you can try this:

Go to the forge installation directory and activate the venv

venv\bin\activate.bat

Install a supported onnxruntime-gpu version

pip install onnxruntime-gpu==1.18.0 --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/

Restart forge and see if it works now

@kalle07
Copy link

kalle07 commented Oct 5, 2024

for me dont work

f i change from
gfpgan_1.4.onnx
too
inswapper_128.onnx
all works fine
so where i change the model permanently, i can edit py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working 🔥 HOT
Projects
None yet
Development

No branches or pull requests

6 participants