About this project

FaceSwap is an open-source Python application that uses deep learning to swap faces in photos and videos. It implements a multi-stage pipeline: extracting faces from source material, training a neural network model on paired face data, and converting target media with the trained model. The project supports both command-line and graphical interfaces. Installation requires a modern GPU with CUDA support for optimal performance; AMD GPUs are supported through ROCm on Linux. The workflow involves extracting faces from images into an extraction folder, training separate models for two face sources, and then applying the learned transformations to produce swapped output. Key features include multiple supported model architectures (Villain, Phaze-A, DFL-H128, Unbalanced, OHR), video conversion tools, face alignment with FAN and detection with MTCNN, and pre-trained model reuse to accelerate training. The project maintains an active community through Discord and a dedicated forum, with documentation available on ReadTheDocs. The developers emphasize ethical use, stating the tool is intended for learning, experimentation, social commentary, film production, and legitimate creative purposes.