Nodes/Prompt Helpers/Prompt Toggle
ComfyUI Node

Prompt Toggle

The checkbox UI your prompts deserve

By Pauan·Created 8 months ago·Updated 5 months ago· 3
Prompt Toggle
    • JSON
    text

    If you've ever spent an evening testing whether "masterpiece" actually does anything, or commenting out half a prompt to isolate a tag, you know the pain this node fixes. Prompt Toggle turns the plain text box into a list of lines, each with its own checkbox and a weight with - / + buttons. Click a line off, nudge its weight, re-run - no cutting and pasting into the prompt, no guessing which weight went where.

    It's the flagship of the Prompt Helpers pack, and it's a genuinely nice thing to use: the name is honest, the workflow is "type, tick, tweak, run." The frontend re-renders your multiline prompt into the checkbox UI, and everything else happens behind the scenes.

    How it works

    The checkbox UI is frontend JavaScript (js/main.js) that parses your text into lines. Enabled lines get serialized back into text - with their weights written out as tag * 1.2 - and the backend takes that text and runs it through the pack's own Parse Lines parser to produce EZ_JSON, which feeds EZ Prompt to become conditioning. So the wiring is: Prompt Toggle → EZ Prompt → KSampler. One thing to note: in the current version the output is JSON, not conditioning - so it's not a drop-in CLIP Text Encode replacement the way the README's older framing implied; you go through EZ Prompt.

    The line format is the same as Parse Lines: // and # comments (escape with \), weights appended as * 1.3, and BREAK to split the prompt into chunks.

    Why BREAK matters

    Two genuinely useful things, both for CLIP-based models (SD 1.5, SDXL, Illustrious, Pony):

    • Beat the 75-token limit. Many SDXL-lineage models chunk at 75 tokens per prompt. BREAK splits one long prompt into multiple chunks, so you can have more than 75 tokens' worth of tags.
    • Stop concept bleeding. This is the killer feature. The README's example: one chunk with 1girl, blue_eyes, dress, a BREAK, then 1boy, green_eyes, jacket. Because the chunks are encoded separately, the model is far less likely to paint the boy's eyes onto the girl. Same trick works for separating quality tags, composition, background, and artist tags into sections.

    The honest caveat: this is a CLIP-era trick. On LLM-encoded models (Flux, Anima, Z-Image) there's no 75-token boundary to break against, so BREAK is meaningless there. It won't hurt anything, it just won't do anything - and the line-toggling UI is still worth having on any model.

    Inputs and outputs

    • text (multiline STRING) - the prompt, which the UI renders as togglable lines.
    • JSON output (EZ_JSON) - wire to EZ Prompt.

    Install

    Part of the Prompt Helpers pack by Pauan. ComfyUI Manager → search "Prompt Helpers", or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Pauan/comfyui-prompt-helpers
    

    Restart ComfyUI - the toggle UI is frontend code, so a restart (or browser refresh) after install matters. Deps are just PyYAML and desktop-notifier, no models. Needs ComfyUI 0.8.0+ for the Nodes 2.0 extension API.

    Where people get burned

    • Output is JSON, not conditioning. Beginners wire it straight into a KSampler and get nothing. It must go through EZ Prompt first.
    • The toggles are a frontend feature. If the pack's JS didn't load (old ComfyUI, stale cache after an update), you just get a plain text box and the node still works as a Parse Lines wrapper - but no checkboxes. If you see no checkbox UI, that's a frontend load problem, not a prompt problem.
    • BREAK inside a line is a hard error, not a hint - keep it on its own line.
    • Weights are line-level, not tag-level. Multiple tags on one line share one weight. If you need per-tag weights, split them onto separate lines.

    The author of this pack clearly got tired of the same 30-second prompt-editing chore you do a hundred times a night. Prompt Toggle makes that chore a click. It's the easiest node in the pack to fall in love with, and the hardest to explain why you miss it when you go back to a vanilla text box.

    Categoryprompt_helpers/prompt

    Inputs (1)

    NameTypeDefaultDescription
    textSTRING

    Outputs (1)

    NameTypeDescription
    JSONEZ_JSON