MrDeepFakes Forums

Some content may not be available to Guests. Consider registering an account to enjoy unrestricted access to guides, support and tools

  • We are looking for community members who are intested in helping out. See our HELP WANTED post.

[GUIDE] FaceSwap - How To Get Started: Part One - Requirements and Installation

Pocketspeed

DF Admirer
Verified Video Creator
[img=1222x720]

[font=Tahoma, sans-serif]FaceSwap Tutorial: Installation and Requirements[/font]

[font=Tahoma, sans-serif]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.[/font]

[font=Tahoma, sans-serif]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.[/font]

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:  https://mega.nz/#!iGwmyAIT!W_qqbFQwtLR0QXOb_efSquWDCfn8CpMCztxKKksqD6Q

[font=Tahoma, sans-serif]REQUIREMENTS[/font]

UPDATE JUNE 25, 2019: AMD Graphics Cards are now partially supported using PlaidML. Read the INSTALL.md for more details at https://github.com/deepfakes/faceswap/blob/master/INSTALL.md

[font=Tahoma, sans-serif]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:[/font]
  • [font=Tahoma, sans-serif]A modern powerful CPU that supports AVX and AVX2. A desktop or server CPU is preferred. Laptop CPUs [/font][font=Tahoma, sans-serif]may[/font][font=Tahoma, sans-serif] be able to run the software, but this will vary from system to system.[/font]
  • [font=Tahoma, sans-serif]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.[/font]
  • [font=Tahoma, sans-serif]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.[/font]
  • [font=Tahoma, sans-serif]At least 8 Gb of RAM.[/font]
  • [font=Tahoma, sans-serif]Time and patience on your part. Creating a Deepfake video clip with Faceswap can take many hours, sometimes even a few days.[/font]
  • [font=Tahoma, sans-serif]A 64-bit Operating System. Windows 10 and Linux are the two best candidates. Windows 8 and 7 [/font][font=Tahoma, sans-serif]might [/font][font=Tahoma, sans-serif]work. MacOS is limited due to lack of drivers/libraries from nVidia.[/font]
[font=Tahoma, sans-serif]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.[/font]

[font=Tahoma, sans-serif]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 [/font][font=Tahoma, sans-serif]will[/font][font=Tahoma, sans-serif] need to use the command line to a small degree in any case, however. These commands will be explained in this guide, where appropriate.[/font]

[font=Tahoma, sans-serif]INSTALLATION[/font]

[font=Tahoma, sans-serif]Faceswap has an installer for Windows which installs everything for you, and also creates a desktop shortcut to launch straight into the GUI. [/font][font=Tahoma, sans-serif]This is a 64-bit Windows installer only.[/font]

[font=Tahoma, sans-serif]You can download the installer from: https://github.com/deepfakes/faceswap/releases[/font]

[font=Tahoma, sans-serif]If you are not using Windows, or choose to install manually, you can follow manual installation instructions from https://github.com/deepfakes/faceswap/blob/master/INSTALL.md[/font]

[font=Tahoma, sans-serif]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.[/font]

[font=Tahoma, sans-serif]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.[/font]

[font=Tahoma, sans-serif]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.[/font]

[img=1222x720]

[font=Tahoma, sans-serif]UDATING FACESWAP[/font]

[font=Tahoma, sans-serif]Faceswap is frequently updated. There are times when Faceswap is updated multiple times in a day. There are currently two methods of updating Faceswap:[/font]
  • [font=Tahoma, sans-serif]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.[/font]
  • [font=Tahoma, sans-serif]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.[/font]
  • [font=Tahoma, sans-serif]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.[/font]
  • [font=Tahoma, sans-serif]There should be an option for “Check For Updates”. Select Check For Updates.[/font]
  • [font=Tahoma, sans-serif]Follow the instructions from the GUI.[/font]
[font=Tahoma, sans-serif]Alternatively, you can choose to use the Anaconda command line to update Faceswap. You can do this by:[/font]
  • [font=Tahoma, sans-serif]Activating the virtual environment according to the directions in the INSTALL.md.[/font]
  • [font=Tahoma, sans-serif]Once in your virtual environment, type the following in the Anaconda command line: git pull –all, then press Enter.[/font]
  • [font=Tahoma, sans-serif]Give it a moment to update.[/font]
  • [font=Tahoma, sans-serif]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.[/font]
  • [font=Tahoma, sans-serif]If you are asked to upgrade Pip, you may ignore that message.[/font]
[font=Tahoma, sans-serif]Faceswap should now be updated.[/font]

[font=Tahoma, sans-serif]USING FACESWAP[/font]

[font=Tahoma, sans-serif]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.[/font]

[font=Tahoma, sans-serif]For a better understanding of Deep Learning, what it is, and how it works, please watch these videos:[/font]
  1. [font=Tahoma, sans-serif][/font]
  2. [font=Tahoma, sans-serif][/font]
[font=Tahoma, sans-serif]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.[/font]


[font=Tahoma, sans-serif]Part Two: Extraction and Training[/font]
 

frosty3907

DF Admirer
Verified Video Creator
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.
 

appass

DF Vagrant
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?
 

Pocketspeed

DF Admirer
Verified Video Creator
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.
 

gerardtolket

DF Vagrant
Hello! I am looking to buy a AMD Radeon RX 570 card. I realize this isn't the best, but times are tough. Would anyone give me an idea of how long it might take me to render a 5 min video with this card? Thank you!
 

jacksonova

DF Pleb
Verified Video Creator
gerardtolket said:
Hello! I am looking to buy a AMD Radeon RX 570 card. I realize this isn't the best, but times are tough. Would anyone give me an idea of how long it might take me to render a 5 min video with this card? Thank you!

Please review the forum rules regarding posting questions of this nature to help you find the appropriate place to post your question, it will help you find the answer you're looking for. Thanks!
 
Top