MrDeepFakes Forums
  • New and improved dark forum theme!
  • Guests can now comment on videos on the tube.
   
Pocketspeed[GUIDE] FaceSwap - How To Get Started: Part One - Requirements and Installation
#1
[Image: uPxZhpw.png]

FaceSwap Tutorial: Installation and Requirements

Please note that the Faceswap python scripts are updated frequently. Because of this, material and information in this guide may become outdated quickly or suddenly.

Please read this guide thoroughly before beginning a DeepFake project. This will help with understanding the processes involved, and will alleviate the need for questions. There is also a Frequently Asked Questions section at the end of this guide. Please make sure you have read all the entire guide thoroughly before asking for support in this thread. Many questions/issues can be answered or resolved by simply following the directions.

If you prefer a downloadable version of this guide, you can get both a Word document version and a PDF version. The download is a 7-Zip file and will need to be extracted. The link for the downloadable version is here:  You are not allowed to view links. Register or Login to view.

REQUIREMENTS

UPDATE JUNE 25, 2019: AMD Graphics Cards are now partially supported using PlaidML. Read the INSTALL.md for more details at You are not allowed to view links. Register or Login to view.

There are specific hardware requirements for Faceswap, and these must be met. If these requirements are not met, there is no guarantee that you will be able to use Faceswap. These requirements are as follows:
  • A modern powerful CPU that supports AVX and AVX2. A desktop or server CPU is preferred. Laptop CPUs may be able to run the software, but this will vary from system to system.
  • An nVidia graphics card (GPU) that supports a CUDA Compute Capability of 3.5 or higher, and also supports CUDA Version 9.0. Desktop cards later than the 7xx series are likely candidates. Usually, any card under 4 Gb of VRAM will not work, or not work well. Cards with 6 Gb of VRAM or more are preferred. Some models in Faceswap require even 10+ Gb of VRAM, but these are optional. Currently, only nVidia cards can be used with Faceswap. This is a restriction of Tensorflow. PlaidML and OpenCL are not implemented at this time.
  • A fair amount of available hard drive space. This will vary from project to project, as the drive space is used for videos, images, face extractions, etc. A reasonable estimate is 50 to 100 Gb of available hard drive space.
  • At least 8 Gb of RAM.
  • Time and patience on your part. Creating a Deepfake video clip with Faceswap can take many hours, sometimes even a few days.
  • A 64-bit Operating System. Windows 10 and Linux are the two best candidates. Windows 8 and 7 might work. MacOS is limited due to lack of drivers/libraries from nVidia.
Windows 10 will reserve approximately 20% of your VRAM for system usage, which will decrease your performance when using Faceswap. There is no fix or workaround for this. However, Windows 10 will work fine. The majority of users have Windows 10.

Knowledge of the command line is helpful. But Faceswap has a GUI which will allow you to execute all the commands necessary to create DeepFakes. I highly recommend using the GUI, as it makes command execution a bit more intuitive. You will need to use the command line to a small degree in any case, however. These commands will be explained in this guide, where appropriate.

INSTALLATION

Faceswap has an installer for Windows which installs everything for you, and also creates a desktop shortcut to launch straight into the GUI. This is a 64-bit Windows installer only.

You can download the installer from: You are not allowed to view links. Register or Login to view.

If you are not using Windows, or choose to install manually, you can follow manual installation instructions from You are not allowed to view links. Register or Login to view.

If choosing manual installation, please make sure you read everything carefully, and follow the directions precisely. 99% of installation problems can be corrected by meeting the hardware requirements, and following the installation instructions exactly.

Support for the new RTX 20xx Series of nVidia Cards is extremely limited at this time. If you have one of these cards, be prepared that you may have issues/errors that are currently unable to be resolved.

After installation, you may check to see if the GUI is working. Either double-click the desktop shortcut, or activate the virtual environment and from the Anaconda command line type: python faceswap.py gui. Either way, after a few moments you should see the GUI open up. See image below.

[Image: irSwLPW.jpg]

UDATING FACESWAP

Faceswap is frequently updated. There are times when Faceswap is updated multiple times in a day. There are currently two methods of updating Faceswap:
  • Double-click your desktop shortcut for Faceswap. If you prefer to use the Anaconda command line, enter your virtual environment according to the directions in the INSTALL.md.
  • If using the command line, once you have activated the virtual environment, type the following: python faceswap.py gui. If you are double-clicking the desktop shortcut, you can skip this step.
  • The Faceswap GUI should open momentarily. Once it does, you should see a tab at the top of the GUI named “Tools”. Click the Tools tab.
  • There should be an option for “Check For Updates”. Select Check For Updates.
  • Follow the instructions from the GUI.
