Replace the face in any video with one image.
Check out the original GitHub Repo for installation and usage guide.
All credit goes to s0md3v: Somdev Sangwan
Description
FAQ
Comments (97)
Can somebody dumb this down for me? How do you start this program?
anyone getting this error? File "inswapper_128.onnx" does not exist!
Apparently they deleted this file for some reason, but you can find it from google.
Just rename roopVideoFace_v10.onnx to inswapper_128.onnx
when you mean a good gpu, would it be from the rtx 30 or 40 series?
I tried to install it under Windows. There's a lot to do before actually using it. After using venv (not described in the documents) it made it easier, but in the end it didn't run. I wait until this is a bit more mature - or there is some sort of guided installation.
Yeah, I'm running into all kinds of errors as well. Haven't gotten it to work yet.
What is the minimum GPU that can handle this?
I have no ffmpeg c:
Copy/Move the ffmpeg binary to the same folder as roop
i have installed cuda and cudnn , and can successfully run python run.py -gpu, but its still only using my CPU ( GPU sometimes go until 10% usage only and then it drops back down to using CPU ), is there a fix for this ? i am on Windows 10, gtx 3070 ti
no shade to the author, but downloading third party binary sounds sketch, i'll let others crash test it at first tbh.
yeah. their repo looks clean but they also have a bunch of backdoor scripts so idk
My thoughts exactly. Cool concept, but I'm not going to be first in line to install it.
@chaiselecrow can you elaborate more on their supposed backdoor scripts?
Am I misunderstanding something here? I don't see a binary unless you mean the onnx file and that is as safe to use as opening a jpg (onnxruntime)
Scaredy cat
@klbx The author of the github repo seems to be a self-proclaimed "hacker and programmer" and has some cross site scripting (potential to steal people's data, or just for security research) tools under his account as well as security tools. Seems to me to be a person with interest in IT security, but I'm open to being wrong. Please check my thread below in case someone has a correction to make.
Reply here if you get your PC hacked or your data leaked xD
@mr_chrisma thanks for providing that information! Hopefully, if this gets enough traction people can verify if there really is something to worry about. Given that the author of this civitAI thread has already deleted their profile, I am not getting my hopes up.
@klbx I've run the model locally by now after scanning through the code. Works pretty well after fixing the installation issues (only using CPU). The guy has a blog and posts security entries, so I don't see an issue here. I dabble myself and wouldn't want to be judged based on that. I believe the issue to be the model hosted here has been pulled from the original repo and is now closed source. But again, everyone should do their own research before running anything.
it looks clean, been around for few days and no one has any problems, in fact its very simple code that makes use of already known tools, that onyx file is simply old version floating around as original creators locked it behind discord. He also blocked nsfw content (it can be unlocked in 3s if you now basic coding) As for the tool, its nightmare to install because python is nightmare to use. But when it works its amazing as it uses just one picture.
@mr_chrisma How did you make this to run on gpu instead?
512 resolution model?
Unfortunately, according to the creators, it will probably never be released publicly!
Here my tutorial video i made for this amazing repository : https://youtu.be/OI1LEN-SgLM
its been deleted, can you upload again? I can't remember the cmd line to launch it and it ended in how many cores to use?
@solus_sinner930 it is returned back. i appealed youtube
Thanks it works flawlessly!
Python 3.10.6
CUDA 11.6
cuDNN 8.5.0.96
TensorRT 8.6.1
it does replace the face from what I'm seeing in the previews but those faces are really similar. this actually works with more different faces?
yes, its not perfect but its just from 1 picture so its still impressive. As for face similarity well any face swapping software works best with similar faces.
Does anyone know how to deactivate the nsfw filter? Not sure which line of code in which file to comment out/delete. Asking for a friend
https://github.com/GosuDRM/nsfw-roop
This worked for me.
I just deleted the lines they did from the one file (core.py) and that did it.
@null_name you are a godsend thank you!
in the core.py file, there are two lines for predict_video_frames and predict_image from the opennsfw module. There are two lines, change the 0.85 to 1 and you're good to go.
Change the 0.85 to 1
if any(probability > 0.85 for probability in probabilities):
if predict_image(target_path) > 0.85:
Mind if I ask you guys what does that change, exactly? I tried the solution @henryrulez13223 posted, but I don't see any particular NSFW changes compared to the non-censored version.
comment out line 179-180 and 185-186 in core.py
Can someone help me to disable NSFW filter in this face swap extension.
https://github.com/Ynn/sd-webui-faceswap
Which uses the same roop model.
@crmdany in https://github.com/Ynn/sd-webui-faceswap/blob/514b78ee6cda603ec03160756288e5faec248c52/scripts/cimage.py#L25 just return the original image
```
def check_image(x_image: np.ndarray) -> Tuple[np.ndarray, List[bool]]:
return x_image, False
```
@arcticfaded I changed the code as you mentioned. nsfw filter is still active. Need help !
one word, you are god. bonus : we can delete something in code to unlock nsfw content. thanks me later
That's my only issue: I followed the tutorial on changing the code, and I don't see any particular difference in the NSFW outputs.
you are god
Be carefull of virus, backdoors trojan using this. The creator of this tool has this knowledge.
There are no viruses or anything remotely fishy with this tool - it's all open source and you can see everything that it does directly in the python scripts (I've looked, nothing). It's just a simple UI wrapper for the open source facial recognition library from here: https://insightface.ai/.
@ramnnv the other guy just denies your claim, do you have a proof ?
This works extremely well if you know how to download requirements and follow instructions. You'll have it running within 30 minutes, including the time it takes to download all the requisite software (there's a lot).
For those curious about exploring how the NSFW filter works, explore lines 184-186 of the file roop\roop\core.py. This is where the output of the opennsfw2.predict_video_frames function is used to determine whether to proceed with the rest of the script. If that all sounds like gibberish to you, I recommend skipping this project because it requires [a little technical understanding: 0.3].
Highly suggest taking a local backup of this and all dependencies. The creator is constantly threatening to remove the repo due to NSFW fears... :O . Might store it on a flash drive. Best deepfaker so far.
How to manage different faces ?
There's a google colab notebook for this that is really easy to use. even tells you how to disable NSFW filter
link please?
@huzaifaarshad904 https://colab.research.google.com/drive/1NG9AoH3QDtC7h97z1Yodmn_CiiGh8Y1T
i dont know how disable the NSFW filter
So is there anyway to use it in webui now?or u means it's just the original roop in github
You can install it into automatic1111 repository. But it won't be recognized.
Hey Guys, I hope you know about https://github.com/Ynn/sd-webui-faceswap. It is a similar extension used in stable diffusion for swapping in pictures. Can anyone help me to disable the NSFW filter?
In roop/core.py file, remove lines 178 to 186, then remove line 18. It removes opennsfw2 functionality.
@FeverEncore I've disabled it in roop. but faceswap extension doesn't have a corep.py. instead it has faceswap.py and swapper.py . Any ideas how to disable nsfw filter?
@crmdany Since the project has moved to https://github.com/s0md3v/sd-webui-roop/ I might be wrong because I haven't used that extension, but it looks like it installs roop inside the models folder, which is inside the extension folder. I think that it should look like this "extensions/sd-webui-roop/models/roop/roop/core.py"
Make sure to install "inswapper_128.onnx" manually if it didn't download automatically
@FeverEncore After investigating I have the same issue, there is nothing in the "extensions/sd-webui-roop/models/" directory but "inswapper_128.onnx", I've gone through all the scripts in the "extensions\sd-webui-roop\scripts" directory and can't pinpoint where the nsfw filter code is. Any help to disable this filter would be greatly appreciated.
@ArchAngelAries same here ! Need some help. Much appreciated !!
Use this extension instead.
https://github.com/P2Enjoy/sd-webui-roop-uncensored
It removes the compVis safety checker.
Uninstall your previous roop, install this one from URL, use it like you did with roop.
Also, fun fact, if you go to insights > forks on repos, you can usually find someone who decensored an extension.
@bicpen11 Thanks Mate ! It's perfect :D
@bicpen11 It works well . But it's not swapping multiple faces even though I gave the input in "Comma separated face number(s)" option. Any idea why it's not working?
@crmdany hmm. haven't tried multiple faces myself. I know it starts counting from 0, but I'm at a loss past that.
@bicpen11 installed it but got an error "No module named "insightface", any help?
@shikokonoshiko207
You should be able to activate your venv for A1111 in terminal/cmd, navigate to stable-diffusion-webui\extensions\sd-webui-roop-uncensored, then run pip install -r requirements.txt.
Not sure why it didn't install the requirements itself....
Be sure you're not using any starting arguments for A1111 when you install the extension.
It blocks stuff cause reasons while running with ARGs. Might bork install.
I can also break it down a bit further if you're not that comfortable with cmd and venvs.
hi does anyone know why I'm getting a model not found message when i lunch stable diffusion for this face swap
@bicpen11 this doesn't work anymore. got any new tips?
@wootbloot Hmm. not sure why. Here's a way to fix it though.
Open a terminal/cmd in "stable-diffusion-webui\extensions\sd-webui-roop-uncensored"
Then run "git checkout 74b1132"
Should work then. It won't be "up to date" though, so keep that in mind.
Go to extensions\sd-webui-roop\scripts\cimage.py and replace two functions:
def check_image(x_image: np.ndarray) -> Tuple[np.ndarray, List[bool]]: return x_image, [False] * len(x_image) def convert_to_sd(img: Image) -> Image: return imgits not there they updated i need help turning of the censor.
@The_one_and_only7723 UPDATED CODE :
Remove all of the code from cimage.py
and paste that :
import tempfile
#from ifnude import detect # Commented out to prevent detection
def convert_to_sd(img):
#shapes = [] # Commented out because it's related to detection
#chunks = detect(img) # Commented out to prevent detection
#for chunk in chunks:
# shapes.append(chunk["score"] > 0.7)
#return [any(shapes), tempfile.NamedTemporaryFile(delete=False, suffix=".png")]
return [False, tempfile.NamedTemporaryFile(delete=False, suffix=".png")] # Changed return to always False as no detection is being done
I solved by changing ["score"] > 0.7 to > 1.0, works perfectly.
Here still most up to date tutorial with updated readme file : https://youtu.be/OI1LEN-SgLM
Is there any reason why when I select the face, target video and then the location to save it will run through a process and then crash? No error or anything. Just vanishes. Have had it work once so far.
nsfw filter? :D
How to lock 1 target faces in roop ?
anyone know how to use this? i click on run.py but it just force closes
Follow the Github installation steps the best you can, but if you still have issues join the discord and someone can probably assist you: https://discord.com/invite/Y9p4ZQ2sB9
In my video, sometimes the face flicker a little bit like 1 or 2 frames each time. How to fix it?
How to update to a newer version?
There is no newer version. This file is just the original "inswapper_128.onnx" renamed
how do you disable all censorship and filters for nfsw
there is uncensored version on github already
@Rayl66 where is it? the one in the original repo is censored
@FatimaMedina download any fork its on the right side of the ROOP GitHub page in the about section
Dude... Seriously? This can't be installed.
Why not?
anyone know how to disable the nsfw filters for new version 25 August 2023.
I updated the new version and the nsfw filter has been turn on.
Tried many ways to turn off it but failed.
Just go to https://github.com/C0untFloyd/roop-unleashed and copy paste all those files over your current ones. Or use it directly.
to disable the newest nsfw filter go to roop/predictor.py and change
MAX_PROBABILITY = 0.85to
MAX_PROBABILITY = 1I have very low quality results even if I use HD image and video. The resulting face is very blurry. Can anyone help me? thankss
where to put the file roopVideoFace_v10.onnx?
<webui_dir>/models/roop/
220k downloads...
Details
Files
roopVideoFace_v10.onnx
Mirrors
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
roopVideoFace_v10.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
rvf_model.onnx
inswapper_128.onnx
swapper.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
cenno.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128b.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapperFTV1Model.onnx
inswapper_128.onnx
inswapper_128.onnx
modelo.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
roopVideoFace_v10.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128_fp32.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx
inswapper_128.onnx