String List
Up to seven text boxes, one list of strings
- Strings
- Num Strings
String List is the small, tidy sibling of String List From Newline. Where its newline cousin takes one giant multiline box and splits it, this one gives you up to seven separate text boxes - Text1 through Text7 - and collects whatever you typed into a single list of strings. Two of them (Text1, Text2) are required; the other five are optional and you can leave them blank.
For a fixed, small set of prompts or labels, this is often the nicer tool. It sits on your graph as seven visible fields instead of a wall of text, which makes a three-item prompt set readable at a glance. It's the node you'd point at the text axis of XYAny when your sweep has a handful of named variants rather than a pasted block.
Outputs are Strings (the list) and Num Strings (an INT count), and the mechanism is almost insultingly simple: it gathers every field into a list and returns it. But the simplicity hides an asymmetry that will bite you exactly once, so here it is:
- The required fields (
Text1,Text2) are added to the list unconditionally. - The optional fields (
Text3–Text7) are only added if they're non-empty.
That means if you type into Text1 but leave Text2 blank, your list is ["something", ""] - an empty string rides along because Text2 is required and required means included. The same blank in Text3 would be silently skipped. It's a quirk you'll hit the moment you think "I only need one, let me just use Text1." One empty entry in a prompt list is usually a wasted generation or a broken grid cell, so either fill the required slots or use String List From Newline and trim your trailing newline.
Speaking of which, the two are easy to mix up: FromNewline handles arbitrarily large pasted lists (and passes empty lines through), this one caps at seven items but drops empty optional fields. Fixed small set → String List. Big paste → FromNewline.
There's not much else to it. No list input support here - the fields are plain text boxes, and the output is a proper STRING list you can wire into prompt inputs, sampler text encoders, or XYAny's X/Y. It's a utility, it does exactly one thing, and once you know the required-field quirk it won't surprise you again.
Install is the pack standard, with nothing to pip install and no models to fetch:
cd ComfyUI/custom_nodes
git clone https://github.com/M1kep/Comfy_KepListStuff
Restart ComfyUI (or install Comfy_KepListStuff via Manager) and it's under List Stuff. Fill your boxes, check Num Strings, and go.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| Text1 | STRING | — | |
| Text2 | STRING | — | |
| Text3opt | STRING | — | |
| Text4opt | STRING | — | |
| Text5opt | STRING | — | |
| Text6opt | STRING | — | |
| Text7opt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Strings | STRING | — |
| Num Strings | INT | — |