Jcd1230 / rembg-comfyui-node

Rembg Background Removal node for ComfyUI
124 stars 14 forks source link

could I run it in cuda12.1 #4

Open zhangp365 opened 6 months ago

zhangp365 commented 6 months ago

When I run the Image Rembg(Remove Background), there is a exception:

Error occurred when executing Image Rembg (Remove Background):

D:\a\_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:743 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:\stable_diffusion\ComfyUI\execution.py", line 153, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\stable_diffusion\ComfyUI\execution.py", line 83, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\stable_diffusion\ComfyUI\execution.py", line 76, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\stable_diffusion\ComfyUI\custom_nodes\was-node-suite-comfyui\WAS_Node_Suite.py", line 5812, in image_rembg
session=new_session(model),
File "D:\python\python3.10\lib\site-packages\rembg\session_factory.py", line 44, in new_session
return session_class(model_name, sess_opts, providers, *args, **kwargs)
File "D:\python\python3.10\lib\site-packages\rembg\sessions\base.py", line 34, in __init__
self.inner_session = ort.InferenceSession(
File "D:\python\python3.10\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 430, in __init__
raise fallback_error from e
File "D:\python\python3.10\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 425, in __init__
self._create_inference_session(self._fallback_providers, None)
File "D:\python\python3.10\lib\site-packages\onnxruntime\capi\onnxruntime_inference_collection.py", line 463, in _create_inference_session
sess.initialize_session(providers, provider_options, disabled_optimizers)

I have checked the cuda and cuDNN path is correct. I also find this URL, which tells the onnx_runtime only supports cuda 11.8. Could I run this node in cuda 12.1? Does someone have this experience, Thank you.