Gourieff / comfyui-reactor-node

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

CUDA AND CUDNN ERROR #427

Open JackR-67 opened 2 months ago

JackR-67 commented 2 months ago

First, confirm

What happened?

How can I solve this new REACTOR error? The error only occurs when running the reactor. So far everything has worked perfectly

Steps to reproduce the problem

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.

Sysinfo

Windows 10 ComfyUI

Relevant console log

# ComfyUI Error Report
## Error Details
- **Node Type:** ReActorFaceSwap
- **Exception Type:** RuntimeError
- **Exception Message:** 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.

## Stack Trace

  File "N:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 323, in execute
    output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "N:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 198, in get_output_data
    return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "N:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 169, in _map_node_over_list
    process_inputs(input_dict, i)

  File "N:\ComfyUI_windows_portable_nvidia\ComfyUI_windows_portable\ComfyUI\execution.py", line 158, in process_inputs
    results.append(getattr(obj, func)(**inputs))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Additional information

No response

Tenofas commented 2 months ago

Same here. I believe it's a problem with CUDA version, I updated Pytorch the other day and I guess it updated CUDA to 12.1.

markAking commented 2 months ago

I had the same issue. CUDA 12.4, The issue is onnxruntime. I update onnxruntime-gpu to 1.18.1 but you have to update onnxruntime also! so when I did pip uninstall onnxruntime pip install onnxruntime

it updated onnxruntime to 1.19.2. Works perfectly afterwords.

Tenofas commented 2 months ago

YES!!!! thanks a lot! It worked! So you have to update both onnxruntime-gpu AND onnxruntime !!!! Great hint, thank you!!!!!!!

JackR-67 commented 2 months ago

Thank you, works great !

Nojahhh commented 1 month ago

Just hade the same for issue for ReActor after uninstalling another node (deforum I think). The solution was to upgrade onnxruntime. In you ComfyUI folder run python_embeded\python -m pip install onnxruntime --upgrade

Tanglinling commented 1 month ago

pip uninstall onnxruntime

这个方法有效,非常感谢!This method works, thank you very much!