Nodes/Enviral Design Node Pack/Text Split (Delimiter)
ComfyUI Node

Text Split (Delimiter)

Split one text string into twenty parts and a remainder — for real workflows

By EnviralDesign·Created 4 months ago·Updated 21 days ago· 1
Text Split (Delimiter)
    • part_1
    • part_2
    • part_3
    • part_4
    • part_5
    • part_6
    • part_7
    • part_8
    • part_9
    • part_10
    • part_11
    • part_12
    • part_13
    • part_14
    • part_15
    • part_16
    • part_17
    • part_18
    • part_19
    • part_20
    • remainder
    • count
    text
    delimiter,
    output_count4
    strip_partstrue
    skip_emptytrue

    There's a whole class of ComfyUI workflows that are secretly about lists: a comma-separated prompt variant string, a newline-delimited set of negative prompts, a filename list you want to iterate over. To use those in the graph you need to split the string apart - and most text-splitter nodes make you think about output sockets that don't exist yet.

    Text Split (Delimiter) is the boring, dependable version: split on a delimiter, get up to twenty named parts (part_1part_20), a remainder bucket for overflow, and a count. Fixed socket layout, no dynamic outputs, no surprises when you reload a saved workflow.

    How it works

    Plain string splitting with sensible defaults and one nice escape hatch: the delimiter field understands \n, \r\n, \r, and \t as escape sequences, so you can split on newlines or tabs just by typing the escape. Behavior is controlled by three toggles:

    • output_count - how many leading parts get their own socket before overflow lands in remainder. Default 4.
    • strip_parts - trims whitespace around each part (default on; you almost always want this).
    • skip_empty - drops empty parts after splitting (default on, so trailing commas don't create phantom empty slots).

    Whatever remains after the visible parts is re-joined with the delimiter into remainder, so nothing is ever lost. count tells you how many parts existed in total.

    The inputs that matter

    • text - the string to split.
    • delimiter - what to split on. , by default; \n is the other common choice.
    • output_count - number of leading part sockets.

    Outputs: part_1 through part_20, remainder, and count. The parts that exceed output_count still exist as sockets - they just come back empty and the overflow goes to remainder.

    Install

    Part of the Enviral Design Node Pack. ComfyUI Manager: search "Enviral Design Node Pack". Manual:

    cd ComfyUI/custom_nodes
    git clone https://github.com/EnviralDesign/comfyUI-enviral-design-node-pack
    

    then restart. No extra dependencies.

    When you'd reach for it

    The natural pattern: a Custom Combo or a text file feeds a big comma-separated string, this node splits it, and the parts drive things like Enviral Sampler Name, Enviral LoraName, or prompt text encoders per pass. It's also the handiest way to feed a batch of filenames into a loader. The fixed-socket design is deliberate - dynamic outputs are clever until a saved workflow reloads with different count and every wire points at nothing. The trade-off: if you need more than twenty parts, you need a different tool, because twenty is the hard cap here.

    CategoryEnviralDesign/text

    Inputs (5)

    NameTypeDefaultDescription
    textSTRINGInput text to split.
    delimiterSTRING,Delimiter used to split the input text. Supports \n, \r\n, \r, and \t escapes.
    output_countINT41–20How many leading parts to expose before the remainder bucket.
    strip_partsBOOLEANtrueTrim whitespace around each split part.
    skip_emptyBOOLEANtrueDrop empty parts after splitting.

    Outputs (22)

    NameTypeDescription
    part_1STRING
    part_2STRING
    part_3STRING
    part_4STRING
    part_5STRING
    part_6STRING
    part_7STRING
    part_8STRING
    part_9STRING
    part_10STRING
    part_11STRING
    part_12STRING
    part_13STRING
    part_14STRING
    part_15STRING
    part_16STRING
    part_17STRING
    part_18STRING
    part_19STRING
    part_20STRING
    remainderSTRING
    countINT