Nodes/ComfyUI-ZML-Image/ZML_文本列表
ComfyUI Node

ZML_文本列表

ZML_文本列表

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_文本列表
    • 文本
    固定文本
    多行文本
    起始索引0
    执行上限0
    列表输入

    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.

    Categoryimage/ZML_图像/文本

    Inputs (5)

    NameTypeDefaultDescription
    固定文本STRING此处的文本会合并到文本列表的每一项中
    多行文本STRING
    起始索引INT0从第几行开始执行(0为第一行)
    执行上限INT00–9999最多执行多少行,0表示不限制
    列表输入optSTRING可连接其他节点的列表输出,将与多行文本合并

    Outputs (1)

    NameTypeDescription
    文本STRING