Nodes/ComfyUI-LumaAI-API/CharacterReference
ComfyUI Node

CharacterReference

Keep a character recognizable — up to four URLs become an identity

By lumalabs·Created 2 years ago·Updated about a year ago· 213
CharacterReference
    • character_reference
    character_image_url_1
    character_image_url_2
    character_image_url_3
    character_image_url_4

    Character consistency is the most-cited unsolved problem in AI image generation - the model nails a face once and produces someone entirely different next time, because every generation starts from nothing and has no memory. Luma's hosted answer is CharacterReference: feed it up to four image URLs of the same character and it builds a CHARACTER_REFERENCE object that LumaImageGeneration passes to Photon as an identity condition. Instead of hoping a prompt keeps the face stable, you hand the model actual views of the character and say "this person, specifically."

    It's the closest thing in this pack to the local identity-preservation stack (IP-Adapter FaceID, PuLID, character LoRAs) - same goal, completely different mechanism, since everything runs on Luma's servers rather than your GPU. And consistent with how those local tools behave, the honest expectation is "more consistent than prompting alone," not "pixel-perfect." Multi-view references get you into the ballpark where a single image or a lucky prompt can't.

    How it works

    The node is all optional inputs: character_image_url_1 through character_image_url_4, each a plain image URL string. Internally it builds {"identity0": {"images": [urls]}} - which is exactly the shape the API's character_ref expects - and outputs it as character_reference. Give it nothing and it raises "You must provide at least one character image URL." It does no networking itself; it just packages URLs for the API call that happens downstream in LumaImageGeneration (wired into that node's character_ref input).

    The inputs are strings, not Reference objects - that's the one easy mix-up. CharacterReference takes raw URLs, while Reference/ConcatReferences package URLs into typed objects. Keep them separate or nothing connects.

    Tips that actually move the needle

    • Use all four slots with genuinely different views - front, side, and a couple of angles in different lighting. The whole point is giving the model enough views to pin down identity instead of a single lucky angle. The char_ref.json example workflow shows the pattern.
    • Same character in every slot. This node is not a collage tool; mixing different people dilutes the identity into mush.
    • Hosted URLs required, same as everything in this pack - local images go through LoadImage → ImgBBUpload before their URLs land here.

    Installing

    Ships with the official pack: ComfyUI Manager → search "ComfyUI-LumaAI-API", or git clone https://github.com/lumalabs/ComfyUI-LumaAI-API into ComfyUI/custom_nodes and pip install -r requirements.txt. Light deps (lumaai, requests, numpy, Pillow), no local models, no key needed in this node (the LumaAIClient upstream handles that).

    Common issues

    • "You must provide at least one character image URL" - all four inputs are empty. Wire in at least one; ideally all four.
    • The character comes out unrecognizable - you fed it one awkwardly-lit photo, or the URLs aren't all the same person. Add views, fix lighting, retry. This is the same failure mode the local tools hit - identity preservation needs good reference material to work from.
    • Nothing connects to the generation node - you wired Reference outputs into character_ref by mistake. character_ref wants a CHARACTER_REFERENCE, which only this node produces.

    If you're serious about a recurring character, pair this with a light prompt that names the character's traits ("red-haired woman in a green jacket") - the identity condition does the heavy lifting, and the prompt keeps the outfit and scene on track. Alone, either one will drift; together they're the pack's best shot at a consistent face.

    CategoryLumaAI/Photon

    Inputs (4)

    NameTypeDefaultDescription
    character_image_url_1optSTRING
    character_image_url_2optSTRING
    character_image_url_3optSTRING
    character_image_url_4optSTRING

    Outputs (1)

    NameTypeDescription
    character_referenceCHARACTER_REFERENCE