If you have used IP-adapter or other face-changing plug-ins, installInstantIDIf you haven't installed it before, you need to install insightface first. You can read my previous article on how to install insightface.
Detailed guide: Learn how to install and configure Insightface on the ComfyUI platform
Installation Process
First,ComfyUIUpgrade to the latest version!
git clone this repository to the ComfyUI/custom_nodes/ directory or use a manager. I use the manager to search for InstantID and download it. Remember to download the author Cubiq.
The InsightFace model is antelopev2 (not the classic buffalo_l). Download the models (e.g. from here or here), unzip them and put them in the ComfyUI/models/insightface/models/antelopev2 directory.
The main model can be downloaded from this website: https://huggingface.co/InstantX/InstantID/resolve/main/ip-adapter.bin?download=true
And placed in the ComfyUI/models/instantid directory.
(Note that this model is calledip_adapterbecause it is based on IPAdapter).
You will also need to download a ControlNet model: https://huggingface.co/InstantX/InstantID/resolve/main/ControlNetModel/diffusion_pytorch_model.safetensors?download=true
Download and place it in the ComfyUI Controlnet directory.
Please keep in mind that InstantID currently only works with SDXL. So you will also need to prepare a large model for SDXL
Usage Process
To implement IntantID face swapping, we also need to install this node package, which provides us with the FaceDetailer node. Friends who have used WebUI should be familiar with it. This is the ADetailer face repair plug-in in WebUI. The principle of implementing face swapping is to use FaceDetailer to identify the facial area of the person and then use InstantID to redraw the face.
I won't describe the node linking process in detail. You can join our discussion group to get the workflow. The workflow is very simple and you can understand it by yourself. Here I mainly remind you of a few parameters of FaceDetailer. The number of steps and CFG are set according to your SDXL large model. The following denoising is the redrawing amplitude. Feathering will affect the degree of fusion of the redrawn edges. So several parameters need to be manually adjusted according to your own situation.