Nodes/Kyusu Nodes/Prompt Appender
ComfyUI Node

Prompt Appender

The Append Node That Builds Upward

By TaIIo4KuH·Created 4 months ago·Updated 4 months ago· 0
Prompt Appender
    • prefix
    ◄text►
    ◄prefix—►
    ◄separator, ►

    Most prompt builders shove everything into one giant text box and call it a day. Prompt Appender takes the opposite approach: one node holds one chunk of prompt, and you chain several of them together to assemble the final text in stages. It's the string-combiner you'd write by hand if you were building prompts programmatically - only it's a node, and it's designed to be daisy-chained.

    The tell is in the output name: the single STRING output is literally called prefix. That's deliberate. Wire one Appender's output into the next one's prefix input and it slots right in, because that's the name the pack expects on the receiving end. Chain a quality block, a subject block, a style block, and a negative wrapper - each its own node, each editable in isolation - and the last one in the line carries the full prompt to your encoder.

    How the join actually behaves

    The source's _smart_join is worth knowing, because it does two things people usually do by hand:

    • It strips leading/trailing whitespace off both sides, and if either side is empty it returns the other - so an unconnected prefix or an empty text box doesn't produce a dangling , .
    • If the prefix ends with a comma or semicolon, the separator collapses to a plain space. So "masterpiece, best quality," + separator ", " + "1girl" gives you "masterpiece, best quality, 1girl", not a double comma. The author clearly got tired of cleaning up their own joins.

    After joining, it runs a regex that collapses runs of spaces and tabs into single spaces, so pasted multiline text doesn't leave giant gaps in the output.

    Inputs and output

    • text (required) - this node's own prompt chunk, multiline, appended after the prefix. Default empty.
    • prefix (optional) - the incoming string from an upstream Appender (or anything else), placed before text.
    • separator (optional) - what goes between them. Default ", ", and you can set it to " " or "\n" for sentence-style or block-structured prompts.
    • prefix output - the joined result, named so it feeds the next Appender in the chain.

    Category: Kyusu/prompt.

    Install

    Pure Python, zero dependencies:

    cd ComfyUI/custom_nodes
    git clone https://github.com/TaIIo4KuH/kyusu-nodes
    

    or ComfyUI Manager → "Kyusu Nodes", then restart.

    Notes and gotchas

    This node has no comment syntax and no section logic - it's a pure joiner. If you want commented-out variants inside a chunk, that's the pack's Prompt Commenter; if you want both, there's literally a node for that too (Prompt UltimaCHA, the Appender and Commenter fused). Where Appender stands alone: modular prompt assembly. The one thing to watch is that every chain link is a separate node to update - a three-appender prompt means three places to edit, which is the point when you're varying one block at a time and the enemy when you just want to tweak a single word.

    CategoryKyusu/prompt

    Inputs (3)

    NameTypeDefaultDescription
    textSTRINGThis node's prompt text. Appended AFTER the prefix.
    prefixoptSTRINGIncoming string. Appears BEFORE this node's text.
    separatoroptSTRING, What to put between prefix and text. Default: ', '

    Outputs (1)

    NameTypeDescription
    prefixSTRING—