Skip to content

xian0628/tungsten-faceswap-roop

 
 

Repository files navigation

Tungsten faceswap

Take a video and replace the face in it with a face of your choice. You only need one image of the desired face. No dataset, no training, no GPUs.

Prerequisites

Prepare video clips

Copy your video clips on the project root directory.
Then, update tungsten_model.py corresponding to your needs:

  1. Change FaceswapInput class - This class is for defining inputs.
  2. Change VIDEO_SEGMENTS variable - Change file names to your owns.
  3. Change REFERENCE_FRAME_NUMBERS variable - Change frame number containing the target face.

Build, push and run your model

Step 0: Install Requirements

First, install requirements:

pip install -r requirements.txt

Step 1. Prepare weights

Download weights:

./download_weights.sh

Step 2. Build model

tungsten build . faceswap:myversion

Step 3: Create a project on Tungsten

Go to tungsten.run and create a project.

Step 4: Push the model to Tungsten

Log in to Tungsten:

tungsten login

Add tag of the model:

tungsten tag faceswap:myversion <project_name>

Push the model to the project:

tungsten push <project_name>

Step 5: Run the model on Tungsten

Visit tungsten.run and go to the project page.

About

one-click face swap

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 99.9%
  • Shell 0.1%