Nodes/AUN ComfyUI Nodes/Keyword FaceID Settings
ComfyUI Node

Keyword FaceID Settings

Let the prompt pick your FaceID preset

By loz2754·Created 7 months ago·Updated about 12 hours ago· 5
Keyword FaceID Settings
    • preset
    • weight
    • weight_type
    • preset_faceid
    • lora_strength
    • weight_faceid
    • weight_faceidv2
    • weight_type_faceid
    • matched_keyword
    • matched_index
    • settings_text
    • preset_number
    visible_inputs5
    case_sensitivefalse
    manual_preset1
    match_keywordsYes
    reference_phrase
    keyword1
    preset1PLUS FACE (portraits)
    weight11.00
    weight_type1prompt is more important
    preset_faceid1FACEID PLUS V2
    lora_strength10.60
    weight_faceid11.00
    weight_faceidv211.00
    weight_type_faceid1linear
    keyword2
    preset2PLUS FACE (portraits)
    weight21.00
    weight_type2prompt is more important
    preset_faceid2FACEID PLUS V2
    lora_strength20.60
    weight_faceid21.00
    weight_faceidv221.00
    weight_type_faceid2linear
    keyword3
    preset3PLUS FACE (portraits)
    weight31.00
    weight_type3prompt is more important
    preset_faceid3FACEID PLUS V2
    lora_strength30.60
    weight_faceid31.00
    weight_faceidv231.00
    weight_type_faceid3linear
    keyword4
    preset4PLUS FACE (portraits)
    weight41.00
    weight_type4prompt is more important
    preset_faceid4FACEID PLUS V2
    lora_strength40.60
    weight_faceid41.00
    weight_faceidv241.00
    weight_type_faceid4linear
    keyword5
    preset5PLUS FACE (portraits)
    weight51.00
    weight_type5prompt is more important
    preset_faceid5FACEID PLUS V2
    lora_strength50.60
    weight_faceid51.00
    weight_faceidv251.00
    weight_type_faceid5linear
    keyword6
    preset6PLUS FACE (portraits)
    weight61.00
    weight_type6prompt is more important
    preset_faceid6FACEID PLUS V2
    lora_strength60.60
    weight_faceid61.00
    weight_faceidv261.00
    weight_type_faceid6linear

    "FaceID" is really four nodes and eight numbers. This node is the light switch.

    FaceID in ComfyUI is not one node. It's a small subgraph: an IPAdapterUnifiedLoader, an IPAdapterSimple, an IPAdapterUnifiedLoaderFaceID, and an IPAdapterFaceID wired together - those live in cubiq's ComfyUI_IPAdapter_plus pack, not in AUN. Every loader has a preset dropdown, and each adapter takes weights, weight types, a FaceID LoRA strength... If you've built a couple of character workflows you know the ritual: to switch from "portrait of Alice" to "style transfer of Bob" you click through four nodes and hand-type eight numbers, then misremember what you used last time.

    AUNKeywordFaceIDSettings is a lookup table for that ritual. You define up to six rows - each row is a keyword plus the eight settings those four IPAdapter nodes consume - and the node picks a row by scanning whatever reference_phrase you feed it. One wire in, a bundle of typed settings out, and your whole FaceID stack follows along.

    This is squarely the AUN pack's philosophy: index-driven prompting where one value drives a whole bundle. It makes zero sense until you have a real character-batch workflow, and then you never want to go back to clicking.

    How it works

    The mechanism is simple (the source is worth a skim if you like that sort of thing): every run it lowercases reference_phrase unless case_sensitive is on, walks the rows top to bottom, and activates the first row where any of its keywords appears as a substring. First match wins is the whole engine - no fuzzy scoring, no priorities, just order. Each keywordN field can hold a comma-separated list, so alice, bob, carol is one row sharing one preset; the matched_keyword output tells you which specific one fired.

    Rows are numbered 1–6. visible_inputs (2–6) controls how many are live. The three global controls you actually set:

    • manual_preset (1–6): your default row. It always has a value - there's no separate "default bundle" anymore, this is the fallback.
    • match_keywords (Yes/No): Yes lets keywords override manual_preset; No ignores keywords entirely and always uses the manual row.
    • case_sensitive: off by default. Leave it off unless your keywords genuinely collide on case.

    The node returns NaN from IS_CHANGED, so it re-evaluates on every single run. That's the always-rerun trick from the node-plumbing world, and here it's the feature: when the phrase changes between generations, the settings follow it.

    What comes out and where it goes

    The eight settings outputs are typed to match the exact dropdown options and float ranges of the IPAdapter nodes, so they plug straight into converted widget inputs: preset/weight_typeIPAdapterSimple, weight → its weight, preset_faceid → the FaceID loader, and lora_strength, weight_faceid, weight_faceidv2, weight_type_faceidIPAdapterFaceID.

    Three bonus outputs earn their keep: matched_keyword and matched_index (which row won), settings_text (the active bundle as a Python-style tuple - hand it to AUNPathFilenameV2 or a Show Any node for filenames), and preset_number ("FaceIDPreset-3" if you name presets that way).

    Install

    Same as the rest of AUN:

    cd ComfyUI/custom_nodes
    git clone https://github.com/loz2754/AUN-ComfyUI-Nodes
    

    or ComfyUI Manager → search "AUN" → install → restart. The pack's requirements.txt (piexif, opencv-python-headless, imageio-ffmpeg, requests) is for the whole collection - this node is pure Python and needs none of it. What it does need upstream: ComfyUI_IPAdapter_plus installed, the actual IPAdapter/FaceID model files, and for FaceID specifically the insightface package - the perennial install headache. If insightface trips you up, follow IPAdapter_plus's own install notes.

    Where people get burned

    • SD1.5-only presets on an SDXL workflow. LIGHT - SD1.5 only, FULL FACE - SD1.5 only, FACEID PLUS - SD1.5 only and FACEID PORTRAIT UNNORM - SDXL only are all in the same dropdowns. The names say it, but when you're configuring six rows fast it's easy to grab the wrong one.
    • Nothing matches, silently. With match_keywords=Yes and no hit, you fall back to manual_preset - a great safety net, until you forget it's there and wonder why Alice got Bob's settings. Check matched_index or the node's compact footer (it shows the active bundle) when output looks off.
    • Substring false positives. A keyword like face matches interface. Order rows specific-first - first match wins - and use distinctive keywords.
    • The node always re-runs (that NaN). It's cheap string matching, so this is fine; just know it's deliberate if you ever see it defeating a cache.
    CategoryAUN Nodes/IPAdapter

    Inputs (59)

    NameTypeDefaultDescription
    visible_inputsINT52–6How many keyword/settings presets are active (2-6). Row N uses keywordN + its settings.
    case_sensitiveBOOLEANfalseIf enabled, keyword matching is case-sensitive.
    manual_presetCOMBO1Which preset row (1-6) to use as the active bundle. Clamped to visible_inputs. With match_keywords=No, this is always used. With match_keywords=Yes, keywords can override it when they match.
    match_keywordsCOMBOYesYes: keywords in reference_phrase are matched; the first matching row's settings are used, falling back to manual_preset when nothing matches. No: keywords are ignored; manual_preset is always used.
    reference_phraseoptSTRINGText to scan for keywords. Keywords are matched as substrings.
    keyword1optSTRINGKeyword 1 to match against the reference phrase. Matched as a substring. Comma-separated to allow multiple keywords on this row (any one matching activates it).
    preset1optCOMBOPLUS FACE (portraits)IPAdapterUnifiedLoader preset for keyword 1.
    weight1optFLOAT1.00-1–3IPAdapterSimple weight for keyword 1.
    weight_type1optCOMBOprompt is more importantIPAdapterSimple weight_type for keyword 1.
    preset_faceid1optCOMBOFACEID PLUS V2IPAdapterUnifiedLoaderFaceID preset for keyword 1.
    lora_strength1optFLOAT0.600–1FaceID LoRA strength for keyword 1.
    weight_faceid1optFLOAT1.00-1–3IPAdapterFaceID weight for keyword 1.
    weight_faceidv21optFLOAT1.00-1–5IPAdapterFaceID weight_faceidv2 for keyword 1.
    weight_type_faceid1optCOMBOlinearIPAdapterFaceID weight_type for keyword 1.
    keyword2optSTRINGKeyword 2 to match against the reference phrase. Matched as a substring. Comma-separated to allow multiple keywords on this row (any one matching activates it).
    preset2optCOMBOPLUS FACE (portraits)IPAdapterUnifiedLoader preset for keyword 2.
    weight2optFLOAT1.00-1–3IPAdapterSimple weight for keyword 2.
    weight_type2optCOMBOprompt is more importantIPAdapterSimple weight_type for keyword 2.
    preset_faceid2optCOMBOFACEID PLUS V2IPAdapterUnifiedLoaderFaceID preset for keyword 2.
    lora_strength2optFLOAT0.600–1FaceID LoRA strength for keyword 2.
    weight_faceid2optFLOAT1.00-1–3IPAdapterFaceID weight for keyword 2.
    weight_faceidv22optFLOAT1.00-1–5IPAdapterFaceID weight_faceidv2 for keyword 2.
    weight_type_faceid2optCOMBOlinearIPAdapterFaceID weight_type for keyword 2.
    keyword3optSTRINGKeyword 3 to match against the reference phrase. Matched as a substring. Comma-separated to allow multiple keywords on this row (any one matching activates it).
    preset3optCOMBOPLUS FACE (portraits)IPAdapterUnifiedLoader preset for keyword 3.
    weight3optFLOAT1.00-1–3IPAdapterSimple weight for keyword 3.
    weight_type3optCOMBOprompt is more importantIPAdapterSimple weight_type for keyword 3.
    preset_faceid3optCOMBOFACEID PLUS V2IPAdapterUnifiedLoaderFaceID preset for keyword 3.
    lora_strength3optFLOAT0.600–1FaceID LoRA strength for keyword 3.
    weight_faceid3optFLOAT1.00-1–3IPAdapterFaceID weight for keyword 3.
    weight_faceidv23optFLOAT1.00-1–5IPAdapterFaceID weight_faceidv2 for keyword 3.
    weight_type_faceid3optCOMBOlinearIPAdapterFaceID weight_type for keyword 3.
    keyword4optSTRINGKeyword 4 to match against the reference phrase. Matched as a substring. Comma-separated to allow multiple keywords on this row (any one matching activates it).
    preset4optCOMBOPLUS FACE (portraits)IPAdapterUnifiedLoader preset for keyword 4.
    weight4optFLOAT1.00-1–3IPAdapterSimple weight for keyword 4.
    weight_type4optCOMBOprompt is more importantIPAdapterSimple weight_type for keyword 4.
    preset_faceid4optCOMBOFACEID PLUS V2IPAdapterUnifiedLoaderFaceID preset for keyword 4.
    lora_strength4optFLOAT0.600–1FaceID LoRA strength for keyword 4.
    weight_faceid4optFLOAT1.00-1–3IPAdapterFaceID weight for keyword 4.
    weight_faceidv24optFLOAT1.00-1–5IPAdapterFaceID weight_faceidv2 for keyword 4.
    weight_type_faceid4optCOMBOlinearIPAdapterFaceID weight_type for keyword 4.
    keyword5optSTRINGKeyword 5 to match against the reference phrase. Matched as a substring. Comma-separated to allow multiple keywords on this row (any one matching activates it).
    preset5optCOMBOPLUS FACE (portraits)IPAdapterUnifiedLoader preset for keyword 5.
    weight5optFLOAT1.00-1–3IPAdapterSimple weight for keyword 5.
    weight_type5optCOMBOprompt is more importantIPAdapterSimple weight_type for keyword 5.
    preset_faceid5optCOMBOFACEID PLUS V2IPAdapterUnifiedLoaderFaceID preset for keyword 5.
    lora_strength5optFLOAT0.600–1FaceID LoRA strength for keyword 5.
    weight_faceid5optFLOAT1.00-1–3IPAdapterFaceID weight for keyword 5.
    weight_faceidv25optFLOAT1.00-1–5IPAdapterFaceID weight_faceidv2 for keyword 5.
    weight_type_faceid5optCOMBOlinearIPAdapterFaceID weight_type for keyword 5.
    keyword6optSTRINGKeyword 6 to match against the reference phrase. Matched as a substring. Comma-separated to allow multiple keywords on this row (any one matching activates it).
    preset6optCOMBOPLUS FACE (portraits)IPAdapterUnifiedLoader preset for keyword 6.
    weight6optFLOAT1.00-1–3IPAdapterSimple weight for keyword 6.
    weight_type6optCOMBOprompt is more importantIPAdapterSimple weight_type for keyword 6.
    preset_faceid6optCOMBOFACEID PLUS V2IPAdapterUnifiedLoaderFaceID preset for keyword 6.
    lora_strength6optFLOAT0.600–1FaceID LoRA strength for keyword 6.
    weight_faceid6optFLOAT1.00-1–3IPAdapterFaceID weight for keyword 6.
    weight_faceidv26optFLOAT1.00-1–5IPAdapterFaceID weight_faceidv2 for keyword 6.
    weight_type_faceid6optCOMBOlinearIPAdapterFaceID weight_type for keyword 6.

    Outputs (12)

    NameTypeDescription
    presetLIGHT - SD1.5 only (low strength),STANDARD (medium strength),VIT-G (medium strength),PLUS (high strength),PLUS FACE (portraits),FULL FACE - SD1.5 only (portraits stronger)
    weightFLOAT
    weight_typestandard,prompt is more important,style transfer
    preset_faceidFACEID,FACEID PLUS - SD1.5 only,FACEID PLUS V2,FACEID PORTRAIT (style transfer),FACEID PORTRAIT UNNORM - SDXL only (strong)
    lora_strengthFLOAT
    weight_faceidFLOAT
    weight_faceidv2FLOAT
    weight_type_faceidlinear,ease in,ease out,ease in-out,reverse in-out,weak input,weak output,weak middle,strong middle,style transfer,composition,strong style transfer
    matched_keywordSTRING
    matched_indexINT
    settings_textSTRING
    preset_numberSTRING