There are many face-swapping apps and tools available on the market. Today, I would like to introduce a free face-swapping bot called InsightFaceSwap that can be used within Discord servers. It allows you to replace faces in photos and images and enjoy fun interactions with your community members.
Additionally, when combined with generative art tools like Midjourney and niji・journey, you will have a wide variety of materials to work with.
About InsightFace
InsightFace is a 2D and 3D facial analysis database. It is free and open source, with code that is MIT licensed. For more detailed resources, you can visit the InsightFace page.
Creating Your Own Discord Server
To invite the InsightFaceSwap bot to your Discord server, you must have the “Manage Server” permission or be the owner of the server yourself.
Further reading: How to Create a Discord Server?
Inviting the InsightFaceSwap Bot to Your Server
Currently, the InsightFaceSwap bot is not available in the built-in bot store, “App Directory,” of Discord.
Further reading: Discord App Directory feature introduction
You must use the bot’s invitation link to send an invite. Here is the InsightFaceSwap bot invitation link: https://discord.com/api/oauth2/authorize?client_id=1090660574196674713&permissions=274877945856&scope=bot
After clicking the link, select the server you want to invite the bot to under the “Add to Server” section. Then, grant the necessary permissions for the bot to operate by following a series of prompts. This will successfully invite the bot to your server.
Further reading: How to invite Bots to join your Discord server?
Adding this bot to the server
After the invitation is complete, you will be able to see the InsightFaceSwap bot in the member list on the right side of the server.
InsightFaceSwap bot
List of Commands and Explanations for InsightFaceSwap Bot
Once you have invited the InsightFaceSwap bot to the server, type “/” and select InsightFaceSwap to see the available commands. There are a total of 6 commands.
Type “/” to view all available commands for the InsightFaceSwap bot
The two main commands you will use are: /saveid and /swapid.
/delall
Function: Delete all saved IDNAMEs.
/delid
Function: Delete specific idname.
/listid
Function: List all saved IDNAMEs.
/saveid
Function: Save Identity Feature by Name and Image.
Explanation: Before swapping faces in a photo or image, you need to save the identity first. Let’s use my personal profile picture as an example.
Drag and drop a photo you want to upload, or directly choose a file from your computer to upload the desired photo. Then, enter a name for this photo in the idname space.
Upload my personal profile picture and name it “Banka”
Note: It is recommended to use front-facing photos as much as possible. Otherwise, it may not detect the faces correctly. If the detection fails, you may see a message like the following:
Error message displayed when face detection fails
/setid
Function: Set Current/Default IDNAMEs, use comma splitter for multiple names.
/swapid
Function: Apply Identity Feature to Target Image, use comma splitter for multiple identities.
Explanation: Upload a photo you want to modify the face in and enter the name of the identity you want to replace. This identity must be uploaded using the /saveid command first.
For example, if I want to replace the face in the photo with my profile picture, I would enter “Banka” in the idname space (assuming I have previously saved my profile picture with the name “Banka”).
Preparing for face swap
Here is an example of a completed face swap:
an example of a completed face swap
As a bonus, here is another face swap of a meme image:
face swap of a meme image