KwaiVGI / LivePortrait

Bring portraits to life!
https://liveportrait.github.io
Other
12.98k stars 1.38k forks source link

Error When Running inference.py with CUDA 12.1 on Server #290

Open hunglsxx opened 3 months ago

hunglsxx commented 3 months ago

Hello, I followed the latest instructions when installing on a server using CUDA 12.1. However, when I run python inference.py, I encounter an error as shown in the image. Please help. I'm using Ubuntu 20

Screenshot 2024-08-06 at 10 38 39
zzzweakman commented 3 months ago

Hi @hunglsxx,

You can try the following commands:

pip uninstall onnxruntime-gpu
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/

hunglsxx commented 3 months ago

Hi @hunglsxx,

You can try the following commands:

pip uninstall onnxruntime-gpu
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/

@zzzweakman Thanks for your reply, but it's still not working.

liuxuyao commented 3 months ago

你好@hunglsxx,

您可以尝试以下命令:

pip uninstall onnxruntime-gpu
pip install onnxruntime-gpu --extra-index-url https://aiinfra.pkgs.visualstudio.com/PublicPackages/_packaging/onnxruntime-cuda-12/pypi/simple/

good

Misty1113 commented 1 month ago

The reason for this issue is that the versions of onnxruntime, CUDA, and CUDNN are incompatible. The solution is as follows: uninstall current onnxruntime, then check the appropriate onnxruntime version at the official link and reinstall it: https://onnxruntime.ai/docs/execution-providers/CUDA-ExecutionProvider.html#requirements

The instruction example is as follows:

pip uninstall onnxruntime-gpu
pip install onnxruntime==1.18.0

image