Nodes/ComfyUI_PuLID_Flux_ll/Pulid Flux Options
ComfyUI Node Runs on cloud

Pulid Flux Options

Pick the right face when your reference has more than one

By lldacing·Created 2 years ago·Updated 9 months ago· 475
Pulid Flux Options
    • OPTIONS
    input_faces_orderlarge-small
    input_faces_index0
    input_faces_align_mode1

    Optional but genuinely useful: this little node decides which face PuLID grabs when your reference image has more than one in it. Feed it a group photo without this, and PuLID picks a face by its own default and you cross your fingers. Add PulidFluxOptions and you tell it exactly which one to use.

    It doesn't touch the diffusion path at all. It bundles up a few face-selection settings into an OPTIONS object that plugs into the optional options input on ApplyPulidFlux (and on PulidFluxFaceDetector, if you're previewing). Skip it entirely and PuLID still works on single-face references - this only earns its slot when the detector has choices to make.

    The three settings

    All three are required on the node itself:

    • input_faces_order (default large-small) - how detected faces get sorted before one is chosen. Options are left-right, right-left, top-bottom, bottom-top, small-large, large-small. The default sorts by bounding-box area largest-first, so index 0 is the biggest (usually closest/most prominent) face. For a two-people-side-by-side shot, left-right is often the intuitive one.
    • input_faces_index (default 0) - which face in that sorted list to actually use. 0 is the first. So large-small + index 0 = "the biggest face"; left-right + index 1 = "the second face from the left."
    • input_faces_align_mode (default 1) - which detection method aligns the facial features. Leave this at 1. Mode 1 keeps the identity embedding and the alignment features consistent - they come from the same detected face. Mode 0 is the legacy behavior where the embedding and the alignment could end up sourced from different faces in a multi-face image, which is exactly the bug you're using this node to avoid. There's a tiny geometric difference (mode 1's aligned region is slightly smaller), but consistency wins.

    Output is OPTIONS → the options input on ApplyPulidFlux.

    Installing it

    Part of the ComfyUI_PuLID_Flux_ll pack - nothing extra to install. Manager search ComfyUI_PuLID_Flux_ll, or clone into custom_nodes, pip install -r requirements.txt, pip install facenet-pytorch --no-deps, restart. ComfyUI ≥ 0.3.7, disable old balazik PuLID nodes first. No model downloads specific to this node.

    Common issues & troubleshooting

    PuLID keeps transferring the wrong person from a group shot. This is the node's whole reason to exist. Add it, pick an input_faces_order you can reason about (left-right or large-small), and step input_faces_index until you hit the right face. Use PulidFluxFaceDetector alongside it to actually see which face each index resolves to instead of guessing.

    Embedding and alignment seem to come from different faces. That's input_faces_align_mode = 0 behavior. Set it to 1 (the default) and the embedding and alignment are guaranteed to be the same face.

    No effect on a single-face reference. Expected. With one face there's nothing to sort or select - the ordering and index only matter when detection finds several. On a clean single-subject photo you can leave this node out of the graph entirely.

    Index out of range on a solo photo. If you set input_faces_index to 1 but the image only has one face, there's no second face to select. Drop the index back to 0.

    Categorypulid

    Inputs (3)

    NameTypeDefaultDescription
    input_faces_orderCOMBOlarge-smallleft-right: Sort the left boundary of bbox by column from left to right. right-left: Reverse order of left-right (Sort the left boundary of bbox by column from right to left). top-bottom: Sort the top boundary of bbox by row from top to bottom. bottom-top: Reverse order of top-bottom (Sort the top boundary of bbox by row from bottom to top). small-large: Sort the area of bbox from small to large. large-small: Sort the area of bbox from large to small.
    input_faces_indexINT00–1000If the value is greater than the size of bboxes, will set value to 0.
    input_faces_align_modeINT10–1Align face mode. 0: align_face and embed_face use different detectors. The results maybe different. 1: align_face and embed_face use the same detector.

    Outputs (1)

    NameTypeDescription
    OPTIONSOPTIONS