Open HG4554 opened 2 years ago
I'm trying to think of the use-case for this... it may be that the documentation needs to be updated. I haven't tested the above, but then I have never attempted to run faceswap from outside of the Conda environment.
It probably helps that I wrote the setup script, so know that it adds LD_LIBRARY_PATH
to the activate script:
https://github.com/deepfakes/faceswap/blob/ee25a31d33d6e443d519e6459de8adb78616a5bd/setup.py#L345
Ultimately, I'm surprised that just executing the python binary worked in the past, as the Conda Env holds more than just a python virtual environment (required Cuda/cuDNN binaries and the like).
Generating the cli arguments from the GUI is just a convenience function. Adapting it to test for Conda environments and the like is most likely a bit out of scope.
I'm not sure if it's the same as the Docker issue (I do not use Docker), as theoretically Docker has it's own globally installed Cuda/cuDNN which should be being utilized.
Describe the bug FaceSwap GUI generates CLI commands that cannot utilize the GPU due to Tensorflow dependency errors. The Conda env has to be "activated" for all dependencies to load correctly, it is no longer sufficient to directly invoke Python by it's path in the Faceswap env. This did work in the past.
I believe this is the underlying cause of other issues like #1244, hat tip to Replican for posting the solution in the forum.
To Reproduce Steps to reproduce the behavior:
Expected behavior If GPU works in GUI, it should work in CLI.
Desktop (please complete the following information):
Additional context
This is the current invocation that fails to use GPU:
This invocation activates the Conda env first, then runs the same CLI command which does utilize the GPU: