Nodes/Artha-Gemini/πŸ”± Gemini Face
ComfyUI Node

πŸ”± Gemini Face

19 dropdowns for every feature, or let Gemini read a photo

By CyrostarΒ·Created about a year agoΒ·Updated about a year agoΒ· 1
πŸ”± Gemini Face
    • face
    β—„head_typeNONEβ–Ί
    β—„hair_colorNONEβ–Ί
    β—„hair_lengthNONEβ–Ί
    β—„hair_style_femNONEβ–Ί
    β—„hair_style_masNONEβ–Ί
    β—„face_appealNONEβ–Ί
    β—„face_ageNONEβ–Ί
    β—„face_shapeNONEβ–Ί
    β—„face_eyebrow_typeNONEβ–Ί
    β—„face_eyebrow_shapeNONEβ–Ί
    β—„face_eye_typeNONEβ–Ί
    β—„face_eye_sizeNONEβ–Ί
    β—„face_eye_colorNONEβ–Ί
    β—„face_nose_typeNONEβ–Ί
    β—„face_lip_typeNONEβ–Ί
    β—„face_lip_colorNONEβ–Ί
    β—„face_ear_typeNONEβ–Ί
    β—„face_cheek_typeNONEβ–Ί
    β—„face_chin_typeNONEβ–Ί
    β—„api_keyβ–Ί
    β—„modelgemini-2.5-flashβ–Ί
    β—„max_tokens5000β–Ί
    β—„temperature0.7β–Ί
    β—„randomizefalseβ–Ί
    β—„use_imagefalseβ–Ί
    β—„imageβ–Ύβ–Ί

    Gemini Face is the node that stops a character's face from being a coin flip. Every other prompt you write describes a face in prose and hopes the sampler agrees; this one breaks the face into 19 dropdowns - head type, hair color and length, eye type and size, nose, lips, cheeks, chin, the works - and hands that list to Gemini to be turned into a precise description. Same idea the LLM-encoder models reward anyway: structured, blocky, unambiguous prompts, except you don't have to compose them by hand. It lives in the πŸ”±-prefixed Artha family from Cyrostar/Artha-Gemini, category Artha/LLM/GEMINI, and it's a building block for the pack's Gemini Portrait node.

    The name overstates a little: "Gemini" is optional. With no image connected, this node never calls the API at all. Pick your values, leave everything else on NONE (the default for every field), and it assembles a Python dict of your selections and pushes it out its face output - free, instant, offline. Flip randomize on and it fills every field with a random pick from the valid options, which is a fun way to spin up a face for a character you don't care about yet.

    Where it earns the Gemini name is use_image. Set that true, pick a file in the image dropdown (or drag one into it - it's an upload widget, not an IMAGE tensor), and the node sends your photo to the Gemini Vision API with a face-analysis agent prompt and gets back a markdown bullet list describing the face it sees. That output is still typed ARTHAFACE, so it wires exactly where the manual dict went. This is the reverse of the usual workflow: instead of describing a face to get an image, you hand it an image and get the description back.

    The inputs that actually matter

    You will not tweak all 19. The pattern is: pick the fields that matter for the character, leave the rest NONE, and the Portrait node downstream ignores the empties. The high-signal ones are face_shape, face_age, face_eye_color, face_lip_type, and the two hair styles - hair_style_fem for feminine characters, hair_style_mas for masculine ones (Portrait drops the one that doesn't match your identity choice).

    The shared controls at the bottom appear on every node in this pack:

    • api_key, model (default gemini-2.5-flash), max_tokens (5000), temperature (0.7) - only used in image mode.
    • randomize - random values for everything, no API call.
    • use_image + image - flip to vision mode.

    Output is a single face wire of type ARTHAFACE. Its only sane destination is the face optional input on Gemini Portrait, which merges it with Body, Form, Makeup and Cloth into one character description.

    Installing it

    It ships inside the Artha-Gemini pack, so install once for all the πŸ”± Gemini nodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Cyrostar/Artha-Gemini
    cd Artha-Gemini
    pip install -r requirements.txt
    

    Then restart ComfyUI. ComfyUI Manager also finds it if you search "Artha-Gemini". The dependencies are light - google-genai, Pillow, numpy, torch, soundfile - no model files to download, but you do need a Gemini API key from Google AI Studio. Only needed for image mode; the dropdown mode is fully offline.

    Where people get burned

    The image input is a file list, not an image socket. Beginners wire a Load Image node into it, get nothing, and assume the node is broken - you have to pick a file from the dropdown or upload one into it. Second gotcha: leave use_image false unless you actually want the vision call, because every run in image mode bills tokens to your key. And if you ever type your key into the api_key field, it's stored in plain text inside the saved workflow - the author's tooltip says as much. Putting it in the pack's api.json (gemini_api_key) or setting GEMINI_API_KEY as an environment variable keeps it out of your PNGs.

    One thing to know: if image mode returns NONE for fields Gemini couldn't confidently identify from the photo, that's by design - the agent prompt tells it to drop anything it can't see. You're left with a partial face spec, which is still a better starting point than a blank canvas.

    CategoryArtha/LLM/GEMINI

    Inputs (26)

    NameTypeDefaultDescription
    head_typeCOMBONONE4 options: NONE, SMALL HEADED, AVERAGE PROPOTION, LARGE HEADED
    hair_colorCOMBONONE13 options: NONE, BLACK, BROWN, DARK BROWN, MEDIUM BROWN, LIGHT BROWN, +7
    hair_lengthCOMBONONE7 options: NONE, BALD, VERY SHORT, SHORT, MEDIUM, LONG, +1
    hair_style_femCOMBONONE29 options: NONE, BALD, STRAIGHT, WAVY, CURLY, COILY, +23
    hair_style_masCOMBONONE28 options: NONE, BALD, STRAIGHT, WAVY, CURLY, COILY, +22
    face_appealCOMBONONE6 options: NONE, VERY ATTRACTIVE, ATTRACTIVE, AVERAGE, BELOW AVERAGE, UNATTRACTIVE
    face_ageCOMBONONE11 options: NONE, BABY, TODDLER, TWEEN, TEEN, EARLY TWENTIES, +5
    face_shapeCOMBONONE8 options: NONE, OVAL, ROUND, SQUARE, OBLONG, HEART, +2
    face_eyebrow_typeCOMBONONE4 options: NONE, THIN, MEDIUM, THICK
    face_eyebrow_shapeCOMBONONE6 options: NONE, ROUND, FLAT, S-SHAPED, HARD ANGLED, SOFT ANGLED
    face_eye_typeCOMBONONE11 options: NONE, ROUND, ALMOND, DROOPY, HOODED, ASIAN, +5
    face_eye_sizeCOMBONONE4 options: NONE, NORMAL, BIG, SMALL
    face_eye_colorCOMBONONE7 options: NONE, BROWN, BLUE, HAZEL, GREEN, GRAY, +1
    face_nose_typeCOMBONONE11 options: NONE, GREEK, ROMAN, BUTTON, SNUB, NUBIAN, +5
    face_lip_typeCOMBONONE8 options: NONE, FULL, WIDE, ROUND, THIN, OVAL SHAPED, +2
    face_lip_colorCOMBONONE11 options: NONE, NATUREL, NUDE BEIGE, NUDE PINK, PEACHY NUDE, SOFT PINK, +5
    face_ear_typeCOMBONONE4 options: NONE, ROUND, OVAL, ELF
    face_cheek_typeCOMBONONE7 options: NONE, HIGH CHEEKBONES, LOW CHEEKBONES, ROUNDED CHEEKS, HOLLOW CHEEKS, CHISELED CHEEKS, +1
    face_chin_typeCOMBONONE3 options: NONE, STRAIGHT, CLEFT
    api_keySTRINGAPI key will be visible in plain text. Consider adding your api to the api.json located inside this custom node folder.
    modelCOMBOgemini-2.5-flash5 options: gemini-2.5-pro, gemini-2.5-flash, gemini-2.5-flash-lite, gemini-2.0-flash, gemini-2.0-flash-lite
    max_tokensINT50001–8192For Gemini models, a token is equivalent to about 4 characters. 100 tokens is equal to about 60-80 English words.
    temperatureFLOAT0.70–2A temperature of 0 means only the most likely tokens are selected, and there's no randomness. Conversely, a high temperature injects a high degree of randomness into the tokens selected by the model, leading to more unexpected, surprising model responses.
    randomizeBOOLEANfalseβ€”
    use_imageBOOLEANfalseβ€”
    imageCOMBO1 options: example.png

    Outputs (1)

    NameTypeDescription
    faceARTHAFACEβ€”