Nodes/ComfyUI-PuLID-Flux2/Apply PuLID ✦ Flux.2
ComfyUI Node

Apply PuLID ✦ Flux.2

The node that makes Flux.2 stop inventing new faces

By iFayens·Created 6 months ago·Updated 4 months ago· 119
Apply PuLID ✦ Flux.2
  • model
  • pulid_model
  • eva_clip
  • face_analysis
  • image
  • MODEL
strength1.00
face_index0
debug_modefalse

You know this exact Flux.2 pain: you prompt "a woman in Tokyo, neon rain" five times and get five different women. Same prompt, nobody. Apply PuLID ✦ Flux.2 is the fix - it takes the face from one reference photo, turns it into identity tokens, and pins them into the model so every generation wears the same face no matter how much the scene changes around it.

This is the main node of the iFayens/ComfyUI-PuLID-Flux2 pack, and it's the first PuLID adaptation that works on Flux.2 Klein (4B and 9B) plus Dev (32B). It's the Flux.2 version of the ByteDance PuLID you may know from SDXL and Flux.1 - the identity adapter that beat InstantID partly on merit and mostly because it actually shipped a Flux port. PuLID's whole pitch is that it copies a face while breaking less of everything else. The paper calls the damage adapters usually cause "ID pollution" (degraded detail, style, and prompt adherence); PuLID's contrastive training keeps it minimal.

How it works

Nothing here calls an API or needs a key - it's all local. Wire in a reference image and the node hands it to InsightFace, which detects and crops the largest face and extracts the ArcFace identity embedding. That cropped face also runs through EVA-CLIP for visual features. Both feed the PuLID model's id_former, which produces identity tokens, and those tokens get injected into the Flux.2 transformer's double and single blocks as cross-attention corrections - scaled by depth, stronger in the early blocks, gentler near the end.

It auto-detects which Flux.2 variant you're running by counting blocks (hidden dim 3072 for Klein 4B, 4096 for Klein 9B, 6144 for Dev) and projects the tokens if the dimensions don't match, so the same graph runs across all three. The output is a cloned, patched MODEL - feed it straight into your KSampler.

The inputs that actually matter

  • image - your reference photo. A clear, well-lit front-facing face gets you the best embedding; the node picks the largest face in the frame.
  • strength (default 1.0, range 0–2) - the author's own recommendation: 1.4. It's the master dial for how hard the identity sticks. Not sticking? Nudge up. Face dominating the scene or distorting it? Back off.
  • face_index (optional, 0–9) - which face to use in a multi-person photo. Faces are ranked largest-first, so 0 is the biggest. Preview your photo with the pack's Face Preview node to see which index is which.
  • debug_mode (optional) - prints every block patch and scale factor to the console. That's your forensic tool when artifacts show up.

Output is one thing: a patched MODEL. That's it. Wire it into your sampler and generate.

Troubleshooting, from real reports

  • No face found → the node quietly returns the unmodified model and prints AUCUN VISAGE to the console. You'll get a normal-but-faceless result. Try a clearer reference.
  • Noisy monocolor output → this is the big one. Reported when the reference image is also fed into image-reference or ReferenceLatent conditioning. This node expects a straight text-to-image run; keep the reference out of the image conditioning stack.
  • Ghost faces / banding after a few runs → patches used to stack because of shared PyTorch blocks; the current version unpatch-cleans between runs, so keep the pack updated and this mostly disappears.

Install

Install the pack once (all five nodes come with it) - via ComfyUI Manager searching "ComfyUI-PuLID-Flux2", or:

cd ComfyUI/custom_nodes
git clone https://github.com/iFayens/ComfyUI-PuLID-Flux2.git
cd ComfyUI-PuLID-Flux2
pip install insightface onnxruntime-gpu open-clip-torch safetensors ml_dtypes==0.3.2

Then drop the PuLID weights from Fayens/Pulid-Flux2 on HuggingFace into ComfyUI/models/pulid/ and InsightFace's antelopev2 files into ComfyUI/models/insightface/models/antelopev2/. EVA-CLIP downloads itself on first run (~800MB). Restart, then connect your checkpoints/CLIP loader, the pack's three loaders, and this node.

Should you reach for it?

Honest take: Flux.2 Klein's native reference conditioning is already surprisingly good at copying a face, and people have been vocal that PuLID adds little when you're also feeding the reference as image conditioning. Where it genuinely wins is separating identity from scene - reference conditioning bleeds background, style, and composition into the result; PuLID carries only the face, so you can drop the same person into totally different scenes from a single embedding. That's the use case, and for it, this node is the one.

CategoryPuLID-Flux2

Inputs (8)

NameTypeDefaultDescription
modelMODEL
pulid_modelPULID_MODEL
strengthFLOAT1.000–2
eva_clipEVA_CLIP
face_analysisINSIGHTFACE
imageIMAGE
face_indexoptINT00–9
debug_modeoptBOOLEANfalse

Outputs (1)

NameTypeDescription
MODELMODEL