> For the complete documentation index, see [llms.txt](https://metaverse-imagen.gitbook.io/ai-tools-research/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://metaverse-imagen.gitbook.io/ai-tools-research/ai-tools-main-categories/images-art-and-design/image-generation/picsi.ai-insightfaceswap/insightfaceswap.md).

# InsightFaceSwap

InsightFaceSwap is a free and open source face-swapping bot that can be used on Discord servers. It allows users to replace faces in photos and images with the faces of other people. The bot is powered by the InsightFace face recognition library, which is one of the most accurate face recognition libraries in the world.

<https://www.youtube.com/watch?v=MHdqRo02kWQ&t=0s>

To use InsightFaceSwap, you first need to add the bot to your Discord server. You can do this by following these steps:

1. Go to the InsightFaceSwap website.
2. Click on the "Add to Discord" button.
3. Log in to your Discord account.
4. Select the server that you want to add the bot to.
5. Click on the "Authorize" button.

Once the bot has been added to your server, you can use it to swap faces by following these steps:

1. In a Discord channel, type the following command:

```xml
Copy code/swapid <source_image> <target_image>
```

where

Copy code![bard for google copy icon](chrome-extension://hnadleianomnjcoeplifgbkiejchjmah/static/images/copyIconDark.svg)`<source_image>`is the path to the image that you want to swap the face in, and`<target_image>`is the path to the image that you want to use as the new face.

For example, to swap the faces in the images

Copy code![bard for google copy icon](chrome-extension://hnadleianomnjcoeplifgbkiejchjmah/static/images/copyIconDark.svg)`source.jpg`and`target.jpg`, you would type the following command:

```bash
Copy code/swapid source.jpg target.jpg
```

The bot will then process the images and replace the face in the

Copy code![bard for google copy icon](chrome-extension://hnadleianomnjcoeplifgbkiejchjmah/static/images/copyIconDark.svg)`source.jpg`image with the face from the`target.jpg`image. The resulting image will be saved to a file called`output.jpg`in the same directory as the`source.jpg`image.

InsightFaceSwap can also be used to swap faces in GIFs. To do this, you need to use the

Copy code![bard for google copy icon](chrome-extension://hnadleianomnjcoeplifgbkiejchjmah/static/images/copyIconDark.svg)`/swapgif`command instead of the`/swapid`command. The syntax for the`/swapgif`command is the same as the syntax for the`/swapid`command, except that the`<source_image>`argument must be a path to a GIF file.

For example, to swap the faces in the GIF file

Copy code![bard for google copy icon](chrome-extension://hnadleianomnjcoeplifgbkiejchjmah/static/images/copyIconDark.svg)`source.gif`with the faces from the image`target.jpg`, you would type the following command:

```bash
Copy code/swapgif source.gif target.jpg
```

The bot will then process the GIF file and replace the faces with the faces from the

Copy code![bard for google copy icon](chrome-extension://hnadleianomnjcoeplifgbkiejchjmah/static/images/copyIconDark.svg)`target.jpg`image. The resulting GIF file will be saved to a file called`output.gif`in the same directory as the`source.gif`file.

InsightFaceSwap is a powerful tool that can be used to create fun and interesting images. It is also a valuable tool for researchers and developers who are working on face recognition and face swapping applications.
