Automatically detects faces and replaces them.
Go to file
kex0 8b17080f19 swap face with existing face images 2023-04-01 22:19:22 +02:00
images added image splitter visualization 2023-01-17 02:22:06 +01:00
scripts swap face with existing face images 2023-04-01 22:19:22 +02:00
.gitignore improved memory management 2023-01-24 02:42:46 +01:00
README.md clarify location of requirements.txt 2023-03-02 21:30:32 -08:00
install.py mediapipe-silicon for apple silicon 2023-01-14 00:51:51 +01:00

README.md

Batch Face Swap extension for https://github.com/AUTOMATIC1111/stable-diffusion-webui

Automaticaly detects faces and replaces them.

example1

Installation

Automatic:

  1. In the WebUI go to Extensions.
  2. Open Available tab and click Load from: button.
  3. Find Batch Face Swap and click Install.
  4. Apply and restart UI

Manual:

  1. Use git clone https://github.com/kex0/batch-face-swap.git from your SD web UI /extensions folder.
  2. Open requirements_versions.txt in the main SD web UI folder and add mediapipe.
  3. Start or reload SD web UI.

Guide

  1. Open img2img tab.
  2. Select Batch Face Swap script.
  3. Paste a path of the folder containing your images in the Images directory textbox.
  4. (Optional) It may sometimes fail to find a face if the face is very small in comparison to the size of the image. So, you can tell it to split the image and look at the smaller portions of the image by using the How many images to divide into slider. (don't worry it will stitch the image back together)
  5. Click Generate

If you want to adjust Denoising strength or Mask blur you have to disable the override checkboxes.

For more information, activate the Show tips checkbox at the very bottom.

chrome_BfZn7JEqVu

Example

example

Prompt:

detailed closeup photo of Emma Watson, 35mm, dslr
Negative prompt: (painting:1.3), (concept art:1.2), artstation, sketch, illustration, drawing, blender, octane, 3d, render, blur, smooth, low-res, grain, cartoon, watermark, text, out of focus
Steps: 50, Sampler: Euler a, CFG scale: 7, Seed: 4052732944, Size: 512x512, Model hash: a9263745, Batch size: 8, Batch pos: 1, Denoising strength: 0.5, Mask blur: 4