OpenViSTAI · Agents · Blockchain · Crypto
Menu
Image & Video AI

Reswapper

Reswapper is a Python repository that aims to reproduce Inswapper, providing code for face-swapping inference and training alongside pretrained weights. Its README documents target-image and source-face latent inputs, example output comparisons, and workflows for supervised training and model export.

Independent OpenViST project profile, based on linked sources.

Reswapper — OpenViST project profile in Image & Video AI.
OpenViST project illustration. See the linked sources for product details.
Understand the project

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.
Before you choose

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.

Source-based practical guide

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

  1. Clone the repository and change into its directory.

  2. Create a Python virtual environment and activate it.

  3. Install dependencies from requirements.txt.

  4. 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.
Source-based practical guide

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

  1. Prepare the target and source images using FFHQ and create swapped-face examples using Inswapper output.

  2. Optionally obtain pretrained weights and pass model_path into the training function in train.py.

  3. Adjust train.py if needed, then run python train.py.

  4. 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.
Evidence and transparency

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