Nodes/ComfyUI_PuLID_Flux_ll/Apply PuLID Flux
ComfyUI Node Runs on cloud

Apply PuLID Flux

Inject a reference face into your Flux model

By lldacing·Created 2 years ago·Updated 9 months ago· 475
Apply PuLID Flux
  • model
  • pulid_flux
  • eva_clip
  • face_analysis
  • image
  • attn_mask
  • options
  • MODEL
weight1.00
start_at0.000
end_at1.000

This is the node that does the thing. The three loaders in this pack just fetch pieces; ApplyPulidFlux is where your reference photo actually gets baked into the Flux model so every generation comes out looking like that person. Everything else in the workflow is setup for this node.

It takes your Flux model and returns a patched Flux model - same model, now carrying an identity. You plug that output into your KSampler like nothing changed, and Flux starts rendering the face from your reference image while still following your prompt. That last part is the whole point of PuLID: ByteDance's contrastive-alignment training means injecting the face doesn't nuke your prompt adherence the way older adapters did.

Worth knowing why this specific implementation exists. The older balazik ApplyPulidFlux had a bug where the model stayed patched between runs - the identity would leak into generations you didn't want it in. This pack's version fixed that (that's the "model pollution" fix in the changelog, a ComfyUI patching bug, not the paper's ID-pollution concept). So the node returns a cleanly patched model that doesn't contaminate the rest of your session.

The inputs that matter

There's a lot of wiring here, but only a few knobs you actually touch. The four typed inputs - model (your Flux model), pulid_flux (from PulidFluxModelLoader), eva_clip (from PulidFluxEvaClipLoader), and face_analysis (from PulidFluxInsightFaceLoader or the FaceNet loader) - are just plumbing. Wire them once and forget them. The ones you'll tune:

  • image - your reference face. One clear, well-lit, front-ish photo works far better than a busy group shot. This is the face you're transferring.
  • weight (default 1, range −1 to 5) - how hard the identity is pushed. 1.0 is the sensible starting point. Crank it and likeness goes up but detail and prompt coherence start to suffer; back it off if the output looks plasticky or ignores your prompt. This is the single knob you'll spend the most time on.
  • start_at / end_at (0 to 1) - when during sampling the identity is active, as a fraction of the steps. Defaults (0 → 1) apply it the whole way. Starting a little later (e.g. 0.1) can let composition settle before the face locks in.

Two optional inputs: attn_mask (a MASK to restrict where the identity applies - the README notes this used to misbehave and now works), and options (an OPTIONS bundle from PulidFluxOptions for picking a face out of a multi-face reference).

The single output is MODEL - the patched Flux model. It goes to your sampler.

Installing it

It ships with the whole ComfyUI_PuLID_Flux_ll pack - Manager search ComfyUI_PuLID_Flux_ll, or git clone https://github.com/lldacing/ComfyUI_PuLID_Flux_ll.git into custom_nodes, then pip install -r requirements.txt, pip install facenet-pytorch --no-deps, and restart. Needs ComfyUI ≥ 0.3.7. Disable any old balazik PuLID-Flux nodes first - they share this exact node name and will collide.

Common issues & troubleshooting

Likeness gets close but never exact. This is PuLID's known ceiling, not your settings. It nails the face contour, skin tone and structure and then stalls a few percent short. The standard fix is a finishing pass: PuLID for the skeleton, then a pixel-level swap (ACE++ / Flux Fill) to close the gap to near-perfect. Don't chase the last 5% by cranking weight - you'll just wreck the image.

Output looks fried or ignores the prompt. weight is too high. Drop it back toward 1.0.

Using it with TeaCache or WaveSpeed? Order matters. Put ApplyPulidFlux before the FluxForwardOverrider + ApplyTeaCachePatch nodes (from lldacing's ComfyUI_Patches_ll), and before ApplyFBCacheOnModel for WaveSpeed. Wrong order and the identity won't apply.

Slow or inconsistent iteration times on Flux. Prefer an fp8 Flux checkpoint over GGUF for PuLID work - the community consistently reports fp8 gives steady sec/it while GGUF swings wildly under PuLID. You'll want ~16GB VRAM for the Flux version.

Wrong face picked from a group photo. Feed in a PulidFluxOptions node on the options input and set the face order/index there.

Categorypulid

Inputs (10)

NameTypeDefaultDescription
modelMODEL
pulid_fluxPULIDFLUX
eva_clipEVA_CLIP
face_analysisFACEANALYSIS
imageIMAGE
weightFLOAT1.00-1–5
start_atFLOAT0.0000–1
end_atFLOAT1.0000–1
attn_maskoptMASK
optionsoptOPTIONS

Outputs (1)

NameTypeDescription
MODELMODEL