Practical overview
When it fits
Use Face2Face when a Python-based image or video pipeline needs face replacement, reusable face identities, face recognition or portrait restoration, or when those functions need to be exposed through a web API.
Who it is for
- Python developers integrating face swaps into image or video workflows.
- Teams that need named face embeddings for repeatable swaps or recognition-based face-pair workflows.
- Developers exploring a web API for face-swapping, recognition and restoration functions.
Documented uses
- Swap a face from one image onto another.
- Apply a saved, named face embedding to image or video media.
- Recognize faces and perform defined face-pair swaps.
- Enhance portrait image quality with face restoration.
- Process image sequences through a generator workflow.
Requirements & limits
The repository is public and identifies the project license as MIT. The README documents pip package options and a SocAIty SDK route; no price or account requirement is stated.
- The script-inference package and the full package have different scopes: the latter includes service functionality.
- Local use requires Python 3.7 or later and at least 5 GB of RAM; the README recommends a GPU with at least 8 GB of VRAM for fast inference, while noting CPU use is possible.
- The README says models download automatically.
- The README requires ffmpeg for video-file support in the web service.
- The SDK example is presented as requiring no GPU and avoiding local installation; the repository separately documents pip installation.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Run an image-to-image swap from a Python script
Install the script-inference package and use the documented Face2Face module method to swap a source image onto a target image.
Before you start
- Python 3.7 or higher.
- At least 5 GB of RAM.
- Install the package with pip using the script-inference option: socaity-face2face. A GPU is optional; the README recommends at least 8 GB of VRAM for faster inference.
Steps
Install the package with pip install socaity-face2face.
Import Face2Face from face2face and create an instance.
Call swap_img_to_img with the source-image path and target-image path.
Expected outcome
The documented call returns a swapped image from the supplied source and target image paths.
Guide limitations
- The README says models download automatically.
- CPU is supported, but a GPU with at least 8 GB of VRAM is recommended for fast inference.
- This package option is documented for inference from a script, not for running the service.
Save and reuse a named face embedding
Create a persistent named face embedding and use that name in a later image or video swap.
Before you start
- Python 3.7 or higher and at least 5 GB of RAM.
- Install the script-inference package and use the Face2Face module.
- A portrait image path for the face to embed, plus an image or video path for the later swap.
Steps
Create a Face2Face instance.
Call add_face with a name, portrait-image path and save=True.
Call swap with the media path and the saved face name.
Expected outcome
The README says a saved embedding can be reused with the same name after restarting the project.
Guide limitations
- The guide covers creating and reusing one named embedding; recognition-based face-pair swaps are a separate documented workflow.
- For web-service video-file support, ffmpeg is additionally required; the README does not state that requirement for this script workflow.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 8 October 2026
- Original website title
- SocAIty/face2face · Official homepage title · retained in its source language

