Nodes/ComfyLab Pack/List: from Multiline (lab)
ComfyUI Node

List: from Multiline (lab)

One line per prompt, one batch run

By bugltd·Created 2 years ago·Updated about a year ago· 11
List: from Multiline (lab)
  • load
  • list
  • count
strip_commentstrue
convertdisabled
multiline

List: from Multiline (lab) is the node that makes "paste a bunch of prompts and run them all" a two-minute job. You type (or paste) one prompt per line into the node, it splits the text into a LIST, and you feed that list to a queue. Every line becomes one generation. That's the whole loop.

It's the most-used list builder in the pack for a reason: the multiline text box is where you naturally collect test cases. Copy a thread of prompt variants, paste, run. And because it produces a plain list, it composes with everything - Generic Queue for a straight sweep, XY Plot: Queue for a grid where the lines are one dimension.

The inputs that matter

  • multiline - the text box. One value per line; lines are stripped of surrounding whitespace and empty lines are skipped.
  • strip_comments - default true: any line starting with # is ignored. Huge for keeping a seed or a "don't run this yet" line in place without it polluting the batch.
  • convert - default disabled, but this is the sleeper feature. Set it to integer, float, or boolean and each line is converted before it lands in the list. That means the same node that feeds prompts can feed a list of CFG values or seeds, correctly typed.
  • load - a button that loads the content from a file instead of typing. Useful when your test cases live in a text file.

Outputs: list (the values) and count (the length).

How it works (and the gotcha inside)

The conversion handles the usual suspects: booleans accept true/false, yes/no, on/off, and 0/1 (case-insensitive, plus y/n). It's the same converter used across ComfyLab's list nodes, so behavior is consistent.

One trap worth knowing: a line that fails conversion raises an error at run time - a stray 7.5.5 in a float list kills the run. The error is clear enough, but it means "convert" deserves a quick sanity pass before you launch a long batch.

Where it fits

The KB's prompt-engineering material is full of exactly this pattern - dozens of prompt variants to compare, keep the structure, vary the subject. Put those variants in this node, drive a queue, and the comparison is one grid away. For the "fixed seed, one variable at a time" debugging discipline, a multiline list of that one variable is the cleanest way to hold the set.

Install

ComfyLab Pack installs as one package (nodes show a "(lab)" suffix). ComfyUI Manager: search ComfyLab Pack, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/bugltd/ComfyLab-Pack.git
cd ComfyLab-Pack
pip install -r requirements.txt

Restart after. No model files, light requirements.

Gotchas

  • Comment lines only matter if you strip them - flip strip_comments off and # lines become list values, which will feed #... into your prompt. Usually the opposite of what you wanted.
  • Converted lists are typed. If you convert to float, downstream nodes get floats - wire them somewhere that wants floats, or expect a type error.
  • load reads a file on the backend, not your browser's disk. Same filesystem rules as everything else in this pack.

It's a text box with a splitter. But it's the text box you'll reach for every single time you have a list of things to test, and the # comment support alone is worth the install.

CategoryComfyLab/list

Inputs (4)

NameTypeDefaultDescription
loadBTNload content from file or you can just paste / edit the content below
strip_commentsBOOLEANtrueignore lines starting with '#'
convertCOMBOdisabledconvert each value to int, float or boolean for booleans, values like true/false, yes/no, on/off, 0/1... are accepted.
multilineSTRING

Outputs (2)

NameTypeDescription
listLISTlist of values (one per line, optionally converted)
countINTnumber of values