Nodes/AutoExpress/AutoExpress Expression Prompts
ComfyUI Node

AutoExpress Expression Prompts

28 faces out of one image, and no loop nodes anywhere

By deepratna-awale·Created 3 years ago·Updated about 2 hours ago· 27
AutoExpress Expression Prompts
    • prompts
    • names
    • negative
    • count
    ◄prompt_styleauto►
    ◄base_prompt►
    ◄base_negative►
    ◄expressionsall►
    ◄ckpt_name▾►
    ◄lora_trigger—►
    ◄intensity-1.00►

    What it is

    This is the engine of the whole pack. You give it a character prompt and it hands back a list of prompts - one per facial expression, in the right dialect for your checkpoint - plus a matching negative. Wire the list into a FaceDetailer and ComfyUI runs that detailer once per expression, on its own, with no loop node, no batch counter, no for loop in sight.

    If you've ever built this by hand you know why it matters. The r/civitai version of this workflow is a person inpainting a face eight times, changing "happy" to "sad" in the prompt between runs, and then layering the results in Photoshop. The KB is full of that thread. AutoExpress is the same idea with the tedious part removed: one queue, 28 files, named after their emotion.

    How it works

    Four steps, and none of them are magic.

    Pick the family. prompt_style: auto reads the checkpoint filename and matches it against a pattern list - Pony first, then Illustrious/NoobAI, then the natural-language family (Flux, SD3, Qwen, Chroma, HiDream, Lumina), then furry names, then anime names. Each family is a JSON file under autoexpress_core/resources/expressions/, so the right prompt for joy differs by family: Danbooru tags on anime models, score_ quality tags on Pony merges, a full English sentence on Flux.

    Add the quality tags - only if they're missing. Pony's score_9, score_8_up, score_7_up, Danbooru's masterpiece, best quality, Illustrious's amazing quality. If your base prompt already contains them, they aren't duplicated. Same story for the negative: the family's negative tags get appended to base_negative only where they're absent.

    Join the pieces. lora_trigger + base_prompt, then the expression prompt, all comma-joined. The LoRA trigger going before your character description is deliberate and matches how people normally write LoRA prompts.

    Weight the expression by intensity. At 0.5 (the classic strength) the expression prompt is left alone. Below that the whole expression block is wrapped in a ComfyUI emphasis weight, down to 0.6 at intensity 0; above it, up to 1.4. Nested weights are stripped first - otherwise the SDXL family's own (angry expression:1.4) would multiply against your 0.8 and you'd get something neither of you asked for. Natural-language families ignore emphasis syntax, so intensity becomes a plain-language hint instead: The expression is slight and subtle.

    Inputs and outputs

    Set these:

    • base_prompt - your character. Hair, outfit, art style, whatever makes the character that character. It's pasted before every expression.
    • expressions - all, or a comma-separated subset like joy, anger, surprise. Case-insensitive.
    • base_negative - your usual negative. This is what you'd otherwise have typed into the negative CLIP encode.
    • prompt_style - leave on auto unless your checkpoint's filename lies.

    Optional: ckpt_name (only consulted for auto), lora_trigger (wire it from Expression LoRAs - the trigger words need to be in the prompt), and intensity (-1 = family default; 0.5 drawn, 0.07 realistic).

    Outputs, all four of which you'll use:

    • prompts (a list) → FaceDetailer's wildcard input. This is the wire that makes the batch happen.
    • names (a list) → Save Expressions and Sprite Sheet, in the same order as the prompts.
    • negative → a CLIP Text Encode → FaceDetailer's negative.
    • count → how many expressions you asked for. Handy as a sanity check when a run finishes suspiciously fast.

    The failure mode nobody warns you about

    expressions is a filter, not a validator. Type joy, annger, surprise and you get two images, a finished queue and absolutely no error, because annger matches nothing. You only see the exception - No expressions matched '…'. Valid names: … - when nothing matches. So if you asked for twelve and got nine, check your spelling first. The names are: admiration, amusement, anger, annoyance, approval, caring, confusion, curiosity, desire, disappointment, disapproval, disgust, embarrassment, excitement, fear, gratitude, grief, joy, love, nervousness, neutral, optimism, pride, realization, relief, remorse, sadness, surprise.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/deepratna-awale/AutoExpress
    

    Or ComfyUI Manager → search AutoExpress, or comfy node install autoexpress. Restart.

    For the FaceDetailer route you also need Impact Pack and Impact Subpack - the detector provider moved into Subpack at v8.0 and isn't pulled in automatically. The pack ships ready-made graphs (SD1.5 anime, SDXL, Pony, Illustrious/NoobAI, Flux) that show up in Workflow → Browse Templates after install; start from those rather than wiring FaceDetailer yourself. Their settings are a decent baseline: denoise 0.5 for SD1.5/SDXL, 0.55 for Pony and Illustrious, ~30 steps.

    Ignore install.sh in the repo root. It's the standalone web app's installer and begins with a sudo apt upgrade of your whole system.

    Practical notes

    Don't run all 28 first. Run neutral, joy, anger, surprise and look at them. If the faces drift in style, your denoise is too high - the KB's rule of thumb for expression changes is 0.3–0.6, and the pack's own 0.5 sits at the top of that. If the expressions are barely there, it's usually the missing lora_trigger wire - and on Flux it's just the model: the pack's own docs admit Flux keeps a clean face but gives milder expressions than the SDXL-based families.

    CategoryAutoExpress

    Inputs (7)

    NameTypeDefaultDescription
    prompt_styleCOMBOautoModel family the prompts are written for. 'auto' picks it from ckpt_name.
    base_promptSTRINGCharacter prompt placed before every expression prompt.
    base_negativeSTRING—
    expressionsSTRINGall'all', or a comma separated list such as: joy, anger, surprise
    ckpt_nameoptCOMBOOnly used to pick the prompt style when it is 'auto'.
    lora_triggeroptSTRINGTrigger words from AutoExpress Expression LoRAs.
    intensityoptFLOAT-1.00-1–1How strong the expression is, 0 (barely) to 1 (exaggerated). -1 uses the model family's default: 0.5 for anime and furry models, much lower for realistic ones, where strong expressions look uncanny.

    Outputs (4)

    NameTypeDescription
    promptsSTRINGOne prompt per expression. Connect to FaceDetailer's wildcard input.
    namesSTRINGExpression names, in the same order as the prompts.
    negativeSTRINGNegative prompt with the family's negative tags added.
    countINTNumber of expressions.