Disclaimer and Official Text, for personal entertainment use only.
Normally, Midjourney is suitable for creating conceptual images, but it is difficult to use it for personalized avatar customization. Even if you use a placeholder image, it still doesn't look like the person. Now, you can use the Insight Face library to recognize the faces in the image and replace them with your own face.
What is Insight Face
InsightFace is an open-source 2D&3D deep face analysis library. It effectively implements a variety of state-of-the-art face recognition, face detection, and face alignment algorithms. Simply put, it recognizes faces in images and extracts them for modeling. Therefore, using Insight Face, you can perform face swapping on images, not limited to the images generated by Midjourney. Any image with a face can be used. It's just that Midjourney currently produces good results, so many people use it.
Tutorial
- First, you need to have a Midjourney account and add the Midjourney bot to your server. There is a lot of information online, so I won't go into detail about this step.
- Invite the InsightFaceSwap Bot to your server.
- Enter the command /saveid test (this means giving InsightFace the face to be replaced for analysis and modeling, and generating an ID with the name "test", which can be any 8-letter combination). After successful saving, the newly created ID name will be automatically set as the default ID. (You can manually specify the default ID using the command /setid idname(s)).
- Next, chant the Midjourney spell.
- After the enlargement is complete, use the INSwapper menu button for quick generation. Right-click on the photo and select the menu Apps-INSwapper.
- Then you will receive the converted result.
- Zoom in to compare the details. The facial features are basically restored, but the original image has a rounder face shape, which is different here. So when swapping faces, try to choose images with similar face shapes.
InsightFace Command List
Finally, here is a list of slash commands currently supported by the InsightFaceSwap bot:
/saveid name upload-image
Used to upload a photo and register the ID features.
/setid name(s)
Set the default source ID name for subsequent INSwapper menu generation.
/listid
List all registered ID names.
/delid name
Delete a specific ID name.
/delall
Delete all IDs.
/swapid name(s) upload-image
Replace the uploaded photo with the specified ID name (or name list).
INSwapper context menu (Recommended)
This is a menu button used to replace the ID of a specified photo using the default ID.