- 文本
This is the loop node of the ZML text family, and the one that will quietly change how you batch. ZML_文本列表 takes multiline text, splits it on newlines, and outputs a list - which in ComfyUI means the entire downstream graph executes once per entry. Five lines of text, five images. That's the whole trick, and it's a big one.
The docstring says it plainly: "This will trigger batch/loop execution of downstream nodes (each line executes once)." Under the hood it's OUTPUT_IS_LIST = (True,), the engine flag that makes the sampler, prompt encoder, save node - whatever hangs off the 文本 output - run per item. The README update notes say the author discovered ComfyUI could auto-process lists like n8n does, and built a family of nodes around it. This is the text one.
Inputs that matter:
多行文本- your lines, one per entry. Empty lines are dropped.固定文本- a string that gets merged into every entry, handy for a suffix or prefix applied across the batch.起始索引- skip lines before this index (0 = first line).执行上限- cap how many lines run; 0 means no limit.列表输入(optional) - a wire-in list from another node that gets appended to your typed lines.
The single 文本 output is a list, so it feeds whatever you'd normally give a prompt - a CLIP text encode, the formatter, a filename node. Classic use: paste ten clothing variants into the box, hang a fixed-quality prompt plus a KSampler off the output, and get ten renders in one queue. The same pattern that the KB's node-plumbing doc calls the engine's native batch loop, exposed without any custom iteration.
Installing it
Ships inside ComfyUI-ZML-Image. Via Manager (search ComfyUI-ZML-Image) or:
cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image
Restart ComfyUI. The pack pulls ultralytics, opencv-python, and friends from its requirements.txt - Manager handles that; if you install manually and a node errors on import, run pip install -r requirements.txt in your ComfyUI environment. English users want the translation patch at https://github.com/zml-w/ZZZ_ZML_English_Patch.
Common issues
Two things bite. First, if your lines don't produce separate runs, the culprit is usually the 文本 output not actually being wired through the whole chain - one node in the middle collapsed the list to a single string. Check each hop. Second, the fixed-text merge is a merge, not a separator: with 固定文本 set, every entry becomes fixed + line, so if you expected a comma or space between them you need to include it in 固定文本 yourself. The 列表输入 merge appends external lists, which is useful but means order isn't always obvious - build from the multiline box unless you have a reason not to.
Also worth knowing: this node is one of the pack's genuinely useful ones, but it's Chinese-first. If the tooltip on 执行上限 ("0表示不限制") reads like a puzzle, remember 0 = unlimited.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| 固定文本 | STRING | 此处的文本会合并到文本列表的每一项中 | |
| 多行文本 | STRING | — | |
| 起始索引 | INT | 0 | 从第几行开始执行(0为第一行) |
| 执行上限 | INT | 00–9999 | 最多执行多少行,0表示不限制 |
| 列表输入opt | STRING | 可连接其他节点的列表输出,将与多行文本合并 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 文本 | STRING | — |