Page 1 of 1

RTX Tensor Cores in Faceswap

Posted: Sun Jan 26, 2020 7:56 pm
by itsmeahah

Hello !

I just wondered, is this possible that we get one day the possibility to use the tensor cores of the RTX cards into faceswap ?

If yes, what are the benefits (better training speed ?, accuracy ?) and / or the disadvantages ?

If not, can you explain me why ?

Thank you in advance for your answers !


Re: RTX Tensor Cores in Faceswap

Posted: Sun Jan 26, 2020 8:00 pm
by bryanlyon

Tensorcore support is on our list of future enhancements. However, in order to add tensorcore support we need to replace a good chunk of code. Part of the problem is that the version of Keras we use does not support Tensorcores, but we can't change to the newer version without removing AMD support. That's not really a great option, so we will have to build some sort of abstraction layer to avoid removing support for our AMD users.

The advantage of tensorcores is a good speed increase, but it will actually lose some accuracy/fidelity (though this can be mitigated somewhat).


Re: RTX Tensor Cores in Faceswap

Posted: Tue Jan 28, 2020 5:41 pm
by itsmeahah
bryanlyon wrote: Sun Jan 26, 2020 8:00 pm

Tensorcore support is on our list of future enhancements. However, in order to add tensorcore support we need to replace a good chunk of code. Part of the problem is that the version of Keras we use does not support Tensorcores, but we can't change to the newer version without removing AMD support. That's not really a great option, so we will have to build some sort of abstraction layer to avoid removing support for our AMD users.

The advantage of tensorcores is a good speed increase, but it will actually lose some accuracy/fidelity (though this can be mitigated somewhat).

Okay, understood!
Thanks a lot for your answer !


Re: RTX Tensor Cores in Faceswap

Posted: Tue Feb 02, 2021 10:53 am
by tokafondo
bryanlyon wrote: Sun Jan 26, 2020 8:00 pm

Tensorcore support is on our list of future enhancements. However, in order to add tensorcore support we need to replace a good chunk of code. Part of the problem is that the version of Keras we use does not support Tensorcores, but we can't change to the newer version without removing AMD support. That's not really a great option, so we will have to build some sort of abstraction layer to avoid removing support for our AMD users.

The advantage of tensorcores is a good speed increase, but it will actually lose some accuracy/fidelity (though this can be mitigated somewhat).

Is there any build of keras that would automagically add support for tensor cores while maintaining the same version you are using? Something like...

Code: Select all

if hardware.tensor.cores=1
  use tensor cores
else
  use cpu
endif

* not a real pice of code, obviously...


Re: RTX Tensor Cores in Faceswap

Posted: Tue Feb 02, 2021 7:28 pm
by bryanlyon

We've supported Tensorcores since FS v2. It was not automatic at all and required a lot of manual work (thanks Torzdf!).

The previous post in this thread was literally a year ago. Please don't Necro threads as the information in them is very out of date.