Face Swap Like a Pro: Mastering the PuLID-Flux & FLUX-REDUX Workflow for Stunning Results

CN
ComfyUI.org
2025-06-18 13:27:30

1. Workflow Overview

mc1zwke22tbplnutmqp596(1).jpg

This workflow integrates PuLID face model and FLUX-REDUX style model to achieve:

  • Precise face swapping using PuLID (based on input face photos).

  • Artistic style transfer via FLUX-REDUX (e.g., anime, realistic).

  • Customizable resolution, sampler settings, and style strength.


2. Core Models

Model Name

Function

PuLID-Flux

Face feature extraction (v0.9.1).

FLUX-REDUX

Style transfer (e.g., flux1-redux-dev).

Stable Diffusion

Base image generation (UNET + CLIP).

InsightFace

Face detection & alignment (CUDA-accelerated).


3. Key Nodes & Installation

Node Name

Function

Installation

PulidFluxModelLoader

Loads PuLID model files.

Manual download of .safetensors.

StyleModelLoader

Loads REDUX style models.

Via ComfyUI Manager.

ApplyPulidFlux

Injects face features into generation.

Requires PuLID-Flux plugin.

Image Crop Face

Auto-crops input face photos.

Depends on OpenCV.

Dependencies:

  • Download pulid_flux_v0.9.1.safetensors to models/pulid.

  • InsightFace requires lbpcascade_animeface.xml (face detection model).


4. Workflow Structure

  • Group 1: Face Input & Processing

    • Input: Face photo (e.g., wangyi-ComfyUI_00005_.png).

    • Nodes: Image Crop FaceApplyPulidFlux.

    • Output: Aligned face features.

  • Group 2: Style Control

    • Input: Style reference image (e.g., wangyi AI Studio_00003_.png).

    • Nodes: CLIPVisionEncodeStyleModelApply.

    • Output: Style-conditioned embeddings.

  • Group 3: Image Generation

    • Input: Text prompts, face features, style conditions.

    • Nodes: KSamplerSelectVAEDecode.

    • Output: Final image (default 1024x1024).


5. Inputs & Outputs

  • Required Inputs:

    • 1 face photo + 1 style reference image.

    • Optional: Text prompts, seed (e.g., 530908878942610), aspect ratio (e.g., 1:1).

  • Output: A PNG image blending target face and style.


6. Notes

  1. Hardware Requirements:

    • NVIDIA GPU (RTX 3060+ recommended, ≥8GB VRAM).

    • Reduce resolution to 768x768 if OOM occurs.

  2. Troubleshooting:

    • Face detection fails: Ensure input photo has a clear frontal face.

    • Style not applied: Verify REDUX model path.

  3. Compatibility:

    • PuLID-Flux plugin requires ComfyUI ≥1.3.0.