Advertisement

ByteDance's Face-Swapping Solution: An Introduction to PuLID

Relevant solutions for maintaining individual characteristics in face swapping have been previously achieved:

(Pure and Lightning ID Customization via Contrastive Alignment) is an identity customization method that does not require additional parameter tuning. It effectively maintains high identity fidelity while minimizing interference with the original model’s behavior, providing users with an efficient and flexible face-swapping solution.

Key Features

  • : Ensures that the generated results highly preserve the original identity features.
  • : Minimizes the impact on other functionalities of the original model.

Usage Tips

  1. : Some examples are provided at the bottom of the page, which can be directly tried by inputting these prompts.

  2. : A single identity picture is usually sufficient, but additional auxiliary images can also be added.

  3. Two Modes

  • (Default): Meets requirements in most cases.

  • : If the generated result lacks stylization, switch to this mode.

Project Background

PuLID combines standard diffusion models with the Lightning T2I branch, introducing contrastive alignment loss and precise identity loss to minimize interference with the original model's behavior while ensuring high identity fidelity.

  1. Dual-Branch Architecture

  • : Executes the traditional diffusion training process.
  • : Through fast sampling methods, iteratively denoises pure noise into high-quality images in just a few steps (4 steps in this paper).
  • Loss Function Optimization

    • : By constructing contrastive paths with/without identity injection, it guides the model to minimize interference with the original model's behavior when injecting identity conditions.
    • : Ensures that the generated identity features are accurate and realistic.
  • Consistency Enhancement

    • Maintains maximum consistency of image elements (e.g., background, lighting, composition, and style) before and after identity insertion.

    Framework Overview

    • : Traditional diffusion model training process. Uses faces extracted from the same image as identity condition inputs (
    • : The Lightning T2I branch uses fast sampling technology, requiring only a few steps to denoise from pure noise to high-quality images.
      • : Comparison between paths with/without identity injection.
      • : Guides the model to precisely insert identity conditions.

    Comparison