Skip to content

Latest commit

 

History

History
121 lines (85 loc) · 5.22 KB

How-To-Use-Roop-DeepFake-On-RunPod.md

File metadata and controls

121 lines (85 loc) · 5.22 KB

image Hits

Patreon BuyMeACoffee Furkan Gözükara Medium Codio Furkan Gözükara Medium

YouTube Channel Furkan Gözükara LinkedIn Udemy Twitter Follow Furkan Gözükara

How to install and use Roop DeepFake on RunPod step by step Tutorial

1 Click RunPod installer (updated 3 July 2023) script and example video and images :

Main tutorial readme :

Main tutorial youtube :

RunPod Register :

Select template

  • RunPod Fast Stable Diffusion (runpod/stable-diffusion:fast-stable-diffusion) or
  • RunPod Stable Diffusion (runpod/stable-diffusion:web-automatic)

Make runtime container disk size at least 15 GB

Follow tutorial video of this (https://youtu.be/jD1ZSd9aFHg) and execute below commands as shown in tutorial 1 by 1

git clone https://github.com/FurkanGozukara/roop
cd roop
python -m venv venv
source ./venv/bin/activate
pip install onnxruntime-gpu && pip install -r requirements.txt
apt update
yes | apt-get install -y python3.10-tk
yes | apt-get install ffmpeg
yes | apt-get install p7zip-full
apt install libcudnn8=8.7.0.84-1+cuda11.8 libcudnn8-dev=8.7.0.84-1+cuda11.8

Info

  • Roop does not support all video formats and types
  • Especially NSFW not supported
  • Upload your video and image file into the main Roop folder as shown in video
  • Demo video and image files are shared on Patreon post : https://www.patreon.com/posts/1-click-deepfake-83785289
  • For fast upload and download use runpodctl as shown in this tutorial (you can look chapters) : https://youtu.be/QN1vdGhjcRc
  • Example upload video : runpodctl send video3.mp4

How to use after installation

Open a new cmd window on jupyter notebook inside main roop folder

Execute below commands

cd /workspace/roop
source ./venv/bin/activate

Once you have uploaded files modify below file paths and execute command

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

To Start With GPU

--execution-provider tensorrt, cuda, cpu

python run.py -s "face2.png" -t "video3.mp4" -o "face_changed_video.mp4" --keep-frames --keep-fps --temp-frame-quality 1 --output-video-quality 1 --execution-provider cuda
  • The below code will also apply face enhancement. Will take longer
python run.py -s "face2.png" -t "video3.mp4" -o "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

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

Execute below commands 1 by 1

  • 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

Upscaler Wiki

https://upscale.wiki/wiki/Model_Database