How to Face Swap in Stable Diffusion with Roop Extension

Updated
How to Face Swap in Stable Diffusion with Roop Extension
Embark on an exciting visual journey with the stable diffusion Roop extension, as this guide takes you through the process of downloading and utilizing it for flawless face swaps. Unleash your creativity and explore the limitless potential of stable diffusion face swaps, all made possible with the Roop extension in stable diffusion.

1. Introduction

Welcome to this comprehensive guide on using the Roop extension for face swapping in Stable Diffusion. In this tutorial, we will explore how you can create amazingly realistic images. Roop is a powerful tool that allows you to seamlessly swap faces and achieve lifelike results. Whether you're an artist, a content creator, or simply someone looking to have fun with image manipulation, this guide will provide you with steps to download and use the Roop extension in stable diffusion. More information on the roop github repo page.

2. Requirements to Face Swap with Roop

Here are the requirements to follow:

  • On Windows, download and install the Community Visual Studio. During the installation process, make sure to include the Python and C++ packages.
  • Open your command prompt in de stable diffusion web ui directory and run the following command: pip install insightface==0.7.3 how-to-face-swap-in-stable-diffusion-with-roop-install-pip.webp
  • Open Stable Diffusion and go to the "Extensions" tab of the web UI.
  • In the "install from URL" tab, paste the following URL: https://github.com/s0md3v/sd-webui-roop how-to-face-swap-in-stable-diffusion-with-roop-install extension roop stable.png
  • When installed, Close the Stable Diffusion web UI.
  • Download the inswapper_128.onnx model.
  • Replace the downloaded inswapper_128.onnx model inside the <webui_dir>/models/roop/ directory. how-to-face-swap-in-stable-diffusion-with-roop-inswapper 128 replace file roop.png
  • Start Stable Diffusion by double clicking the webui-user.bat file

Once Stable Diffusion is opened, you should see the roop expansion panel under the "txt2img" and "img2img" tabs.

how-to-face-swap-in-stable-diffusion-with-roop-roop extension in stable diffusion downloaded.png

Stable Diffusion in the Cloud⚡️Run Automatic1111 in your browser in under 90 seconds
20% bonus on first deposit

3. Face Swapping with Roop in Stable Diffusion

Roop utilizes a two-step process for face swapping. First, the AI image is rendered completely, and then the face from the roop image is applied to the created AI image. This distinction becomes apparent during the rendering process, where the image appears finished but takes longer as the face is applied.

  • Drag an image in the Roop expansion panel how-to-face-swap-in-stable-diffusion-with-roop-roop image drag angelina jolie.webp
  • "Enable" Roop by checking the checkbox.
  • Click "CodeFormer" from the Restore Face options.
  • Create both a positive and negative prompt.
  • Click "Generate"
  • The ultimate outcome is the creation of a stunning face resembling Angelina Jolie, generated using your own input prompt. angelina_jolie_roop_extension_stable_diffusion_next_diffusion.webp

4. Tips & Considerations using Roop in Stable Diffusion

To achieve the best results with Roop, there are a few considerations to keep in mind:

  • Ensure that the face in the photo is not obstructed by objects such as hair or accessorie
  • Check the Box "Restore Faces". how-to-face-swap-in-stable-diffusion-with-roop-sampling-method-restore faces.png

The face didn't get swapped? Did you click "Enable"? If you did and your command prompt console doesn't show any errors, it means roop detected that your image is either NSFW or wasn't able to detect a face at all.

Stable Diffusion in the Cloud⚡️Run Automatic1111 in your browser in under 90 seconds

5. Face Swap Examples (Stable Diffusion Roop Extension)

In this section, we will showcase a collection of captivating and impressive stable diffusion face swap demonstrations that highlight the remarkable capabilities of this innovative technology. Prepare to be amazed as you witness the seamless transformations made possible by the Stable Diffusion Roop Extension. Get ready for an extraordinary visual experience like no other.

Example 1 (Angelina Jolie): angelina_jolie_3_roop_extension_stable_diffusion_next_diffusion.webp angelina_jolie_2_roop_extension_stable_diffusion_next_diffusion.webp

  • Positive Prompt: perfect hand, ultra detailed, 8k, raw photo, beautiful light, perfect shadows, (face portrait:1.5), (face portrait of a young mature women:1.3), (traditional white dress:1.2), (white dress:1.2), (silk white dress:1.3), white dress with golden jewelry, red jewelries, (cleavage:1.3), long dark hair, (green eyes:1.2), big lips, red lips, burning man desert, (wearing designer hat:1.1), (desert background:1.2), burning man festival background, shim light, tight body, dynamic angle, sexy look, natural skin, posing
  • Negative Prompt: (worst quality:1.2), (low quality:1.2), (lowres:1.1), (monochrome:1.1), (greyscale), multiple views, comic, sketch, (((bad anatomy))), (((deformed))), (((disfigured))), watermark, multiple_views, mutation hands, mutation fingers, extra fingers, missing fingers, watermark,
  • Sampling Steps: 50
  • Sampler: DPM++ 2M Karras
  • CFG scale: 7
  • Size: 704x392
  • Model: cyberrealistic
  • Clip Skip: 2

