报错:
2024-03-16 04:16:59.4413827 [E:onnxruntime:Default, provider_bridge_ort.cc:1534 onnxruntime::TryGetProviderInfo_TensorRT] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 126 “” when trying to load “e:\anaconda3\envs\dreamgaussian\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll”
*************** EP Error ***************
EP Error D:\a_work\1\s\onnxruntime\python\onnxruntime_pybind_state.cc:456 onnxruntime::python::RegisterTensorRTPluginsAsCustomOps Please install TensorRT libraries as mentioned in the GPU requirements page, make sure they’re in the PATH or LD_LIBRARY_PATH, and that your GPU is supported.
when using [‘TensorrtExecutionProvider’, ‘CUDAExecutionProvider’, ‘CPUExecutionProvider’]
Falling back to [‘CUDAExecutionProvider’, ‘CPUExecutionProvider’] and retrying.
2024-03-16 04:16:59.5718575 [E:onnxruntime:Default, provider_bridge_ort.cc:1548 onnxruntime::TryGetProviderInfo_CUDA] D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1209 onnxruntime::ProviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary failed with error 127 “” when trying to load “e:\anaconda3\envs\dreamgaussian\Lib\site-packages\onnxruntime\capi\onnxruntime_providers_cuda.dll”
Backend TkAgg is interactive backend. Turning interactive mode on.
解决方案:
卸载onnxruntime-gpu
pip uninstall onnxruntime-gpu
卸载onnxruntime
pip uninstall onnxruntime
卸载rembg
pip uninstall rembg
重装onnxruntime
pip install onnxruntime==1.17.1
重装rembg
pip install rembg
不知道为什么,这样就好了。相当于不用gpu了,就用cpu。其实如果用rembg抠图的话,cpu和gpu速度差不多,没什么影响。