文本列表制作器 / Text List Creator
Five text boxes, one list — the lazy prompt-batching helper
- text_list
- summary
Sometimes the whole job is just getting five strings into the right shape. Text List Creator is that: five multi-line text inputs (text1 through text5), one LIST output, with a couple of sensible cleanups along the way. It's the plumbing node nobody gets excited about and everybody ends up using.
Where it slots in: you're building a batch-generation workflow and you have a handful of prompts, captions, or descriptions you want to iterate over. Rather than chaining string-to-list converters or fighting with nodes that expect a file, you paste each block into its own text box, and the node hands you a proper list in order. That list then feeds whatever batch consumer you use - image generation, another text processor, a loop. It's also handy as a small "group these related texts together" container that makes a workflow read more clearly.
How it works
text1 is required; text2–text5 are optional. The node collects them in order and applies two rules before assembling the list:
- Empty inputs are dropped, so leaving
text3blank doesn't insert an empty string into the middle of your list. - Each entry is trimmed of leading/trailing whitespace - but internal structure (blank lines inside a multi-line prompt) is preserved, so a multi-paragraph caption stays intact as one entry.
The outputs are text_list (the LIST, ordered exactly as the inputs were) and summary (a string overview, same logging role as the other nodes in this pack's text family). If you leave everything after text1 empty, you still get a one-element list - the node doesn't collapse into nothing.
Installing it
Part of the RUI-Nodes pack ("Rui-Node🐶"). Install once via ComfyUI Manager (search "RUI-Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/rui40000/RUI-Nodes
cd RUI-Nodes
pip install -r requirements.txt
Restart after. Pure Python - no extra dependencies.
Where people get burned
The ordering trap: the list order is fixed by the input slots (text1 first, always), not by anything clever. If you later add a sixth prompt, there's no text6 - you're capped at five per node, so chain two nodes or reach for a file-based list loader. And because empty inputs are silently dropped, a workflow that later wires a specific slot into a named position can shift if you blank one out - the list is just "whatever's there, in slot order." Keep your inputs stable and it's a boring, reliable little node, which is exactly what you want from plumbing.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| text1 | STRING | 第 1 段文本。列表按 text1~text5 的顺序组织, 空白段会被自动跳过,不会在列表里留空位。 | |
| text2opt | STRING | 第 2 段文本,留空则跳过。 | |
| text3opt | STRING | 第 3 段文本,留空则跳过。 | |
| text4opt | STRING | 第 4 段文本,留空则跳过。 | |
| text5opt | STRING | 第 5 段文本,留空则跳过。 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text_list | LIST | — |
| summary | STRING | — |