Nodes/ComfyUI-JNodes/Prompt Builder Single Subject
ComfyUI Node

Prompt Builder Single Subject

Structured fields instead of one giant prompt box

By JaredTherriault·Created 3 years ago·Updated about a month ago· 91
Prompt Builder Single Subject
    • STRING
    subject
    hair
    clothing
    actions
    extras
    network_definitions_and_triggers

    Anyone who's maintained a long portrait or character prompt knows the problem: it turns into one wall of comma-separated text, and finding "the clothing description" three edits later means hunting through a paragraph. This node just splits that wall into labeled fields - subject, hair, clothing, actions, extras, and network_definitions_and_triggers - and concatenates them back into a single prompt string for you. It's not doing anything clever with the text itself; the value is purely organizational, the same reasoning that's pushed a lot of prompting toward writing in structured blocks rather than one undifferentiated tag soup.

    The last field is worth calling out on its own: network_definitions_and_triggers is clearly meant to hold your <lora:name:weight> tags and any trigger words a lora or embedding needs, kept in their own box instead of tangled up with your actual subject description. That's a genuinely useful separation - trigger words are typically decorative filler you never want to actually read as prose, and keeping them isolated means you can find and swap them without scrolling through your subject description first.

    How it works

    Fill in whichever fields apply - none of them are required to contain anything, they're just multiline text boxes - and the node joins them into one STRING output in the order they're defined: subject, hair, clothing, actions, extras, then network definitions and triggers. Wire that single output into your CLIP Text Encode like any other prompt string. If a field is empty, you're not left with an awkward double comma or a stray blank line breaking your prompt - an empty box simply contributes nothing.

    The inputs and outputs

    • subject (STRING, multiline) - who or what the image is of.
    • hair (STRING, multiline) - hair description.
    • clothing (STRING, multiline) - outfit/clothing description.
    • actions (STRING, multiline) - pose or action description.
    • extras (STRING, multiline) - anything else - setting, lighting, style modifiers.
    • network_definitions_and_triggers (STRING, multiline) - lora tags and trigger words, kept separate.
    • STRING output - all six fields joined into one prompt.

    How to install it

    Via ComfyUI Manager: Install Custom Nodes, search "JNodes", install, restart. Or by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JaredTherriault/ComfyUI-JNodes
    pip install -r ComfyUI-JNodes/requirements.txt
    

    then restart ComfyUI. No model downloads - it's pure text assembly.

    Common issues & troubleshooting

    Only good for one subject at a time. The name isn't decoration - this node has no concept of a second character. If you're doing a two-subject scene, you'll need either two of these nodes feeding a merge step, or a different approach entirely; don't expect this to somehow keep two people's hair and clothing straight in one instance.

    The field order is fixed. If you wanted, say, extras describing lighting to come before subject in the final string, you can't reorder it here - you'd need to route around the node with your own string-join logic instead. Treat the field order as a template you write into, not a layout you control.

    Trigger words still need to actually match the lora. Putting text in network_definitions_and_triggers doesn't validate anything - if you misspell a trigger word or forget one a lora needs, this node has no way to catch that. Double-check trigger words against the model's own page, the same as you would anywhere else.

    Empty result if you never touched the fields. All six default to blank, so if you drop this node in and wire it straight to your encoder without filling anything in, you'll get an empty prompt and a confusing "why is nothing generating" moment.

    Categorysd

    Inputs (6)

    NameTypeDefaultDescription
    subjectSTRING
    hairSTRING
    clothingSTRING
    actionsSTRING
    extrasSTRING
    network_definitions_and_triggersSTRING

    Outputs (1)

    NameTypeDescription
    STRINGSTRING