I introduced a face swapping plugin based on stable diffusion: roop (this plugin also has a standalone version with more features, and can even swap faces in videos).
With this plugin, it is possible to easily swap faces with just one click using a facial photo during AI painting. However, the drawback of this tool is that some photos may not look very similar, so it requires generating a large number of photos to find a more suitable match.
The reason for this issue is that the AI painting model has difficulty adapting perfectly to different angles of the face.
Recently, a new face swapping plugin called FaceSwapLab has emerged based on stable diffusion. Compared to roop, it has one major advantage:
It allows uploading multiple photos of the same person.
This means that the face drawn by AI will resemble the original material more. The model can blend the common features of these faces, resulting in a more perfect effect.
Plugin installation address:
To install, go to Extensions -> Install from URL, paste the address, and click install. If the network is unstable, you can use a Git repository-specific proxy:
https://ghproxy.com/https://github.com/glucauze/sd-webui-faceswaplab
After successful installation, restart the WebUI launcher. The faceswaplab menu will appear in two locations, one in the horizontal tab:
And one in the sidebar, under ControlNet:
For normal use with stable diffusion, use the sidebar. The horizontal tab is mainly for auxiliary functions such as comparing images and batch processing.
Function overview:
- FaceSwapLab tab: Provides various tools (construction, comparison, extraction, batch processing, etc. I will translate these menus when I have the energy)
- FaceSwapLab Settings: FaceSwapLab Settings are now part of the sd settings.
There are not many items that need to be changed in the settings. In terms of models, it is actually the same model used by roop.
You can choose the maximum number of facial blends (in my opinion, as long as enough photos are uploaded, there is no need to refine LoRA)
-
Reusing faces through checkpoints: The FaceTools tab now allows creating checkpoints, which helps with reusing faces. When using checkpoints, they take priority over reference images, and the reference source image is discarded.
-
Gender detection: The program can now detect gender based on facial features.
-
Facial composition (blending): Multiple versions of faces can be combined to enhance the swapping effect. This blending occurs during checkpoint creation.
When used in conjunction with settings, you can upload multiple photos (default 3) to be blended.
-
Preserve original images: You can choose to preserve the original image before the swapping process.
-
Multiple versions of faces for replacement: The program allows using multiple versions of the same face for replacement.
-
Facial similarity and filtering: You can compare faces with reference and/or source images.
-
Facial comparison: Facial comparison feature.
-
Facial extraction: Facial extraction with or without zooming.
After configuring, click enable and upload multiple photos for blending. Wait patiently to receive a photo that is much closer to the original person compared to roop.
Unlike roop, FaceSwapLab supports NSFW (not safe for work) mode. As for the NSFW switch, I won't say much about it. You can enable/disable it in the settings... ...