hacksider / Deep-Live-Cam

real time face swap and one-click video deepfake with only a single image
GNU Affero General Public License v3.0
34.94k stars 4.93k forks source link

Why I can't use the CUDA when I use this command: python run.py --execution-provider cuda #466

Open viper3-2021-lol-champion opened 2 weeks ago

viper3-2021-lol-champion commented 2 weeks ago

屏幕截图 2024-08-26 214039 屏幕截图 2024-08-26 214113 屏幕截图 2024-08-26 214141 My CUDA version is 11.8, and the cuDNN version is 8.5. When I installed CUDA and cuDNN, I tested them and found no issues. The tests included running the commands: set cuda, "deviceQuery.exe", and "bandwidthTest.exe". What's even stranger is that I could use CUDA around noon, but after I re-downloaded the two installation packages, I could no longer use CUDA. (Windows 11)

hacksider commented 2 weeks ago

did you also do this? image

viper3-2021-lol-champion commented 2 weeks ago

In fact, when I uninstall onnxruntime, there will be a new error 屏幕截图 2024-08-26 221910

hacksider commented 2 weeks ago

Did you follow the full instruction? You have to do the next command as well which is to install the onnxruntime-gpu==1.16.3

viper3-2021-lol-champion commented 2 weeks ago

In my third image, you can see that I have installed onnxruntime-gpu 1.16.3. In fact, before our conversation, I had already installed both onnxruntime 1.18 and onnxruntime-gpu 1.16.3 in the library. After our first discussion, I uninstalled onnxruntime 1.18 and ran the program again, which resulted in an error. I have provided a screenshot of the error." 屏幕截图 2024-08-26 232535 This photo is a screenshot of the packages that are currently installed in my virtual environment

viper3-2021-lol-champion commented 2 weeks ago

Just ran it again and encountered the same error: AttributeError: module 'onnxruntime' has no attribute 'InferenceSession'

reahari commented 2 weeks ago

Did you follow the full instruction? You have to do the next command as well which is to install the onnxruntime-gpu==1.16.3

I tried to run this on Ubuntu 24.04 (python 3.12.3) and it can't be found:

ERROR: Could not find a version that satisfies the requirement onnxruntime-gpu==1.16.3 (from versions: 1.17.0, 1.17.1, 1.18.0, 1.18.1, 1.19.0)
ERROR: No matching distribution found for onnxruntime-gpu==1.16.3
hacksider commented 2 weeks ago

Please check the recommended version of python on the readme ☺️