GPU can work when program are started in anaconda(environments-faceswap-open terminal-python faceswap.py gui).
But if I start the program by desktop shortcut(%USERPROFILE%\Anaconda3\envs\faceswap\python.exe %USERPROFILE%/faceswap/faceswap.py gui), the usage rate of GPU flash is 0 and the usage rate of CPU is very high.
I don't know why.
GPU don't work when program aren't started in anaconda
Read the FAQs and search the forum before posting a new topic.
This forum is for reporting errors with the Training process. If you want to get tips, or better understand the Training process, then you should look in the Training Discussion forum.
Please mark any answers that fixed your problems so others can find the solutions.
GPU don't work when program aren't started in anaconda
The reason is that the Conda environment needs to be activated. Just referencing the correct python library is not enough.
When the Conda environment is activated, some other actions are also executed, which means that Faceswap can find the Cuda/cuDNN libraries stored within the environment.
If you change your shortcut to :
Code: Select all
%USERPROFILE%\Anaconda3\scripts\activate.bat && conda activate faceswap && python %USERPROFILE%/faceswap/faceswap.py gui
it should work
Re: GPU don't work when program aren't started in anaconda
The reason is that the Conda environment needs to be activated. Just referencing the correct python library is not enough.
When the Conda environment is activated, some other actions are also executed, which means that Faceswap can find the Cuda/cuDNN libraries stored within the environment.
If you change your shortcut to :
Code: Select all
%USERPROFILE%\Anaconda3\scripts\activate.bat && conda activate faceswap && python %USERPROFILE%/faceswap/faceswap.py gui
it should work
My word is final