Frequently Asked Questions

General

Where can I download the software?
If you are on Windows you can use the Windows Installer, which will set everything up for you. For other platforms check the installation instructions which have fairly detailed instructions for installing in most circumstances.
Top
Is there a usage guide?
Yes! At least for some parts of Faceswap. Unfortunately the code changes often and documentation takes time. However, a knowledge base is slowly building up in the forums, so you can check the stickies in the support forums. Also check the USAGE.md page of github. The search function in this forum and the Discord is also useful. We welcome contributions to the repo/fourm to expand documentation.
Top
But seriously. I've installed and I don't know what I'm doing!
  1. Read USEAGE.md
  2. Read the FAQs
  3. The process is really simple:
    • Run extract on source face (A)
    • Run extract on target face (B)
    • Train on generated faces from A + B
    • Convert from your source frames (A) Specifying the model you used
  4. Read USEAGE.md
Top
Why does Windows say my GPU is hardly being used?
By default, the Windows GPU usage reporting is highly inaccurate, and is tailored towards gaming rather than Machine Learning. If you want accurate usage statistics use nvidia-smi or modify the GPU setting in Task Manager to "CUDA usage". In addition, your CPU is used to prepare the data for the GPU. This includes getting the images into a format that the GPU can work with easily and quickly as well as any augmentation that you have selected. Depending on the options and the details of your system it's quite possible that your CPU may be in more use than your GPU. This is normal.
Top
How to Update Faceswap to the Latest Version
To update faceswap to the latest version, look under Tools button in the GUI, and select "Check for updates." The latest commit and any new dependencies will be installed. You may be prompted to re-start faceswap after the update.
Top
Can faceswap work on Mobile phones/Game consoles?
Unfortunately, faceswap uses the speed that only a GPU can sustain to train the AI used for swapping. Portable and low end devices cannot train or use faceswap. They're simply not powerful or fast enough.
Top

Installation

Where can I download the software?
If you are on Windows you can use the Windows Installer. which will set everything up for you. For other platforms check the installation instructions.
Top
I installed with the installer, but Faceswap won't launch
Faceswap has been installed successfully thousands of times across a wide array of OSes, so the problem is almost definitely with your system. The following should fix most issues:
  • Uninstall Conda: Add/Remove programs > python (Check for both MiniConda and AnaConda)
  • Uninstall any other Python installs you have on your system.
  • Go to your
    C:\users\<your username>
    folder and delete any files/folders with "conda" in the name
  • Go to your
     C:\users\<your username>\AppData\Roaming
    folder and delete any folders with "Python" in the name
  • Delete your Faceswap folder
  • Reboot
  • Re-run the faceswap installer
Top

Extract

What are alignments? Why are they important?
Alignments are 68 points that identify features on a face. They are important as they tell the training process how to build a face mask, and they tell the convert process where the swap on the original image should occur and how the face is lined up.
Top

Training

How many Images should I use?
Aim for between 500-5000 images per side. These should be of a high quality and contain a wide variety of angles, expressions and lighting conditions
Top
How long does it take to train a model?
This depends on many factors; the model used, the number of images, your GPU etc. However, a ballpark figure is 12-48 hours on GPU and weeks if training on CPU.
Top
What do loss values mean and how should I use them?
Loss values represent the success of the model in recreating A or B from the original input photos. These numbers are for internal use of the model but are exposed for "at a glance" use of them. It's important to mention that this is NOT measuring the swap at all and is ONLY measuring A-A or B-B. If you're training with a mask you may also see a mask loss, this again is just measuring the success of the model at recreating loss values. For viewing swap success the only reliable method is to watch the previews. Keep an eye out for good looking B faces in A images as this is the preferred direction of swap.
Top
Can I resume training?
Yes. FaceSwap auto-saves your model, so you can stop at any time. When you recommence training, just point FaceSwap at your existing model folder and it will carry on from where it left off.
Top
Can I add/remove data after I've started training?
Yes, this is fine. In fact it is often a good idea to refresh your data, to help prevent the model from overfitting. Make gradual changes rather than wholesale changes though. Make sure you have stopped training before adding or removing images. If you are training with a mask or "warp to landmarks" then you will need to merge any new images' alignments into the alignments file. You can see here for more information:
Top
Training crashes with an error like: Exception: Landmarks not found for hash: ' file: ''. What gives?
You are training with a mask or with "warp to landmarks" enabled. To do this you must have an alignments file for each of your facesets which includes all of the images within your training data.
Top
Why do my previews suddenly go a solid color, with the loss values spiking?
This is model corruption. It can happen for numerous reasons, but is fairly rare. One reason may be due to overclocking your GPU. DO NOT OVERCLOCK YOUR GPU. We cannot be clearer on this. Overclocking is meant to speed up 3D rendering, where errors are not too important. In Machine Learning errors can be absolutely catastrophic. Another reason may be exploding/vanishing gradients. This unfortunately happens sometimes. You can read more about why here. Fortunately Faceswap takes a backup every time the loss drops, so you can restore from this with the restore tool (Tools > Restore in the GUI, or `python tools.py restore -h` from the cli). Otherwise you can copy a snapshot to your main model folder and carry on training from there.
Top
Why does my model keep crashing for no discernible reason?
See the Overclock warning from the previous question
Top
Can I use AWS/Google Colab for training?
Yes, although none of these are directly supported by the developers. An existing FaceSwap notebook for Google Colab can be found here .
Top
In the analysis tab, what does EG/s mean?
Examples per second. This is basically the speed that faces are being processed through the model. Technically the true value is double the figure displayed, as it only displays the rate for one side.
Top
Why does it crash when I start training with a cryptic message that mentions OOM or CUDA_ERROR_OUT_OF_MEMORY?
OOM means Out Of Memory. It basically means that you do not have enough GPU memory to train the selected model at the selected settings. You can try a number of things. 1) Try Memory Saving Gradients and/or Optimizer Savings and/or Ping Pong Training. 2) Lower the batchsize (the amount of images fed into the model each iteration). 3) Use a more lightweight model, or select the model's "LowMem" option (in config) if it has one.
Top

Convert

Why do my faces look like they haven't changed?
Most likely you have trained your model the wrong way round. A should be the person who's face you want to remove and B should be the person who's face you want to place on A. All is not lost. You can select the -s, --swap-model switch that will perform the swap B>A rather than A>B. This works well on most models, but may work less well on 'unbalanced' type models.
Top
I've run conversion, but there is a distinct box around the swap area. What gives?
The default convert settings work for some swaps, not for others. They can be tweaked by editing the configuration file. The best way to tweak the settings to your liking is to use the preview tool, save the configuration, then run convert. See the pin in #convert-support for more information.
Top
Why is the swapped face in my converted video flickering/glitching?
This could be for a couple of reasons. The first is that you have used Seamless Clone. Don't use Seamless Clone. It's bad. The second reason is that you do not have a decent alignments file. You may not have generated an alignments file for your conversion at all. This is not good practice as the CPU based "on-the-fly" detector is poor, and should only be used for quick tests. Decent swaps require decent alignments. See this guide for more thorough details on creating a good alignments file.
Top