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 FACESWAP ISSUE -CUDA ERROR #411

Closed
3 tasks done
Suka4GitHub opened this issue Apr 1, 2024 · 4 comments
Closed
3 tasks done

REACTOR FACESWAP ISSUE -CUDA ERROR #411

Suka4GitHub opened this issue Apr 1, 2024 · 4 comments
Labels
bug Something isn't working ⛔ dependencies conflict

Comments

@Suka4GitHub
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?

Error occurred when executing ReActorFaceSwap:
I have researched all github info to problem. Reactor worked previously with no problem. Prior to problem I had previously installed ROOP at some point and then uninstalled it thinking a conflict.

Steps to reproduce the problem

  1. Install latest Reactorfaceswap....
  2. Select image and face to swap....
  3. .Get error
    4.i have installed CUDA 11.8 and 12.2 C:\Program Files\NVIDIA GPU Computing Toolkit\CUDA
  4. I have Comfy portable installed on D: drive

Sysinfo

Windows 11. OS AMD Ryzen 7 4800H with Radeon Graphics, 2901 Mhz, 8 Core(s), 16 Logical Processor(s)
Comfy UI Latest build

Relevant console log

Error occurred when executing ReActorFaceSwap:

D:\a\_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:636 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasn't able to be loaded. Please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.


File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\nodes.py", line 244, in execute
script.process(
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\scripts\reactor_faceswap.py", line 86, in process
result = swap_face(
^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\scripts\reactor_swapper.py", line 199, in swap_face
source_faces = analyze_faces(source_img)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\scripts\reactor_swapper.py", line 118, in analyze_faces
face_analyser = copy.deepcopy(getAnalysisModel())
^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\scripts\reactor_swapper.py", line 69, in getAnalysisModel
ANALYSIS_MODEL = insightface.app.FaceAnalysis(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\reactor_log_patch.py", line 48, in patched_faceanalysis_init
model = model_zoo.get_model(onnx_file, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 96, in get_model
model = router.get_model(providers=providers, provider_options=provider_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\reactor_log_patch.py", line 21, in patched_get_model
session = PickableInferenceSession(self.onnx_file, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 25, in __init__
super().__init__(model_path, **kwargs)
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 394, in __init__
raise fallback_error from e
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 389, in __init__
self._create_inference_session(self._fallback_providers, None)
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 435, in _create_inference_session
sess.initialize_session(providers, provider_options, disabled_optimizers)

Close

Additional information

No response

@Suka4GitHub Suka4GitHub added bug Something isn't working new labels Apr 1, 2024
@Suka4GitHub
Copy link
Author

GPU error log

To see the GUI go to: http://127.0.0.1:8188
To see the GUI go to: https://127.0.0.1:8189
FETCH DATA from: D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Manager\extension-node-map.json
Error: OpenAI API key is invalid OpenAI features wont work for you
QualityOfLifeSuit_Omar92::NSP ready
#read_workflow_json_files_all D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-mixlab-nodes\app
got prompt
[rgthree] Using rgthree's optimized recursive execution.
[rgthree] First run patching recursive_output_delete_if_changed and recursive_will_execute.
[rgthree] Note: If execution seems broken due to forward ComfyUI changes, you can disable the optimization from rgthree settings in ComfyUI.
[ReActor] 22:10:42 - STATUS - Working: source face index [0], target face index [0]
[ReActor] 22:10:42 - STATUS - Analyzing Source Image...
2024-04-01 22:10:45.5776032 [E:onnxruntime:Default, provider_bridge_ort.cc:1351 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1131 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

EP Error D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:636 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasn't able to be loaded. Please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.
when using ['CUDAExecutionProvider']
Falling back to ['CUDAExecutionProvider', 'CPUExecutionProvider'] and retrying.
2024-04-01 22:10:45.6903795 [E:onnxruntime:Default, provider_bridge_ort.cc:1351 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1131 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 "" when trying to load "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll"

!!! Exception during processing !!!
Traceback (most recent call last):
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 383, in init
self._create_inference_session(providers, provider_options, disabled_optimizers)
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 435, in _create_inference_session
sess.initialize_session(providers, provider_options, disabled_optimizers)
RuntimeError: D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:636 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasn't able to be loaded. Please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\nodes.py", line 244, in execute
script.process(
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\scripts\reactor_faceswap.py", line 86, in process
result = swap_face(
^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\scripts\reactor_swapper.py", line 199, in swap_face
source_faces = analyze_faces(source_img)
^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\scripts\reactor_swapper.py", line 118, in analyze_faces
face_analyser = copy.deepcopy(getAnalysisModel())
^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\scripts\reactor_swapper.py", line 69, in getAnalysisModel
ANALYSIS_MODEL = insightface.app.FaceAnalysis(
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\reactor_log_patch.py", line 48, in patched_faceanalysis_init
model = model_zoo.get_model(onnx_file, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 96, in get_model
model = router.get_model(providers=providers, provider_options=provider_options)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-reactor-node\reactor_log_patch.py", line 21, in patched_get_model
session = PickableInferenceSession(self.onnx_file, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\insightface\model_zoo\model_zoo.py", line 25, in init
super().init(model_path, **kwargs)
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 394, in init
raise fallback_error from e
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 389, in init
self._create_inference_session(self._fallback_providers, None)
File "D:\COMFY UI 3mar24\ComfyUI_windows_portable\python_embeded\Lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 435, in _create_inference_session
sess.initialize_session(providers, provider_options, disabled_optimizers)
RuntimeError: D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:636 onnxruntime::python::CreateExecutionProviderInstance CUDA_PATH is set but CUDA wasn't able to be loaded. Please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements), make sure they're in the PATH, and that your GPU is supported.

Prompt executed in 3.91 seconds

@Gourieff
Copy link
Owner

Gourieff commented Apr 5, 2024

...Please install the correct version of CUDA and cuDNN as mentioned in the GPU requirements page (https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements)...

If you use Cuda12 inside ComfyUI - you should uninstall current version of ORT-GPU and install the version for CU12 as described here: https://onnxruntime.ai/docs/install/#install-onnx-runtime-gpu-cuda-12x

And don't forget to do it via "python.exe" inside the "python_embeded" folder

@westNeighbor
Copy link

You have 2 CUDA versions and both are in the PATH, remove one PATH (only keep one version CUDA in the PATH) should solve your problem.

@Suka4GitHub
Copy link
Author

Thank you very much! Appreciate the excellent feedback! worked perfectly!! Much gratitude for sharing your expertise! :-)

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

No branches or pull requests

3 participants