Nodes/Kyusu Nodes/Prompt UltimaCHA
ComfyUI Node

Prompt UltimaCHA

Commented Variants That Still Chain Upstream

By TaIIo4KuH·Created 4 months ago·Updated 4 months ago· 0
Prompt UltimaCHA
    • prefix
    ◄text1girl, long hair, # open eyes, blue eyes, closed eyes, [face] sharp features # [extras] detailed background►
    ◄prefix—►
    ◄separator, ►

    The name is pure bravado for what is, under the hood, two nodes taped together. Prompt UltimaCHA is the pack's Prompt Commenter and Prompt Appender fused into one: you get the multiline box with comment syntax and the upstream prefix input for chaining, in a single node. If you've read the other two, you already know everything it does - the interesting part is the order it does it in.

    The source spells out the pipeline, and the order matters:

    1. Strip comments from text - the text field runs through the same comment engine as Prompt Commenter: #, //, and ` comment out a line, /* */ blocks get removed, [name] headers mark sections, and # [name] / ` [name] skips a whole section. Survivors get flattened to comma-joined tags.
    2. Join the upstream prefix in - after cleaning, the prefix is prepended with the smart-join logic from the Appender: whitespace stripped, separator skipped if either side is empty, and a prefix ending in a comma or semicolon collapses the separator to a space so you don't get double commas.
    3. Tidy whitespace - runs of spaces and tabs collapse to single spaces.

    So it's comment-first, then chain. Which leads to the one subtlety worth remembering:

    Only text gets comment treatment. A wired-in prefix is inserted raw - comments inside the prefix are not stripped, and its section headers aren't honored. If you want comment syntax to apply to everything, run the whole prompt through the text box and leave prefix for clean, final string chunks.

    Why the output is called "prefix"

    Same trick as the Appender: the single STRING output is named prefix so it plugs straight into the next UltimaCHA's (or Appender's) prefix input. You can chain several of these - an upstream one carrying the quality block, this one holding the commented variant set, another downstream adding the style tail - and the whole line stays wire-compatible.

    Inputs and output

    • text (required) - the commented prompt body, multiline. This is where variants and comment markers live.
    • prefix (optional) - incoming string, prepended raw before text is joined in.
    • separator (optional) - joiner between prefix and text, default ", ".
    • prefix output - the cleaned, joined result.

    Category: Kyusu/prompt.

    Install

    Pure Python, no dependencies, no models:

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

    or ComfyUI Manager → "Kyusu Nodes", restart.

    When to use it vs. the other two

    If you just chain prompt chunks, Prompt Appender is simpler. If you just keep commented variants in one box, Prompt Commenter is enough. UltimaCHA is for the middle ground - you want commented variants and you're assembling the prompt from staged pieces. The honest caveats carry over from the Commenter: the flattening to comma-joined tags suits SDXL-lineage tag prompting far better than the sentence-style, block-structured prompts that LLM-encoded models (Z-Image, Anima, Klein) prefer. Keep it in the tag-model lane and it's a tidy little workhorse.

    CategoryKyusu/prompt

    Inputs (3)

    NameTypeDefaultDescription
    textSTRING1girl, long hair, # open eyes, blue eyes, closed eyes, [face] sharp features # [extras] detailed backgroundThis node's prompt text. Comments supported: # tag -> line ignored // tag -> line ignored ` tag -> line ignored /* tag */ -> block ignored [name] -> section header # [name] -> whole section skipped ` [name] -> whole section skipped If a `prefix` is connected, it is prepended BEFORE this text is processed.
    prefixoptSTRINGIncoming string. Appears BEFORE this node's text.
    separatoroptSTRING, What to put between prefix and text. Default: ', '

    Outputs (1)

    NameTypeDescription
    prefixSTRING—