Nodes/ComfyUI-GadgetNodes/Analyze Prompt
ComfyUI Node

Analyze Prompt

Emoji in, workflow decisions out

By 2daadv·Created 6 months ago·Updated 21 days ago· 1
Analyze Prompt
    • prompt
    • facedetailer_enabled
    • handrefiner_enabled
    prompt

    Here's a workflow-automation trick that's genuinely fun: put in your prompt when you want a face detailer to run, and when you want a hand refiner - and let a node translate those emoji into actual workflow decisions. That's the entire personality of Analyze Prompt. It takes a prompt, looks for those two characters, strips them out of the text, and sets a pair of booleans the rest of your graph can branch on.

    Input: one required prompt (STRING). Outputs:

    • prompt - the cleaned text, emoji removed.
    • facedetailer_enabled - true if the prompt contained .
    • handrefiner_enabled - true if the prompt contained .

    The mechanism is exactly what the README says, no more: a literal string check. in the prompt → facedetailer flag on and the character removed; → handrefiner flag on and removed. Then a second, separate rule kicks in for NSFW cues: if the prompt contains certain explicit terms (nude, sex, masturbation, and friends), the node appends , explicit and , uncensored unless they're already present. Wire the two booleans into a switch or gated branch and you've got prompt-driven detailing: type , the face detailer runs; leave it out, it doesn't.

    Where this shines and where it's just silly:

    • The good use: batch prompting with a character that's a cheap, portable instruction. You're generating 200 prompts; you want faces fixed on the portrait-ish ones and not on the wide shots. Encoding that intent as a character in the prompt is the kind of thing that makes a batch workflow feel alive. And the NSFW auto-tagging is aimed at uncensored-model prompt hygiene - get the explicit markers in before the model's own heuristics guess wrong.
    • The reality check: the emoji are a private convention of this one pack, and the matching is blunt. sets the face flag no matter the context, and the NSFW detection is a fixed list of English terms matched as whole tags. It won't catch paraphrases, it won't catch Japanese prompts, and it appends explicit, uncensored even if you're on a model that doesn't want them. Treat the NSFW rule as a habit, not a guarantee.

    It's part of 2daadv's ComfyUI-GadgetNodes Gadget/prompt family (MIT, one developer, brand-new pack with no community reputation). Install via ComfyUI Manager (search "GadgetNodes") or clone + pip install -r requirements.txt + restart. It's pure Python with no frontend extension, so it runs identically on the legacy canvas and Nodes 2.0 - the flags are just outputs you wire, not UI magic.

    One warning that applies to the whole emoji approach: the flags only do something if the downstream graph actually uses them. This node emits decisions; you still have to connect facedetailer_enabled to a switch that gates an Impact-Pack-style detailer. Skip that wiring and you've got a node that removes an emoji from your prompt and nothing else.

    CategoryGadget/prompt

    Inputs (1)

    NameTypeDefaultDescription
    promptSTRING

    Outputs (3)

    NameTypeDescription
    promptSTRING
    facedetailer_enabledBOOLEAN
    handrefiner_enabledBOOLEAN