Skip to playerSkip to main content
Ever had your face swap fail in Stable Diffusion even though your settings were correct? Often, this happens because Roop’s built-in content filter mistakenly flags your image as unsafe, preventing the swap from processing.

In this tutorial, I show you how to locate and modify the "nsfw_detector" file within the Roop extension to bypass this overzealous filter. By returning "False" for the safety check, you can ensure Roop processes your images correctly every time.

*Important Note: Always use these tools responsibly and respect privacy. Do not generate or share inappropriate content featuring real people or celebrities.*

Installing automatic1111: https://youtu.be/xrVb6GIKhJQ
Installing roop: https://www.dailymotion.com/video/xa7po50
Swaping face from one image to anotehr: https://www.dailymotion.com/video/xa7pqwq

Original YouTube Tutorial: https://youtu.be/6nj9YUjFcUU

Video Details:
* Original Publish Date: March 22, 2024
* Focus: Roop Troubleshooting / Content Filtering / Workflow Optimization
* Test using RTX 4060 TI 16 GB of VRAM

Follow lordcaocao2025 on Dailymotion for more technical AI research and generative workflow guides!

---
Connect with me:
📺 YouTube: https://www.youtube.com/@CaoCao2025
📱 TikTok: https://www.tiktok.com/@caocao20250
💎 Patreon: https://www.patreon.com/cw/Caocao2025

#StableDiffusion #Roop #FaceSwap #AITutorial #Troubleshooting #AIWorkflow #lordcaocao2025
Transcript
00:00hello guys welcome back with me ciao ciao 2025 we're going to learn about why
00:07root not working to certain image or systems prompt so if you generate
00:13woman's or body that kind of type and stuff you know it usually sometimes the
00:19root is not working of changing one face to another that's because root has this
00:28thing called the C image if you open the extension it as you where by UI group
00:37script this file c image py you could should edit this it has you know import
00:44from if nude if to itself is a model from site package if nude the Python it has
00:51this detector py that can read if an image is contain adult content or not but
01:03sometime you know the score is 0.7 so sometimes you generate things that with
01:10a body type or like latex or stuff it can generate and got to think that it is
01:16generated adult content nude image which actually not so the solution is simply
01:26you edit the detector pi or this image py the detector pi is used by any other
01:31extension and any other thing that stable divisions use but see image py is only
01:37used by root so I suggest just edit this I do edit it simply this is checking if the
01:46if nude can I see that this is has a score of 70% so simply turn this off by
01:54give it this
01:56thing this thing and this thing this is a comment so it's not gonna be used but to
02:02return because you see we turn off simply return false and yeah yeah and the F is big sorry
02:15and then save and then you restart your web UI and try generate the image and you know
02:25whatever the score is it's gonna generate the route not gonna cancel the image that
02:31is but you know make sure you're not generating non safe for work image for
02:35your friends or for celebrity or other people you know don't put them in those
02:40use especially if the image is gonna be up on the internet so yeah don't do that guys
02:47it's gonna ruin people anyway that's that for how to manage root thank you for
02:56watching don't forget to like share and comment and see you again on next episode
03:00have a nice day
Comments

Recommended