How to Use Face Swap Extension ReActor in Automatic1111’s Stable Diffusion Web UI

A while ago, I posted about the roop extension to do face swap for stable diffusion. That extension is no longer updated. Another extention called sd-webui-reactor has been published to be used for face swap. Follow these instructions to install the extension.

Requirements

Visual Studio Installation (Only needed on Windows)

  • If you use webui on a Windows machine, visit this page to download and install Visual Studio Community. During installation pick Python development and Desktop development with C++.

  • Reboot your computer

Enable the Extension

  • Click on the Extension tab and then click on Install from URL.
  • Enter https://github.com/Gourieff/sd-webui-reactor in the URL box and click on Install.

  • Click on Installed and click on Apply and restart UI.
  • If this doesn’t work, try to restart webui. On one of my machines, I restarted webui several time to get this to install properly.

Using an Image Example

  • After installation, the roop option is available for txt2img, img2img, and inpaint. Here is an example in inpaint.
  • Drag the original image in the inpaint image box and paint over the face. Set the denoising strength to 0.4 ~ 0.7. I used 0.5 in this example.

  • Check the ReActor box and expand the section. Drop your source image in the image box on the left hand side. Adjust the parameters as needed.

  • Click on Generate to inpaint the face.

Original image:

Source image:

Result image:

Building a Face Model Example

  • If you need to swap the same face multiple times, you can create a face model and re-use it later.
  • Click on Tools tab under ReActor. Drag a source image into the image box. Enter a name for the face model and click on Build and Save. A face model will be saved under model\reactor\face\.

  • If you want to use the face model to swap a face, click on Main under ReActor. Click on Face Model and select the face model from the Choose Face Model drop down. Note that you might have to click on the refresh button by the selector if you just saved the face model without restarting webui.


This post may contain affiliated links. When you click on the link and purchase a product, we receive a small commision to keep us running. Thanks.


Be the first to comment

Leave a Reply