Practical overview
When it fits
Use Reswapper when you need repository-level code and weights for experimenting with an Inswapper-style face-swap model, rather than a hosted editing service.
Who it is for
- Developers exploring face-swapping inference or model training in Python.
- Researchers or practitioners comparing an Inswapper-style implementation with its reference outputs.
- Users who want to examine model inputs, pretrained weights, or ONNX export.
Documented uses
- Run the repository's documented face-swapping inference script.
- Train a face-swapping model using prepared target, source, and swapped-face images.
- Inspect the documented model inputs and compare example outputs.
- Save a trained checkpoint or export a model to ONNX.
Requirements & limits
The repository is public and specifies the AGPL-3.0 license. The documented setup uses Python, PyTorch, and GPU-enabled ONNX Runtime packages.
- The README documents a target input of 128 × 128 RGB pixels and a 512-value source latent derived using ArcFace.
- Training examples use FFHQ images and Inswapper-generated swapped-face examples.
- Pretrained checkpoints are listed in both 128- and 256-resolution variants, with PyTorch and ONNX formats among the listed files.
- The README identifies a face-alignment issue at resolutions other than 128 and describes an offset correction.
- The installation instructions specify GPU packages, including a CUDA 12.1 PyTorch index and GPU-enabled ONNX Runtime.
Check current requirements in the official documentation. Source-based guidance does not mean OpenViST has run or independently tested this project.
Set up the Reswapper Python environment
Install the repository and its documented Python and GPU runtime dependencies.
Before you start
- Git
- Python
- A CUDA 12.1-compatible PyTorch installation path, as specified in the README
Steps
Clone the repository and change into its directory.
Create a Python virtual environment and activate it.
Install dependencies from requirements.txt.
Install torch and torchvision from the documented CUDA 12.1 package index, then install onnxruntime-gpu using the documented extra index.
Expected outcome
The repository and its listed Python, PyTorch, and GPU ONNX Runtime dependencies are installed in the environment.
Guide limitations
- The README's activation command is written for Windows; it does not document activation commands for other shells.
- The instructions document dependency installation, not a successful inference run or hardware compatibility guarantee.
Prepare and run supervised model training
Follow the documented supervised training workflow to produce a Reswapper checkpoint.
Before you start
- A configured Python environment with repository dependencies installed
- FFHQ images for target and source data
- Inswapper outputs for swapped-face examples
Steps
Prepare the target and source images using FFHQ and create swapped-face examples using Inswapper output.
Optionally obtain pretrained weights and pass model_path into the training function in train.py.
Adjust train.py if needed, then run python train.py.
Use the saved reswapper-.pth checkpoint; the README also describes an ONNX export option.
Expected outcome
The documented workflow saves a PyTorch checkpoint and logs losses to TensorBoard; it can also export an ONNX model.
Guide limitations
- The README does not provide a complete dataset-preparation procedure or a specific inference-result guarantee.
- The training loss information is described as an area where details from Inswapper are not released; training choices may require modification.
Sources & review
Source record details
- Source availability
- Active
- Sources checked
- 28 November 2026
- Original website title
- somanchiu/ReSwapper · Official homepage title · retained in its source language

