Nodes/Prompt Palette-F/Prompt Palette-F
ComfyUI Node

Prompt Palette-F

Toggle phrases, tweak weights, kill the A/B pain

By id-fa·Created about a year ago·Updated 8 days ago· 2
Prompt Palette-F
    • text
    • selected_text
    • selected_list
    text
    separator,
    trailing_separatorfalse
    separator_newlinefalse
    add_newlinefalse
    prefix_separatorfalse
    empty_when_no_selectionfalse
    preview_override
    prefix

    Every serious ComfyUI user hits the same wall: your prompt is twenty lines, and you want to know which three of them are actually doing the work. The normal answer is to keep muting chunks, or copy a prompt to a scratch text node and edit it every time you want to test. Prompt Palette-F is the flagship node of the PromptPalette-F pack, and it turns that chore into clicking checkboxes. You type each phrase on its own line, and the node shows them as a toggle list - check a box, the phrase goes into the output. Uncheck it, gone. That's the whole loop, and it's surprisingly addictive once you've lived with it for a week.

    The pack is a small, personal project by a Japanese developer who blogs about building ComfyUI nodes with Claude Code. Don't let the "0 impressions" on the search page fool you - it's not a popularity contest, it's one person shipping what they use. The README is bilingual, the install is trivial, and the node itself is genuinely well thought out.

    How it works

    Hit the Edit button and you get a text box with one phrase per line. Save, and each line becomes a row with a checkbox. Three bits of syntax do most of the work:

    • Lines starting with // start off - a toggle comment, handy for "maybe later" phrases.
    • Lines starting with # are description comments, shown above the next phrase so your prompt doesn't turn into unreadable soup.
    • Adding [groupname] at the end of a line groups phrases; group buttons at the top of the node toggle a whole group at once. Escape literal brackets as \[ \].

    The +/- buttons adjust a phrase's weight, with one honest limitation: only the first word gets the weight boost (the README says so plainly). So it's great for (masterpiece:1.2)-style single-word emphasis, not for weighting a whole clause.

    The inputs and outputs that matter

    You mostly touch three settings plus one optional input:

    • text - your phrases, one per line. This is the one you actually edit.
    • separator - what joins the selected phrases (default , ). Set to empty for no separator, flip separator_newline to get one phrase per line.
    • prefix - text prepended to the whole result, built for chaining multiple palette nodes together. prefix_separator (default off) controls whether a separator goes between prefix and body.

    The three outputs are worth knowing because they behave differently:

    • text - the joined, ready-to-encode prompt. Feed this straight into a CLIP Text Encode.
    • selected_text - selected phrases joined with newlines, ignoring separator and prefix. Raw.
    • selected_list - the same, as a list, which pairs nicely with the pack's Get First Word (List) node.

    One genuinely clever toggle: empty_when_no_selection. When nothing is selected, all three outputs become Python None instead of an empty string. That's the exact value rgthree's Any Switch checks for, so you can route "nothing selected → use this fallback prompt" entirely in the graph. The flip side: any node downstream that doesn't handle None will error, so only switch it on when you know what's eating the output.

    Installing it

    ComfyUI Manager, search "Prompt Palette-F" (the README notes Manager may hand you a slightly older version - fine for the basics), or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/id-fa/ComfyUI-PromptPalette-F prompt-palette-f
    cd prompt-palette-f
    pip install -r requirements.txt
    

    Then restart ComfyUI. The only Python dependency in the whole pack is googletrans, and that's only used by the translate node - the palette itself is pure Python plus a bit of frontend JS, so it's one of the lighter packs you'll install.

    Where people get burned

    The two things that trip everyone up: weights only apply to the first word (set expectations before you try to weight a whole phrase), and the text output is a different string from selected_text - if you're debugging why your prompt looks different than your checkboxes, you're probably reading the wrong output. Otherwise the biggest surprise is how much faster prompt iteration gets. Once you stop editing text and start toggling checkboxes, you'll wonder why every prompt node isn't built this way.

    CategoryPrompt Palette-F

    Inputs (9)

    NameTypeDefaultDescription
    textSTRING
    separatorSTRING,
    trailing_separatorBOOLEANfalse
    separator_newlineBOOLEANfalse
    add_newlineBOOLEANfalse
    prefix_separatorBOOLEANfalse
    empty_when_no_selectionBOOLEANfalse
    preview_overrideoptSTRING
    prefixoptSTRING

    Outputs (3)

    NameTypeDescription
    textSTRING
    selected_textSTRING
    selected_listSTRING