提问人:Monisha Sellamuthu 提问时间:12/27/2022 最后编辑:Christoph RackwitzMonisha Sellamuthu 更新时间:2/27/2023 访问量:2458
rembg 抛出 RuntimeError: LoadLibrary failed: onnxruntime_providers_tensorrt.dll
rembg throws RuntimeError: LoadLibrary failed: onnxruntime_providers_tensorrt.dll
问:
我无法生成背景被删除的图像
from rembg import remove
from PIL import Image
input_path = "crop.jpeg"
output_path = 'crop1.png'
input = Image.open(input_path)
output = remove(input)
output.save(output_path)
我有错误如下: RuntimeError: D:\a_work\1\s\onnxruntime\core\session\provider_bridge_ort.cc:1069 onnxruntime::P roviderLibrary::Get [ONNXRuntimeError] : 1 : FAIL : LoadLibrary 尝试加载“C:\users\lib\site-packages\onnxruntime\capi\onnxruntime_providers_tensorrt.dll”时失败,出现错误 126 “”
答:
5赞
blacktheon
2/27/2023
#1
这是一个 onnxruntime 包问题。只需重新安装 onnxruntime 会有所帮助。
pip uninstall rembg //uninstall rembg
pip uninstall onnxruntime //uninstall onnxruntime
pip install rembg[gpu] onnxruntime-gpu //install rembg with GPU support
评论