Auto Installer Script For Roop (DeepFake) On RunPod & Example Image And Videos
🕑 Added 2023-06-13 15:35:09 +0000 UTCThis post is deprecated here new post : https://www.patreon.com/posts/1-click-roop-and-88234834
https://www.patreon.com/posts/1-click-roop-and-88234834
New Post : https://www.patreon.com/posts/1-click-roop-and-88234834
This post is deprecated
.
.
.
.
.
.
Old Post
Join discord and tell me your discord username to get a special rank : SECourses Discord
31 February 2024 Update
The installer file updated for the latest version to work with GPU blazing fast
Ignore this message at the end of install : ERROR: pip's dependency resolver does not currently take into account all the packages that are installed. This behaviour is the source of the following dependency conflicts.
tensorflow 2.14.0 requires keras<2.15,>=2.14.0, but you have keras 3.1.1 which is incompatible.
22 August 2023 Update
Now supports Fast Stable Diffusion template and Roop updated to the latest version with new features. Please read this post carefully. Don't forget to execute very bottom commands after turn off and turn on pod.
Tutorial : How To Use Roop DeepFake On RunPod Step By Step Tutorial With Custom Made Auto Installer Script
Readme file of this tutorial click here
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 20 GB
With my way you will be able to use Stable Diffusion auto1111 and Roop at the same time so you can use codeformer to improve faces as I have shown in this video : Mind-Blowing Deepfake Tutorial: Turn Anyone into Your Favorite Movie Star! PC & Google Colab - roop
Upload the attached auto_install.sh into your workspace folder
Open a new terminal (cmd)
Execute below commands with order
chmod +x auto_install.sh
./auto_install.sh
This will install everything fully automatically
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 "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
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
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
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
Comments
Furkan Gözükara
You can use both
Gigi
Honestly I didn't. I'll try and let you know. Can I use jpg as well or have to be png?
Furkan Gözükara
i guess it doesn't work with that particular image. did you try with demo ones to verify working?
Gigi
Hi! Just jumped in you Patreon for this autoinstall. The setup seems works fine but when I try to swap face it gives me this error: [NULL @ 0x55a606c3f380] missing picture in access unit with size 5 What's the problem? Are there any specifications for the images? Like 128x128.
Furkan Gözükara
yes it will not work with every video and image. you can try attached video and image to verify your install working try face2.png face1.png face3.png video2.mp4 video1.mp4 video3.mp4
Mustafa Oğuzhan Kılıç
swap won't work, final result has the original face without getting swapped.
AI Squad
Perfect, thank you!
Furkan Gözükara
all is using same 128x128 face swapper model. so difference comes from how to pre or post process. i tried FaceFusion on automatic1111. doing exactly same thing
AI Squad
Hi! Did you try other models like FaceFusion? Currently, for Faceswaping, do you think Roop is still the best one? I saw there is a new fork called Roop Unleashed, where it seems that they decided to move forward with the evolution of the model. here is the link: https://github.com/C0untFloyd/roop-unleashed
Furkan Gözükara
well the faces should be similar otherwise the quality wont be that great
Rylan Czuczman
Hello, I used the auto installer and all seemed to work ok - however the video I tried to faceswap with seemed to just have the original face. Do we need to change the quality number in the query example?
Furkan Gözükara
you are welcome let me know
John Vee
thank you ok I will try again with fast stable diffusion pod
Furkan Gözükara
hello. please show me video of how you are trying to install. i just made fast stable diffusion pod installed and working great
John Vee
hello sir this no longer works anymore do you have an update to this please?
Furkan Gözükara
nice thanks for the tips
Jezwah Borjair
I know this is kinda old but i agree with the the first using in that the animations were distracting; however it did do an excellent job at drawing in the viewer so I would keep it for the first transition into the video
Furkan Gözükara
i agree. hopefully will do. ty for reminding
Erosi
SimSwap looks amazing, please make tutorial
Furkan Gözükara
you are welcome
Chris Erickson
Thanks so much!
Furkan Gözükara
Updated post and scripts for you. Now working very well on Fast Stable DIffusion image
Furkan Gözükara
sometimes all of the gpus of the pod will be in use and you won't get a gpu. when you are on only cpu mode they give you very limited ram memory. hopefully i will add new scripts for fast stable diffusion to this post
Chris Erickson
Yes, I tested Fast Stable Diffusion and it didn't work. As for "RunPod Stable Diffusion" - I need to try many pods to get it to work, it seems to be more likely to run on A5000 than on higher end ones. Also- last time I did it it wouldn't run on GPU (was CPU-only) which didn't happen the last few times... not sure what happened differently.
Furkan Gözükara
I will try this when i have time. sorry for delay
Furkan Gözükara
hello. i would try on a different pod. this sometimes happens. usually related to the particular pod you are trying. for Fast Stable Diffusion i didnt test but it may not work due to the template it has. did you test it?
Chris Erickson
When I run the "RunPod Stable Diffusion" image it gets stuck on the " syncing venv to workspace" step- does that image not work anymore? Is there anyway it can run on the Fast Stable DIffusion image? That one still works
Furkan Gözükara
not yet but i may make sure.
Thịnh Nguyễn
great if you have a tutorial on SimSwap
Furkan Gözükara
Thank you. Yes I am working on most realistic and styling workflow. 2 separate flows they will be I plan. Thank you for support
Constantine Tenma
If you want to, sure. I personally am much more interested in your upcoming beyond studio quality LoRAs video =) Your videos are very thorough and contain a lot specific details, which is a good thing! It's not like here a 5 simple steps boom boom boom and it's done tutorial right? This is why, in my opinion, the effects aren't helping. But I can't tell you what to do, I can only say if something is getting in the way.
Furkan Gözükara
I thought those sound effects and transitions would make it more fun to watch? maybe i should put only in first 1 minute? I checked SimSwap. do you think i should make a tutorial for that too?
Constantine Tenma
Check out SimSwap. It's good at keeping target features, facial expressions and even face paint, and it doesn't have issues with temporal coherency (no texture flickering from frame-to-frame). Its default res is 224x224, but: 1. There is a 256x256 model available (in github issues) 2. CodeFormer works wonders on its output (They have a 512x512 model but they trained it on an upscaled dataset and it looked much worse, so it wasn't quite ready yet last time I checked) P.S. The sound effects and transitions in the video are super distracting and annoying =(