Nodes/TankNodes/Text Split · Tank
ComfyUI Node

Text Split · Tank

Text Split · Tank

By xzbdqian10nian·Created 2 months ago·Updated a day ago· 1
Text Split · Tank
    • items
    • count
    ◄text—►
    ◄delimiter,►
    ◄start_index0►
    ◄skip_every0►
    ◄max_count10►
    ◄trimfalse►
    ◄regexfalse►

    You have a list. Ten prompt variants you drafted in a text editor, forty caption lines, a pile of tags you want one image each from. The usual ComfyUI answers are {this|that} wildcard brackets or clicking Queue ten times like a chump. Text Split · Tank is the third option: paste the list into one box, give it a delimiter, and everything downstream of the node runs once per item.

    It ships in TankNodes, Tank's pack of local Qwen3.8 / Ternary Bonsai GGUF chat nodes plus two OpenAI-compatible API chat nodes - and Text Split is its plumbing corner, the node that turns one chat answer (eight prompt ideas, one per line) into eight generations.

    The split is the boring half

    Splitting a string on a comma is not interesting. The interesting line is in the source:

    OUTPUT_IS_LIST = (True, False)
    

    That flag is what makes "connected nodes run once per item" true, and it's an engine rule, not this author's cleverness. ComfyUI's executor takes the longest list arriving on a node, runs the node that many times, and hands each run one element; a shorter list, or a single value, repeats its last item every iteration. So the fan-out is a per-item map, not a batched call - each iteration receives a plain STRING, which is why a CLIP Text Encode downstream just works. One node produces a list; the samplers and save nodes behind it run N times.

    The inputs worth touching

    Seven, all required widgets on the node. You'll set three.

    text is the multiline box. Paste your list here.

    delimiter defaults to a comma. Only four escapes get translated - \n, \t, \r, \\ - so \n gives you one item per line, which is what you want 90% of the time. Everything else passes through untouched, deliberately: the source notes that Python's usual unicode_escape handling corrupts non-ASCII separators, so a full-width Chinese comma , works as a literal delimiter, no escaping needed.

    max_count is the one to actually look at, because the default is 10. More below.

    The rest are situational. start_index skips items off the front, skip_every is a stride (1 keeps every other item, 2 every third), and trim strips surrounding spaces and line breaks. trim and regex are flagged advanced, so on the Nodes 2.0 frontend they hide behind the advanced-input toggle; the classic canvas shows all seven. With regex on, the delimiter compiles as a pattern - which is how you catch mixed punctuation in one pass:

    [,,]      # ASCII and Chinese commas at once
    

    The outputs

    items is the STRING list, and it's the one that fans the graph out. count is a plain integer, not a list: it runs once, carrying the number of items that survived filtering and slicing - a cheap sanity check before something expensive.

    Installing it

    Manager: search TankNodes. The registry ID is the legacy qwen38-vl, which is why older links say ComfyUI-Qwen3.8-VL - the pack was renamed; existing installs just update the git remote. Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/xzbdqian10nian/ComfyUI-TankNodes.git
    # restart ComfyUI, hard-refresh the browser
    

    Python 3.10 or newer. requirements.txt is one line, diskcache, and its comment explains the deliberate omission - it does not pin llama-cpp-python, so Manager can't swap your CUDA build for PyPI's stale CPU wheel.

    Good news if you googled this node specifically: Text Split needs none of that. No GGUF, no vision projector, no llama-server binary, no key, no VRAM. The other five nodes are where the setup costs live - weights in ComfyUI/models/LLM/Qwen3.8/, a matching llama.cpp runtime, around 9 GiB held during a local chat. You install all six and ignore five.

    Where people get burned

    The default max_count of 10. Paste a 40-line file, get 10 images, wonder where the other 30 went. Set it to your item count, or absurdly high, and let the list length decide.

    Whitespace survives unless you say otherwise: a , b with trim off gives " a " and " b ", spaces and all, straight into your encoder. Blank items are dropped regardless - a trailing comma, an empty line, a line of spaces - because the filter tests the stripped value. Correct behavior, but your item numbering may not match the list.

    And there's a hard failure. If nothing survives - empty text, a delimiter that matches nothing, a start_index past the end - the node raises instead of passing an empty list along:

    Text split produced no items: check the text, delimiter and start index.
    

    Read it literally; start_index: 5 on a two-item list is the usual culprit.

    Two fan-out gotchas that aren't this node's fault but bite here. Widget values don't change between iterations - the prompt is serialized once - so a fixed seed gives you N identical images. Fan-out varies your text, not your seed. And the pack's API chat nodes run once per request with no history, so splitting into one multiplies your API calls by the item count: a 40-item list into a paid chat node is 40 bought requests.

    Finally: this pack has nearly no discussion footprint, so the README, the CHANGELOG and the source are the documentation - and the source is current where the README lags.

    CategoryTankNodes/Text

    Inputs (7)

    NameTypeDefaultDescription
    textSTRINGText to split.
    delimiterSTRING,Separator. Use \n for a new line and \t for a tab. Leave empty to output the whole text as one item.
    start_indexINT00–100000Index of the first item to output, counting from 0.
    skip_everyINT00–1000Items skipped after each output item. 1 outputs every other item.
    max_countINT101–100000Maximum number of items to output.
    trimBOOLEANfalseRemove spaces and line breaks around each item.
    regexBOOLEANfalseTreat the delimiter as a regular expression, for example [,,] for both commas.

    Outputs (2)

    NameTypeDescription
    itemsSTRINGEach item runs connected nodes once.
    countINTNumber of items output.