Nodes/ComfyUI-FEnodes/Text Split → Batch
ComfyUI Node

Text Split → Batch

Turn a Delimited String Into a Batch

By FugitiveExpert01·Created 6 months ago·Updated 11 days ago· 6
Text Split → Batch
    • text_batch
    text
    delimiter,

    ComfyUI has two ways of passing text around: a single STRING, and a batch of strings (a list-type output that many samplers and batch-processing nodes accept). Text Split → Batch is the bridge that turns one delimited blob of text into that batch. Type a comma-separated list of prompts, it splits them into individual strings, and each one becomes an independent element downstream.

    Where it shines is anything that processes a list per-item: batch prompt variation, feeding multiple negative prompts into a node that iterates, or driving a per-frame/per-tile workflow where each slot needs its own text. It's a quality-of-life node - small, boring, and exactly the kind of thing that saves you a chain of manual Text nodes when the graph gets busy.

    How it works

    Boring on purpose. The node takes your text string, splits it on the delimiter, strips leading/trailing whitespace from each item, and discards empty items. That last bit is the useful detail: trailing delimiters and blank lines silently vanish instead of producing empty prompt entries that waste a pass. If you leave the delimiter blank entirely, it warns and returns the whole string as a single-item batch rather than doing something surprising.

    The inputs and output

    • text (required, multiline) - the delimited string. Since it's a multiline box, newlines work as a delimiter too; set delimiter to a newline if you want one prompt per line.
    • delimiter (optional, default ",") - what to split on. Common choices: comma, |, newline.
    • text_batch (output) - the batch of strings, one per item, in order.

    A typical chain: Text Split → Batch into a node that accepts batched STRING inputs, or back into a list via the pack's "Text Batch → List" if the downstream node wants a LIST type instead.

    Installing it

    Same pack, same install as the rest of FEnodes:

    cd ComfyUI/custom_nodes
    git clone https://github.com/FugitiveExpert01/ComfyUI-FEnodes.git
    

    Restart ComfyUI, and it appears under FEnodes (ComfyUI Manager also finds it by searching "ComfyUI-FEnodes"). Zero extra dependencies - this is pure Python string handling.

    Common issues

    • The output doesn't plug into your node. ComfyUI distinguishes a batched STRING output from a LIST type, and some nodes only accept one or the other. If the wire won't connect, use the pack's "Text List → Batch" / "Text Batch → List" converters to switch forms.
    • Everything came back as one item. You probably left the delimiter empty, or used a delimiter that isn't in the text. The node will log a warning in the former case.
    • Empty entries appearing. They shouldn't - empties are stripped. If you're seeing blank lines downstream, they're coming from somewhere upstream of this node.
    CategoryFEnodes

    Inputs (2)

    NameTypeDefaultDescription
    textSTRING
    delimiteroptSTRING,

    Outputs (1)

    NameTypeDescription
    text_batchSTRING