AI Face Swap Showdown in ComfyUI: PuLID vs. InstantID vs. FaceID

Today, we will compare three AI face-swapping technologies: PuLID, InstantID, and IP-Adapter’s FaceID-V2, using a ComfyUI workflow. These technologies are built on a face analysis system called InsightFace, which is a deep face analysis library designed for face recognition, face detection, and face alignment. Note that InsightFace requires a commercial license.

IP-Adapter FaceID was the first of these technologies to be introduced, followed by InstantID, and most recently, PuLID.

timeline

Each of these programs requires a face reference image, so the effectiveness of the face swapping heavily depends on the quality and suitability of the reference image you provide.

We’ll compare the results of these three face-swapping methods using a ComfyUI workflow, which you can download from here.

First, I’ll demonstrate how to use this workflow. Then, we’ll use it to generate 4 sets of images and score them to evaluate their effectiveness.

workflow

For those who love diving into Stable Diffusion with video content, you’re invited to check out the engaging video tutorial that complements this article:

https://youtu.be/E62ori0VSds

Setting Up the ComfyUI Workflow

1️⃣Download and Import Nodes:

  • Ensure you have all necessary nodes. Missing nodes can be installed via ComfyUI Manager, followed by a restart of ComfyUI.
  • Upgrade ComfyUI before installing nodes to avoid issues with missing nodes.
install missing nodes in comfyui manager

2️⃣Install Necessary Models:

The download addresses and storage paths for models are detailed on the GitHub homepages of each node.

For PuLID, for example, download the pre-trained models and place them in the ComfyUI/models/pulid/ folder. The first run will automatically download additional models.

Workflow Structure

1️⃣ Shared Nodes:

At the bottom, these nodes are common to PuLID, InstantID, and FaceID. They use identical dimensions for checkpoint, prompt, latent image, and fixed seed, facilitating easy comparison.

workflow part 1

2️⃣ Model Node Groups:

Further up, there are three groups of nodes. From left to right: PuLID, InstantID, and IP-Adapter-FaceID. The authors have organized these intuitively.

workflow part 2

3️⃣ Reference Image Node:

At the top, the “Face” node (a “Load Image” node) loads a reference photo used for all three technologies.

workflow part 3

Running the Workflow and Comparing Results

Steps to Run

  1. Ensure all nodes and models are correctly installed and configured.
  2. Import the workflow and check the node connections and configurations.
  3. Load the reference image, verifying the image path and format.
  4. Run the workflow to generate effect images for the three technologies.
  5. Compare the generated images to evaluate the differences, advantages, and disadvantages of PuLID, InstantID, and IP-Adapter FaceID.

Evaluation Criteria

Generate four sets of images and score them based on the following dimensions (each scored 1-3):

  • Prompt Fit: How well the image matches the prompt description.
  • Face Luminosity: The naturalness of the light and shadow on the face.
  • Face Similarity: The resemblance between the generated image and the reference image.
  • Face Detail: The texture and detail richness of the face.

Comparative Analysis

First set of pictures:

reference image
comparison 1
PuLIDInstantIDFaceID
Prompt Fit231
Face Luminosity132
Face Similarity123
Face Detail132

Second set of pictures:

comparison
PuLIDInstantIDFaceID
Prompt Fit321
Face Luminosity132
Face Similarity132
Face Detail132

Third set of pictures:

reference image
comparison
PuLIDInstantIDFaceID
Prompt Fit321
Face Luminosity123
Face Similarity123
Face Detail123

Fourth set of pictures:

reference image
comparison
PuLIDInstantIDFaceID
Prompt Fit321
Face Luminosity132
Face Similarity132
Face Detail132

Finally, let’s calculate the total score:

PuLIDInstantIDFaceID
Total253830

From my observations:

  • InstantID scores the highest overall, followed closely by FaceID.
  • PuLID lags behind the other two.

Although InstantID delivers the best results, it is also the most resource-intensive. Ultimately, the best choice depends on your specific needs.

I encourage you to perform your own tests and share your findings in the comments section.

Similar Posts

Leave a Reply

Your email address will not be published. Required fields are marked *