Nodes/XB_ToolBox/XB-BOX - ๐Ÿ“‹ ๅˆ—่กจๅˆ†ๅ‘
ComfyUI Node

XB-BOX - ๐Ÿ“‹ ๅˆ—่กจๅˆ†ๅ‘

Split one list of strings into N separate text wires

By wjluoxiaoยทCreated 5 months agoยทUpdated 6 days agoยท 302
XB-BOX - ๐Ÿ“‹ ๅˆ—่กจๅˆ†ๅ‘
    • ๆ–‡ๆœฌ1
    • ๆ–‡ๆœฌ2
    • ๆ–‡ๆœฌ3
    • ๆ–‡ๆœฌ4
    • ๆ–‡ๆœฌ5
    • ๆ–‡ๆœฌ6
    • ๆ–‡ๆœฌ7
    • ๆ–‡ๆœฌ8
    • ๆ–‡ๆœฌ9
    • ๆ–‡ๆœฌ10
    • ๆ–‡ๆœฌ11
    • ๆ–‡ๆœฌ12
    • ๆ–‡ๆœฌ13
    • ๆ–‡ๆœฌ14
    • ๆ–‡ๆœฌ15
    • ๆ–‡ๆœฌ16
    • ๆ–‡ๆœฌ17
    • ๆ–‡ๆœฌ18
    • ๆ–‡ๆœฌ19
    • ๆ–‡ๆœฌ20
    • ๆ–‡ๆœฌ21
    • ๆ–‡ๆœฌ22
    • ๆ–‡ๆœฌ23
    • ๆ–‡ๆœฌ24
    • ๆ–‡ๆœฌ25
    • ๆ–‡ๆœฌ26
    • ๆ–‡ๆœฌ27
    • ๆ–‡ๆœฌ28
    • ๆ–‡ๆœฌ29
    • ๆ–‡ๆœฌ30
    • ๆ–‡ๆœฌ31
    • ๆ–‡ๆœฌ32
    • ๆ–‡ๆœฌ33
    • ๆ–‡ๆœฌ34
    • ๆ–‡ๆœฌ35
    • ๆ–‡ๆœฌ36
    • ๆ–‡ๆœฌ37
    • ๆ–‡ๆœฌ38
    • ๆ–‡ๆœฌ39
    • ๆ–‡ๆœฌ40
    • ๆ–‡ๆœฌ41
    • ๆ–‡ๆœฌ42
    • ๆ–‡ๆœฌ43
    • ๆ–‡ๆœฌ44
    • ๆ–‡ๆœฌ45
    • ๆ–‡ๆœฌ46
    • ๆ–‡ๆœฌ47
    • ๆ–‡ๆœฌ48
    • ๆ–‡ๆœฌ49
    • ๆ–‡ๆœฌ50
    • ๆ–‡ๆœฌ51
    • ๆ–‡ๆœฌ52
    • ๆ–‡ๆœฌ53
    • ๆ–‡ๆœฌ54
    • ๆ–‡ๆœฌ55
    • ๆ–‡ๆœฌ56
    • ๆ–‡ๆœฌ57
    • ๆ–‡ๆœฌ58
    • ๆ–‡ๆœฌ59
    • ๆ–‡ๆœฌ60
    • ๆ–‡ๆœฌ61
    • ๆ–‡ๆœฌ62
    • ๆ–‡ๆœฌ63
    • ๆ–‡ๆœฌ64
    • ๆ–‡ๆœฌ65
    • ๆ–‡ๆœฌ66
    • ๆ–‡ๆœฌ67
    • ๆ–‡ๆœฌ68
    • ๆ–‡ๆœฌ69
    • ๆ–‡ๆœฌ70
    • ๆ–‡ๆœฌ71
    • ๆ–‡ๆœฌ72
    • ๆ–‡ๆœฌ73
    • ๆ–‡ๆœฌ74
    • ๆ–‡ๆœฌ75
    • ๆ–‡ๆœฌ76
    • ๆ–‡ๆœฌ77
    • ๆ–‡ๆœฌ78
    • ๆ–‡ๆœฌ79
    • ๆ–‡ๆœฌ80
    • ๆ–‡ๆœฌ81
    • ๆ–‡ๆœฌ82
    • ๆ–‡ๆœฌ83
    • ๆ–‡ๆœฌ84
    • ๆ–‡ๆœฌ85
    • ๆ–‡ๆœฌ86
    • ๆ–‡ๆœฌ87
    • ๆ–‡ๆœฌ88
    • ๆ–‡ๆœฌ89
    • ๆ–‡ๆœฌ90
    • ๆ–‡ๆœฌ91
    • ๆ–‡ๆœฌ92
    • ๆ–‡ๆœฌ93
    • ๆ–‡ๆœฌ94
    • ๆ–‡ๆœฌ95
    • ๆ–‡ๆœฌ96
    • ๆ–‡ๆœฌ97
    • ๆ–‡ๆœฌ98
    • ๆ–‡ๆœฌ99
    โ—„ๅˆ—่กจ่พ“ๅ…ฅโ€”โ–บ
    โ—„่พ“ๅ‡บๆ•ฐ้‡3โ–บ

    Some nodes hand you a list - a batch of file paths, a set of storyboard frames, several prompts at once. But the node on the other end of the wire wants individual strings, one per input. That's the gap XB_ListDispatcher fills: it takes a list of strings, splits it by line, and pushes each line out on its own dedicated output port. You get a fan-out node that turns one messy list wire into clean, individually-addressable text lines.

    The reason this exists is ComfyUI's list handling. When a node is list-aware (INPUT_IS_LIST), its input actually receives a list of values even if it looks like a single wire. This node joins everything it receives, splits on newlines, strips each line, drops empties, and then emits line 1 on ๆ–‡ๆœฌ1, line 2 on ๆ–‡ๆœฌ2, and so on. It's plumbing in the truest sense - no pixels touched, no data transformed beyond the split - which is exactly what the plumbing layer of ComfyUI is for (see the node-plumbing essay in the KB).

    The two inputs

    • ๅˆ—่กจ่พ“ๅ…ฅ (list input) - a STRING socket marked as an input (you must wire something in; it won't take typed text). Any list of strings works.
    • ่พ“ๅ‡บๆ•ฐ้‡ (output count) - integer, 1 to 99, default 3. This controls how many of the 99 available output ports actually carry data.

    That's the whole control surface. Set output count to 5 and you get ๆ–‡ๆœฌ1 through ๆ–‡ๆœฌ5 populated; the remaining ports exist but output empty strings.

    Outputs

    Up to 99 STRING outputs named ๆ–‡ๆœฌ1โ€ฆๆ–‡ๆœฌ99 (Text1โ€ฆText99). Practical pattern: feed it a multi-line prompt list from a batch node, set the count, and wire each output into a separate CLIP Text Encode for per-line conditioning. Feed it the output of XB_llamaStoryboardInstruct's output_list and each frame prompt lands on its own wire for batch image generation.

    A couple of honest notes

    The node treats every newline as a split point and strips whitespace - so blank lines silently vanish, and a line containing only spaces disappears rather than erroring. That's usually what you want, but it means you can't round-trip intentionally-empty lines. Also, empty outputs beyond the source data's length are empty strings, not errors - a downstream node getting "" where it expected text is the thing to watch when you change the input list's length without changing the output count.

    Installing it

    Part of XB_ToolBox, so the standard install applies:

    cd ComfyUI/custom_nodes
    git clone https://github.com/WJLUOXIAO/XB_ToolBox.git
    

    or search XB_ToolBox in ComfyUI Manager and restart. No dependencies beyond ComfyUI core.

    Should you use it?

    If you're already running XB_ToolBox (say, for the llama storyboard nodes), this is a handy no-cost utility for un-batching lists into individual wires. If you're not running the pack, it's a perfectly fine generic list-splitter but not a reason to install a 300-node suite on its own - ComfyUI's own batch/split utilities cover much of the same ground. Where it earns its keep is the 99-output headroom and the clean newline handling in workflows that already live in the XB ecosystem.

    CategoryXB_ToolBox/Utils

    Inputs (2)

    NameTypeDefaultDescription
    ๅˆ—่กจ่พ“ๅ…ฅSTRINGโ€”
    ่พ“ๅ‡บๆ•ฐ้‡INT31โ€“99โ€”

    Outputs (99)

    NameTypeDescription
    ๆ–‡ๆœฌ1STRINGโ€”
    ๆ–‡ๆœฌ2STRINGโ€”
    ๆ–‡ๆœฌ3STRINGโ€”
    ๆ–‡ๆœฌ4STRINGโ€”
    ๆ–‡ๆœฌ5STRINGโ€”
    ๆ–‡ๆœฌ6STRINGโ€”
    ๆ–‡ๆœฌ7STRINGโ€”
    ๆ–‡ๆœฌ8STRINGโ€”
    ๆ–‡ๆœฌ9STRINGโ€”
    ๆ–‡ๆœฌ10STRINGโ€”
    ๆ–‡ๆœฌ11STRINGโ€”
    ๆ–‡ๆœฌ12STRINGโ€”
    ๆ–‡ๆœฌ13STRINGโ€”
    ๆ–‡ๆœฌ14STRINGโ€”
    ๆ–‡ๆœฌ15STRINGโ€”
    ๆ–‡ๆœฌ16STRINGโ€”
    ๆ–‡ๆœฌ17STRINGโ€”
    ๆ–‡ๆœฌ18STRINGโ€”
    ๆ–‡ๆœฌ19STRINGโ€”
    ๆ–‡ๆœฌ20STRINGโ€”
    ๆ–‡ๆœฌ21STRINGโ€”
    ๆ–‡ๆœฌ22STRINGโ€”
    ๆ–‡ๆœฌ23STRINGโ€”
    ๆ–‡ๆœฌ24STRINGโ€”
    ๆ–‡ๆœฌ25STRINGโ€”
    ๆ–‡ๆœฌ26STRINGโ€”
    ๆ–‡ๆœฌ27STRINGโ€”
    ๆ–‡ๆœฌ28STRINGโ€”
    ๆ–‡ๆœฌ29STRINGโ€”
    ๆ–‡ๆœฌ30STRINGโ€”
    ๆ–‡ๆœฌ31STRINGโ€”
    ๆ–‡ๆœฌ32STRINGโ€”
    ๆ–‡ๆœฌ33STRINGโ€”
    ๆ–‡ๆœฌ34STRINGโ€”
    ๆ–‡ๆœฌ35STRINGโ€”
    ๆ–‡ๆœฌ36STRINGโ€”
    ๆ–‡ๆœฌ37STRINGโ€”
    ๆ–‡ๆœฌ38STRINGโ€”
    ๆ–‡ๆœฌ39STRINGโ€”
    ๆ–‡ๆœฌ40STRINGโ€”
    ๆ–‡ๆœฌ41STRINGโ€”
    ๆ–‡ๆœฌ42STRINGโ€”
    ๆ–‡ๆœฌ43STRINGโ€”
    ๆ–‡ๆœฌ44STRINGโ€”
    ๆ–‡ๆœฌ45STRINGโ€”
    ๆ–‡ๆœฌ46STRINGโ€”
    ๆ–‡ๆœฌ47STRINGโ€”
    ๆ–‡ๆœฌ48STRINGโ€”
    ๆ–‡ๆœฌ49STRINGโ€”
    ๆ–‡ๆœฌ50STRINGโ€”
    ๆ–‡ๆœฌ51STRINGโ€”
    ๆ–‡ๆœฌ52STRINGโ€”
    ๆ–‡ๆœฌ53STRINGโ€”
    ๆ–‡ๆœฌ54STRINGโ€”
    ๆ–‡ๆœฌ55STRINGโ€”
    ๆ–‡ๆœฌ56STRINGโ€”
    ๆ–‡ๆœฌ57STRINGโ€”
    ๆ–‡ๆœฌ58STRINGโ€”
    ๆ–‡ๆœฌ59STRINGโ€”
    ๆ–‡ๆœฌ60STRINGโ€”
    ๆ–‡ๆœฌ61STRINGโ€”
    ๆ–‡ๆœฌ62STRINGโ€”
    ๆ–‡ๆœฌ63STRINGโ€”
    ๆ–‡ๆœฌ64STRINGโ€”
    ๆ–‡ๆœฌ65STRINGโ€”
    ๆ–‡ๆœฌ66STRINGโ€”
    ๆ–‡ๆœฌ67STRINGโ€”
    ๆ–‡ๆœฌ68STRINGโ€”
    ๆ–‡ๆœฌ69STRINGโ€”
    ๆ–‡ๆœฌ70STRINGโ€”
    ๆ–‡ๆœฌ71STRINGโ€”
    ๆ–‡ๆœฌ72STRINGโ€”
    ๆ–‡ๆœฌ73STRINGโ€”
    ๆ–‡ๆœฌ74STRINGโ€”
    ๆ–‡ๆœฌ75STRINGโ€”
    ๆ–‡ๆœฌ76STRINGโ€”
    ๆ–‡ๆœฌ77STRINGโ€”
    ๆ–‡ๆœฌ78STRINGโ€”
    ๆ–‡ๆœฌ79STRINGโ€”
    ๆ–‡ๆœฌ80STRINGโ€”
    ๆ–‡ๆœฌ81STRINGโ€”
    ๆ–‡ๆœฌ82STRINGโ€”
    ๆ–‡ๆœฌ83STRINGโ€”
    ๆ–‡ๆœฌ84STRINGโ€”
    ๆ–‡ๆœฌ85STRINGโ€”
    ๆ–‡ๆœฌ86STRINGโ€”
    ๆ–‡ๆœฌ87STRINGโ€”
    ๆ–‡ๆœฌ88STRINGโ€”
    ๆ–‡ๆœฌ89STRINGโ€”
    ๆ–‡ๆœฌ90STRINGโ€”
    ๆ–‡ๆœฌ91STRINGโ€”
    ๆ–‡ๆœฌ92STRINGโ€”
    ๆ–‡ๆœฌ93STRINGโ€”
    ๆ–‡ๆœฌ94STRINGโ€”
    ๆ–‡ๆœฌ95STRINGโ€”
    ๆ–‡ๆœฌ96STRINGโ€”
    ๆ–‡ๆœฌ97STRINGโ€”
    ๆ–‡ๆœฌ98STRINGโ€”
    ๆ–‡ๆœฌ99STRINGโ€”