Nodes/AUN ComfyUI Nodes/Add-To-Prompt
ComfyUI Node

Add-To-Prompt

Stick a style tag on the front or back, sometimes, at random

By loz2754·Created 8 months ago·Updated about 21 hours ago· 5
Add-To-Prompt
    • STRING
    text_to_add
    delimiter,
    orderprompt_first
    modeon
    prompt

    You know those chunks of prompt you paste onto every generation - the quality tags, the style suffix, the "masterpiece, best quality" preamble? AUNAddToPrompt is the node that automates the pasting. You give it a block of text, tell it where to put it and when, and it hands back a finished prompt string you can feed straight into a CLIP Text Encode node.

    The inputs that matter are few, which is the appeal. text_to_add is your multiline text, and it accepts dynamic prompts, so you can drop wildcard syntax in there and have it resolve per-run. order decides whether your text goes before the main prompt (prompt_first, the default, which puts the main prompt first) or after it (text_first). delimiter is the joiner - default , - and you can change it if you're building tags with + or _ instead. Then mode gives you the three-way switch that's the pack's signature: on always adds, off never adds, and random rolls a 50/50 each run.

    The optional prompt input is where your main prompt flows in from another node. Here's the thing a lot of people get backwards: if you leave prompt unconnected, the node treats it as empty and you just get your text_to_add back, possibly reordered. The node is a string builder, not a prompt generator - nothing goes in, nothing meaningful comes out.

    Wire it like this: a prompt-cycling or text-index node feeds the base prompt into prompt, AUNAddToPrompt splices your style block in, and the STRING output goes to CLIP Text Encode. Because mode re-evaluates per run, you get a neat experiment: same seeds, same model, half the batch with a tag like "bokeh" attached and half without, and you can actually tell what the tag is doing instead of guessing from vibes.

    One behind-the-scenes nicety worth knowing: the node also records its settings into the workflow's PNG info under aun_pginfo, which the pack's filename and sidecar nodes read back - so when you save an image, the filename can show exactly which addon text was applied and in what mode. That's the AUN ecosystem working as intended.

    It's from the AUN pack: ComfyUI Manager (search "AUN") or cd ComfyUI/custom_nodes && git clone https://github.com/loz2754/AUN-ComfyUI-Nodes, then restart. No models, dependency-light (piexif, opencv-python-headless, imageio-ffmpeg, requests). If you want more than one switchable addon, the pack's sibling Add-To-Prompt (Multi) is the upgrade path - up to ten of these, each with its own mode and position.

    CategoryAUN Nodes/Prompts

    Inputs (5)

    NameTypeDefaultDescription
    text_to_addSTRINGText to add to the prompt. Accepts dynamic prompts.
    delimiterSTRING, Delimiter to use between the prompt and the text to add.
    orderCOMBOprompt_firstOrder to use when adding the text to the prompt.
    modeCOMBOonMode to use when adding the text to the prompt - on = always add, off = never add, random = 50/50 chance
    promptoptSTRINGOptional prompt to add to the prompt.

    Outputs (1)

    NameTypeDescription
    STRINGSTRING