
Please register for RunPod at: https://runpod.io?ref=1aka98lq

Select a GPU with a minimum of 24 GB VRAM, such as the RTX 3090.

Choose a RunPod template:

RunPod PyTorch 2.1
runpod/pytorch
:2.1.0-py3.10-cuda11.8.0-devel-ubuntu22.04

Edit the pod configuration:
Set the volume disk size to 50 GB or your preferred size.

Upload all files to the workspace folder.

To install, run the following commands:

cd /workspace
export HF_HOME="/workspace"
chmod +x RunPod_Install.sh
./RunPod_Install.sh

This will install everything fully automatically

To use after installation:

You don't have to do above steps anymore once you done them

Then whenever you want to use Roop deepfake

Open a new terminal inside the main Roop folder in your workspace as shown in tutorial video

Execute below commands

cd /workspace/roop

source ./venv/bin/activate

Then modify your file names in the given below command and hit enter on the opened cmd window

First option will not enhance face

Second option will enhance face automatically

Quality 1 is best quality 100 is worst

python run.py -s "/workspace/face2.png" -t "/workspace/video3.mp4" -o "/workspace/face_changed_video.mp4" --keep-frames --keep-fps --temp-frame-quality 1 --output-video-quality 1 --execution-provider cuda

python run.py -s "/workspace/face2.png" -t "/workspace/video3.mp4" -o "/workspace/face_restored_video.mp4" --keep-frames --keep-fps --temp-frame-quality 1 --output-video-quality 1 --execution-provider cuda --frame-processor face_swapper face_enhancer

It will generate face_changed_video.mp4 or the file name you give in the main Roop folder. Also you will see frames folder in main Roop folder named as video3 or whatever the video name you have given

For uploading files you can use jupyterlab interface or runpodctl which would be much faster

For runpodctl watch this tutorial :  Ultimate RunPod Tutorial For Stable Diffusion - Automatic1111 - Data Transfers, Extensions, CivitAI 

You can also use

wget https://huggingface.co/MonsterMMORPG/SECourses/resolve/main/example_roop_dataset.zip

To get example images and videos into your runpod quickly

Then unzip them with

7z x example_roop_dataset.zip

After you have turned off the pod or restarted the pod execute below commands 1 time. Do this after each restart or turned off pod and started again
Copy all and paste and hit enter at once

apt update

yes | apt-get install -y python3.10-tk

yes | apt-get install ffmpeg

yes | apt-get install p7zip-full

yes | apt install -y libcudnn8=8.7.0.84-1+cuda11.8 libcudnn8-dev=8.7.0.84-1+cuda11.8 --allow-change-held-packages