Faceswap 3 open for testing

Discussions about research, Faceswapping and things that don't fit in the other categories here.

Post Reply
User avatar
Posts: 2717
Joined: Fri Jul 12, 2019 12:53 am
Answers: 159
Has thanked: 136 times
Been thanked: 633 times

Faceswap 3 open for testing

Post by torzdf »

Faceswap 3 is in Beta

Over the past few months I have been busy updating Faceswap to use Keras 3/PyTorch as its backend.

This is a major change, the reasons being that Tensorflow have made some baffling decisions of late that make it harder and harder to support going forward.

This has been a mammouth task, but ultimately, Faceswap will eventually switch over to this version at some point in the future, when all bugs are fixed and all features implemented.

Not yet implemented

In the meantime everything should work (including backwards compatibility) with the exception of:

  • Distributed training (this is on the roadmap to add prior to fully switching Faceswap over to PyTorch)
  • DirectML support. This may never be implemented, unless Keras 3 starts to support it. Ultimately, it is not possible to support this backend at present, so Windows users on AMD/Intel should stick with Faceswap 2

Implemented but untested

The following are implemented, but are untested until I receive feedback from users:

  • ROCm (AMD) support on Linux
  • Apple Silicon support

Testing required

I am now looking for testers to use the latest version so that I can fix bugs prior to mainlining this version of Faceswap. Be aware... there will be bugs, and I really need your help to report them, so that I can get this into a workable state.

New features

In addition to switching the backend to PyTorch, the following features have been added (amongs others):

  • More Optimizers (including LioN)
  • More configuration options for Optimizers (such as EMA, weight decay and Gradient Accumulation)
  • Vertical offset when training. This allows you to adjust the Y-offset of the face when training/converting. For example, if the target has a longer beard, you can adjust the y-offset to include more beard at the expense of forehead
  • New encoder for Phaze-A (ConvNeXt)


During testing there will be no installer for FS3, so please follow these instructions to install the FS3 beta:

Start > Anaconda prompt (for Windows. For Linux/macOS users, just open a standard Terminal)

Code: Select all

git clone https://github.com/deepfakes/faceswap.git fs3
cd fs3
git checkout fs3

conda create -n fs3 python=3.11
conda activate fs3

For Nvidia:

Code: Select all

python setup.py --installer --nvidia

For Apple Silicon:

Code: Select all

python setup.py --installer --apple-silicon

For ROCm:

Code: Select all

python setup.py --installer --rocm


Close the Terminal/Anaconda Prompt and re-open

Code: Select all

conda activate fs3
cd fs3
python faceswap.py gui

My word is final

Post Reply