想用Midjourney做到一键生图换脸,必须要用到插件InsightFace,InsightFace 是一个用于 2D 和 3D 人脸分析识别的开源库,它提供最先进的面部识别、检测和对齐算法,旨在优化训练和部署目的的性能,InsightFaceSwap Discord Bot 简化了肖像换脸的过程,只需几个步骤即可轻松完成。本教程将为大家详细介绍如何使用 Insightface 将Midjourney生成的图片一键换脸。
1、邀请InsightFace Bot
首先,你需要邀请 InsightFace Bot 到 Discord 的服务器,点击邀请Insightface至Discord服务器,下面是链接【注:需科-学-上-网才能打开】:


2、设定角色身份——“/saveid”
使用 Insightface 的一键换脸功能需要先定义一个 ID 名称。在你的服务器中安装 Midjournye Bot 和 InsightFace Bot 后,上传图像并在输入框中输入命令 /saveid 为图片设定一个角色名称,例如,我们定义 ID 名称为 “asian”。将你想要替换的图片拖入命令行窗口中,这是你后期要替换的图片的源人脸。该身份将用于换脸。为图片设定的身份名称可以包含字母或数字的任意组合,最长可达 8 个字符。注意正面,高质量,无眼镜,无厚重刘海照片优先!


3、替换人脸
定义好 ID 名称后,我们可以开始替换人脸。在 Discord Midjourney 服务器中,输入命令 /swapid 并拖入要替换人脸的图片,发送即可自动完成替换。

看看这替换效果,是不是很惊艳!

同时也可以对单张大图右键APP,找到Insightface,就会直接替换人脸了。
