String List Cowboy
Gather prompt parts into one list without the type juggling
- value_1
- string_list
A lot of ComfyUI text nodes output a single STRING, and then you want to hand several of them to a node that wants a list. String List Cowboy is the "lassos strings together into a list" node from TrentNodes - the README describes it as Impact Pack's MakeAnyList but specialized for strings, and that's exactly right. Connect whatever string values you have, and they come out as one list, each optionally wrapped in a prefix and suffix.
If you're wondering when that's useful: prompt assembly. You've got a base prompt, a character tag, a style tag, maybe a quality suffix, each coming from a different source. You want to iterate or batch over them as a list, or feed them into a grid/contact-sheet node that takes a list input. That's the job.
How it works
The inputs are the interesting part: value_1 is a * (any-type) socket, and the node's dynamic inputs expand as you connect more - "connect any inputs and they get collected into a string list." It's the lazy dynamic-socket pattern from the plumbing layer: the node grows slots as you fill them, up to whatever your graph needs.
Three settings sit on top:
prefix- prepended to every stringsuffix- appended to every stringlimit- max items to output (0 = no limit)
So if you set prefix "masterpiece, " and suffix ", 8k", every value that passes through gets branded. That's the "optional prefix/suffix branding" from the README, and it's genuinely handy for stamping a consistent quality ladder onto a set of prompts.
One output: string_list (a STRING list). That's it. Note the node expects string values - the value_1 socket is wildcard-typed for convenience, but if you wire an IMAGE into it the node isn't going to serialize it for you.
The pairing you'll actually use
The pack's own Image+Text Grid notes that when you're feeding it images from a list-based node like this one, you need an ImageListToImageBatch upstream to collect images into a batch first. Same idea here: StringListCowboy builds the string side of your batch pipeline, and its sibling nodes handle the image side. Wire the output into anything that consumes a STRING list - a batch prompt loader, a grid captioner, a CSV-ish exporter.
Gotchas
- It's strings-only in practice. MakeAnyList in Impact Pack accepts mixed types; this is deliberately specialized, so know your inputs are text.
- The dynamic inputs can surprise you if you unplug something: slots stay where they were, and order is "whatever order you connected them." If order matters (it usually does for prompt ladders), build the list in one pass.
limittruncates the output, not the collection - handy for "give me the first 4 of my 12 prompts" without rebuilding anything.
Install
It ships in TrentNodes (TrentHunter82/TrentNodes):
# ComfyUI Manager: search "Trent Nodes"
# or:
cd ComfyUI/custom_nodes
git clone https://github.com/TrentHunter82/TrentNodes.git
cd TrentNodes && pip install -r requirements.txt
No model downloads, no heavy deps. If you already live in Impact Pack, you may not need it - but if you're not running Impact Pack just for a string list, this is the lighter option that stays inside one pack.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| prefixopt | STRING | — | |
| suffixopt | STRING | — | |
| limitopt | INT | 00–999 | Max items to output (0 = no limit) |
| value_1opt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| string_list | STRING | — |