Example 2 (Salma Hayek): salma_hayek_roop_extension_stable_diffusion_next_diffusion.webp salma_hayek_2_roop_extension_stable_diffusion_next_diffusion.webp

  • Positive Prompt: perfect hand, ultra detailed, 8k, raw photo, beautiful light, perfect shadows, medium shot of a mature latina women, (mexican traditional yellow dress:1.2), big chest, (yellow dress:1.2), (silk yellow dress:1.3), yellow dress with golden jewelry, golden jewelries, (cleavage:1.3), burning man desert, (desert background:1.2), burning man festival background, shim light, sexy look, natural skin, posing
  • Negative Prompt: (worst quality:1.2), (low quality:1.2), (lowres:1.1), (monochrome:1.1), (greyscale), multiple views, comic, sketch, (((bad anatomy))), (((deformed))), (((disfigured))), watermark, multiple_views, mutation hands, mutation fingers, extra fingers, missing fingers, watermark,
  • Sampling Steps: 50
  • Sampler: DPM++ 2M Karras
  • CFG scale: 7
  • Size: 704x392
  • Model: cyberrealistic
  • Clip Skip: 2

Example 3 (Zendaya): zendaya_roop_extension_stable_diffusion_next_diffusion.webp zendaya_2_roop_extension_stable_diffusion_next_diffusion.webp

  • Positive Prompt: perfect hand, ultra detailed, 8k, raw photo, beautiful light, perfect shadows, (face portrait:1.5), (face portrait of a young latina women:1.3), (silk white dress:1.3), jewelry, (cleavage:1.3), black hair, burning man desert, (desert background:1.2), burning man festival background, shim light, dynamic angle, sexy look, natural skin, posing
  • Negative Prompt: (worst quality:1.2), (low quality:1.2), (lowres:1.1), (monochrome:1.1), (greyscale), multiple views, comic, sketch, (((bad anatomy))), (((deformed))), (((disfigured))), watermark, multiple_views, mutation hands, mutation fingers, extra fingers, missing fingers, watermark,
  • Sampling Steps: 50
  • Sampler: DPM++ 2M Karras
  • CFG scale: 7
  • Size: 704x392
  • Model: cyberrealistic
  • Clip Skip: 2

Example 4 (Emma Stone): emma_stone_roop_extension_stable_diffusion_next_diffusion.webp emma_stone_2_roop_extension_stable_diffusion_next_diffusion.webp

  • Positive Prompt: perfect hand, ultra detailed, 8k, raw photo, beautiful light, perfect shadows, (face portrait:1.5), (face portrait of a young white women:1.3), (white dress:1.2), (silk white dress:1.3), jewelry, (cleavage:1.3), (red hair:1.3), (green eyes:1.5), (looking straight into the camera:1.2), burning man desert, (desert background:1.2), burning man festival background, shim light, dynamic angle, sexy look, natural skin, posing
  • Negative Prompt: (worst quality:1.2), (low quality:1.2), (lowres:1.1), (monochrome:1.1), (greyscale), multiple views, comic, sketch, (((bad anatomy))), (((deformed))), (((disfigured))), watermark, multiple_views, mutation hands, mutation fingers, extra fingers, missing fingers, watermark,
  • Sampling Steps: 50
  • Sampler: DPM++ 2M Karras
  • CFG scale: 7
  • Size: 704x392
  • Model: cyberrealistic
  • Clip Skip: 2

6. Alternative Face Swap Extension (ReActor Extension)

If you're interested in exploring an alternative Face Swapping Extension, be sure to take a look at our comprehensive tutorial on the ReActor Face Swapping Extension. The article outlines numerous advantages when compared to the Roop Extension and demonstrates the capabilities of this alternative.

How to Face Swap in Stable Diffusion with ReActor Extension

Dive into the tutorial to unlock the full potential of the ReActor Extension.

Stable Diffusion in the Cloud⚡️Run Automatic1111 in your browser in under 90 seconds

7. Conclusion

Congratulations on learning how to use the Roop extension for face swapping in stable diffusion. By following the steps and considerations outlined in this guide, you can create amazingly realistic face swaps. The Roop extension in stable diffusion empowers you to explore your creativity and experiment with face swaps, whether for artistic purposes or simply for fun. Enjoy the process of transforming images and unlocking new possibilities with Roop!

Frequently Asked Questions

Yes, Roop Extension comes with an NSFW filter. However, it's important to note that the ReActor Extension distinguishes itself by not having an NSFW filter. This means users have the flexibility to generate face-swapped images without any content restrictions, allowing for a broader range of creative possibilities.

Roop Extension doesn't impose a strict limit on the number of faces you can swap in a single image. However, for optimal results and to maintain clarity in face swapping, it's recommended to manage and number the faces appropriately, ensuring a seamless and visually appealing outcome.

character creation tool card

AI Image Generation Tool

Create Your AI Images in Seconds!

News & Updates