Alternatively, you can choose to use the Anaconda command line to update Faceswap. You can do this by:
  • Activating the virtual environment according to the directions in the INSTALL.md.
  • Once in your virtual environment, type the following in the Anaconda command line: git pull –all, then press Enter.
  • Give it a moment to update.
  • If Faceswap was updated, then check to insure that all the necessary requirements are met. Do this by typing the following in the Anaconda command line: pip install –upgrade -r requirements.txt.
  • If you are asked to upgrade Pip, you may ignore that message.
Faceswap should now be updated.

USING FACESWAP

When using Faceswap to create DeepFakes, there are 3 primary processes that you will need to complete. These are Extraction (Getting The Data Ready For Training), Training (Training The Data), and Conversion (Converting The Trained Data To Create The DeepFake). Keep in mind that you MUST meet the hardware requirements for Faceswap, and you MUST have followed the installation directions exactly. If you have not done either (or both) of these, then you will probably not be able to proceed further. You will get error messages, and support will be limited or non-existent.

For a better understanding of Deep Learning, what it is, and how it works, please watch these videos:
  1. You are not allowed to view links. Register or Login to view.
  2. You are not allowed to view links. Register or Login to view.
If you use the GUI, most of the checkboxes or drop-down menus have tooltips enabled. Just hover over the checkbox or menu for more information about the option in question. Don't forget to check the File, Edit, and Tool tabs at the top left of the GUI.


Part Two: You are not allowed to view links. Register or Login to view.
#2
Any users have experience with both this and DFL? Was thinking of switching back since I'm having trouble with the new DFL models and conversions.
#3
What's the primary difference between FaceSwap and DeepFaceLab? FaceSwap being more recent and having an UI made me choose it. But is there anything else one should know?
#4
Faceswap is not necessarily more recent. Both applications are continually being updated. Sometimes, one will be a little ahead of the other. The two applications are being developed by two different dev teams. This means that development focus is slightly different, as they are approaching the subject from different perspectives. Faceswap generally has a focus of SFW application and a more academic approach. DeepFaceLab has no issue with NSFW (though it is not focused on that) and a more real-world application approach. Both will work well for the regular user. The models between applications are not interchangeable. FS has a GUI; DFL has a no-install bat file structure. System requirements for DFL are less strict than those for FS. DFL supports non-nVidia GPUs; FS does not. DFL also supports the new 20xx series of nVidia cards; FS can use the 20xx series, but there is no official support at this time. Most users at MrDeepFakes use DFL, so support in these forums is very strong. Very few users at MrDeepFakes use FS, so support is much lower. DFL is currently very far ahead in dealing with face obstructions. FS is working on face obstructions, but nothing has been released yet. Overall, DFL is generally considered to be easier for new users. In my opinion, FS tends to be buggier as well.

Overall, the take-aways should be this:
1. FS is better used with higher end, nVidia graphics cards.
2. DFL requires zero installation of packages or other software. (FS does have an installer for Windows, but it will still install other programs on your PC.)
3. On this site, DFL has much much more support.
4. FS has a decent GUI.
5. FS has a lot more model options. But this sometimes makes it difficult for new users, because there are a tremendous amount of settings and variables to account for.
6. DFL is currently vastly superior (at least for now) when dealing with obstructed or obscured faces.
7. FS has a team of devs, which can sometimes lead to more bugs. DFL has one dev, so everything is very consistent and compatible.
8. The FS dev team will absolutely not acknowledge any NSFW. The DFL dev has no issues with NSFW.

Even though I'm a FS guy, I still recommend DFL for new users. This is simply because of the amount of support here, the system requirements, and the NSFW issues. At the end of the day, it's like Coca-Cola versus Pepsi: it all comes down to your personal preference.
#5
Update: Faceswap now partially supports AMD Graphics Cards with the use of PlaidML. You can find more information on the Faceswap Github page, under the INSTALL.md, here:

You are not allowed to view links. Register or Login to view.
#6
Faceswap guys give good support over on Discord.
#7
(06-27-2019, 02:07 PM)bronskimac Wrote: You are not allowed to view links. Register or Login to view.Faceswap guys give good support over on Discord.

They do, but just so everyone knows, they are strictly SFW.

Forum Jump:

Users browsing this thread: 1 Guest(s)