Skip to content

Latest commit

 

History

History

swapping_discord

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 

Using Midjourney and InsightFaceSwap Bot to create a personalized portrait

Updates

2023-04-10: Our Discord bot now has over 100 users and is currently required to process the verification. So now it cannot be added to any new servers temporarily(those that have been added can be used normally). Please wait for a few days, or it may take up to 1-2 weeks. You can also join our Discord group, to get notification.

Introduction

For over 99% of people, using Midjourney to create your own portraits is not feasible unless you're a famous celebrity with thousands or millions of photos online. But now, with the InsightFaceSwap Discord bot, you can accomplish this task easily with just a few steps.

InsightFaceSwap bot can help you with the following tasks:

  1. The !saveid <name> <img> command is used to upload and register your own photos or ID features for subsequent facial replacement and editing. You can upload up to 10 instances permanently and use them without having to upload them repeatedly.

  2. The !swapid <name> command allows you to replace the face with your own on the uploaded image or on the generation result of Midjourney bot.

  3. The !listid command lists the currently registered ID list.

Step-by-step guide:

  1. Refer to this link to register Discord app, create a new chat room, and invite the Midjourney bot to the chat room.
  2. Invite the InsightFaceSwap bot to the chat room by this link: https://discord.com/api/oauth2/authorize?client_id=1090660574196674713&permissions=274877975552&scope=bot.
3. Now we can start saving your ID features. Drag a photo of yourself (with front view and no occlusion) from your computer to the Discord app. A pop-up window will appear, and in the text box, enter the command `!saveid me` (where 'me' is the registered name, which can be any alphabets or numbers up to 8 characters long).
4. If everything goes well, the bot will tell you that the save was successful.
5. Next, we can experiment with creating our own photo. Let's start chanting the Midjourney prompt.
6. After chanting, we select the first image and enlarge it (you can choose any image to enlarge). Note that we do not support processing on the 2x2 thumbnail.
7. After the enlargement is complete, enter the command ``!swapid me`` to replace the face in the image with your own. Generally, the task is completed in less than a second.
  1. In addition to processing photos generated by Midjourney, we can also process locally uploaded photos.
  2. Similar to uploading ID photos, we drag the target photo (or copy-paste it) to the chat room and enter !swapid me in the text box.
10. Hit to complete!

Other notes:

  1. You can use !listid command to list all the registered IDs. The total number of registered IDs cannot exceed 10.
  2. The registered ID name can only be alphabets and numbers, and cannot exceed 8 characters.
  3. You can overwrite old ID features by re-uploading with the same ID name.
  4. If you don't want to upload your own photo, you can use the insightface python package to generate your own facial features and save them as a .npy file, where shape=(512,), for uploading.
  5. Each Discord account can execute 50 commands per day to avoid automated scripts.
  6. This is in early development stage, so we cannot guarantee that the result will be great in every cases.
  7. Please use it for personal entertainment purposes only.
  8. If there's any problem, you can create an issue on Github or join our Discord group: link