Nodes/comfyui-darkil-nodes/Multi toggles [darkilNodes]
ComfyUI Node

Multi toggles [darkilNodes]

Several toggles, one node, and a join string that knows how to say 'and'

By pytraveler·Created 7 months ago·Updated 15 days ago· 9
Multi toggles [darkilNodes]
    • as_list
    • as_string
    • ❓help

    A plain boolean gets you on/off. This node gets you which combination: several toggle switches on one node, with an as_list output of everything selected and an as_string output that joins them into prompt-ready text. It's the classic workflow-UI problem - "I want to add 'detailed eyes', 'soft light' and 'film grain' to my prompt, tick whichever" - solved without dropping a string of comma-separated booleans into your prompt.

    How it works

    All the behavior is configured in the node's properties, not its inputs:

    • text_for_toggles - the option list, semicolon- or pipe-separated. You can use plain labels or label::value pairs, where the value is what actually gets output (useful when your prompt wants detailed eyes but you want the toggle to read Eyes).
    • is_radio_toggles - when on, the toggles behave like radio buttons: exactly one can be active. Great for mutually exclusive style choices.
    • trim_values - strips whitespace from values before joining.
    • last_word - a word inserted before the final selected item in the joined string. Default behavior gives you a, b and c style lists; set it to and and the output becomes human-readable instead of a CSV.
    • delimiter - the join string (default , ).

    The selected toggles are sent to the node as a hidden JSON list, and the node joins them: as_list is the raw selection, as_string applies the delimiter plus the last_word grammar when more than one item is selected.

    Inputs and outputs

    There are no visible required inputs - configuration is all in properties. Outputs:

    • as_list (STRING, list type) - the selected values, one per list entry. Feed this to a node that iterates or concatenates lists.
    • as_string (STRING) - the joined text, ready for a prompt or any text sink.
    • ❓help (STRING) - the node's own documentation on a live socket.

    The as_list output is the sleeper feature: because it's a real list, you can loop over the selection or push it into anything that consumes string lists, which plain "join everything" nodes can't do.

    Where people get burned

    The property-vs-widget confusion strikes again - text_for_toggles lives in the property panel, so a node that looks empty on the canvas is actually unconfigured. Also, if you flip is_radio_toggles on after building a multi-select workflow, remember it changes the selection behavior, not just the UI - the joined string will only ever have one item once you're in radio mode. And a small formatting gotcha: the delimiter supports \n and \t escapes, but they're only interpreted after you've typed them literally, so \n in the property becomes a real newline, not a slash-n.

    Installing

    Part of pytraveler/comfyui-darkil-nodes. ComfyUI Manager search ComfyUI-darkil-nodes, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/pytraveler/comfyui-darkil-nodes
    

    Restart. No Python deps, no model downloads - pure logic/UI.

    CategorydarkilNodes/logic

    Inputs (0)

    No inputs

    Outputs (3)

    NameTypeDescription
    as_listSTRING
    as_stringSTRING
    ❓helpSTRING