Stable Diffusion ReActor Face Swap – Installation & Usage

author - Rico Rodriguez
Rico Rodriguez

Updated on

If you've spent any amount of time scrolling TikTok, you've probably come across the unreal Keanu Reeves or the Pet Swap. That's what ReActor for Stable Diffusion can do.

The Stable Diffusion ReActor extension offers simple and fast face-swapping capabilities. It allows you to easily swap faces, enhance images, and create high-quality results. Whether new to Stable Diffusion or a seasoned pro, this guide will help you master the ReActor extension effortlessly.

Ready to do realistic face swaps of any face you want? Please keep reading to discover how to install and use the Stable Diffusion ReActor extension, whether doing it for fun or engaging your followers.

Disclaimer: From an ethical perspective, we do not recommend or encourage the use of real-life people/celebrity faces to create any inappropriate or demeaning images. We emphasize the importance of respecting people's privacy and consent when swapping faces in images.

ReActor Stable Diffusion Explanation

ReActor is a Stable Diffusion extension for fast and easy face swaps. It allows you to swap faces in newly generated images and existing ones. In addition to individual face swapping, it supports multiple face swaps. Besides, it integrates enhancement capabilities for more realistic face replacements. For example, you can see options for gender detection, face restoration, mask correction, image upscaling, and more.

ReActor is compatible with several Stable Diffusion user interfaces, including Automatic1111, ComfyUI, etc. It's designed for high performance with CUDA acceleration support and can deliver fast results even on CPUs.

ReActor Stable Diffusion Explanation

To enhance and upscale your AI face swaps, try Aiarty Image Enhancer, a 4-in-1 automatic AI image enhancer and upscaler. It can upscale images to 8x stunning resolutions, up to 32K on Windows and 16K on macOS. The generative AI models excel in enhancing intricate textures such as skin, hair, fabrics, and other fine details, ensuring that every element in your face swap looks sharp and realistic.

AI txt2img output
AI txt2img output enhanced by Aiarty

Install ReActor Stable Diffusion

Getting started with Stable Diffusion ReActor is straightforward. The following shows how to install ReActor Stable Diffusion on Windows using Automatic1111, since it's probably the most popular WebUI.

Step 1. Download Visual Studio 2022 (Community version). Select "Workloads > Desktop & Mobile > Desktop Development with C++" when installing.

download visual studio

Step 2. Open Automatic1111. Go to "Extensions > Install from URL." Copy and paste Stable Diffusion ReActor's address https://github.com/Gourieff/sd-webui-reactor in the "URL for extension's git repository."

download stable diffusion reactor

Step 3. Click the Install button. Restart the Automatic1111 WebUI when the installation is complete.

How to Use Reactor Stable Diffusion

With a successful installation, you'll see the ReActor panel under the "txt2img", "img2img" and "extras" tabs in Stable Diffusion. Click on the ReActor checkbox to enable the extension. Then you can use Stable Diffusion ReActor for face swap.

Face Swap txt2img

Combining Stable Diffusion ReActor and txt2img allows you to swap faces in newly generated images. It's perfect for creating unique and personalized photos. The following content shows how to use Stable Diffusion ReActor in txt2img.

  1. Navigate to the txt2img tab in your Stable Diffusion WebUI.
  2. Click on the ReActor checkbox to enable it.
  3. Import an image containing a face you want to swap (Single Source Image).
  4. Write positive and negative prompts as usual.
  5. Choose a checkpoint model for your image.
  6. Click the Generate button to start face swapping.

Tips: Enable Face Mask Correction to avoid any pixelation around face contours. Use Restore Face > CodeFormer to fix the blurriness.

Upscale the Face-Swapped Image in ReActor

If the resulting face is blurry, the built-in upscaling feature of Stable Diffusion ReActor can make your face-swapped image sharper and more detailed by improving its resolution and quality. Use the steps below to upscale your face-swapped image.

  1. Go to the Upscale subtab within the ReActor extension.
  2. Enable Restore Face > Upscale.
  3. Choose an upscaler from the dropdown list.
  4. Set Scale by to determine how much larger the image will be.
  5. Click Generate to start the image upscaling with Stable Diffusion ReActor.
Upscale the Face-Swapped Image in ReActor

Tips: Choose "R-ESRGAN 4x+" to upscale realistic images and "R-ESRGAN 4x+ Anime6B" for cartoon-styled images.

Face Swapping on an Existing Image in img2img

How about swapping your face into your pet and your pet's yours? Face swapping on an existing image also allows you to do a TikTok Pet Swap in Stable Diffusion img2img. It's ideal for editing photos where you want to replace one face with another seamlessly.

  1. Go to the img2img tab and enable Stable Diffusion ReActor.
  2. Upload the image with the face you want to swap (source) in the ReActor extension.
  3. Make sure the Swap In Source Image option is enabled.
  4. Import the image where the face will be placed (target) in the img2img tab.
  5. Set the Denoising strength between 0-0.25 to not unintentionally modify the image.
  6. Click Generate to start face swapping.
Face Swapping on an Existing Image in img2img

Tips: Enable Face Mask Correction to avoid any pixelation around face contours. Use Restore Face > CodeFormer to fix the blurriness.

Face Swapping on Multiple Faces

Stable Diffusion ReActor supports swapping multiple faces. It detects faces in the image from left to right, from top to bottom, starting from 0, so you can set indexes for source and input images. Set indexes in the order you need, separated by commas.

  1. Go to the img2img tab and enable Stable Diffusion ReActor.
  2. Upload the image with the face you want to swap (source) and the image where the face will be placed (target).
  3. Assign face numbers for the faces in your source image.
  4. Correspond the number of the face in the source image with the number of the face you want to replace in the target image.
  5. Click Generate to start face swapping.

Tips: The number of faces in the target image should be greater than or equal to the number of faces in the source image.

Save Face Swap Models in ReActor

Stable Diffusion ReActor allows you to save an image as a Safetensors face model, so you can load and reuse the model for future projects.

  1. Go to ReActor > Tools.
  2. Load an image containing one person.
  3. Fill in the face model name field.
  4. Click Build and Save.
Save Face Swap Models in ReActor

FAQ

What Is ReActor Stable Diffusion?

ReActor is an extension for Stable Diffusion that allows users to swap faces in images easily. It supports multiple faces, gender detection, face restoration, and upscaling, enhancing the overall quality of your edited photos.

How to Use ReActor Face Swap Stable Diffusion?

To use ReActor for face swapping, enable the extension in your Stable Diffusion WebUI, upload the source and target images, adjust the settings like face mask correction, and generate the face-swapped image.

Will Stable Diffusion Generate NSFW?

Stable Diffusion can generate NSFW content if not properly configured. To prevent this, use filters, appropriate prompts, and settings that restrict the generation of such content.

Rico Rodriguez is an experienced content writer with a deep-rooted interest in AI. He has been at the forefront of exploring generative AI tools like Stable Diffusion. His articles offer valuable insights into the world of AI, providing readers with practical tips and informative explanations.

Home > Stable Diffusion Guide > Stable Diffusion ReActor