Stringlist to Combo
Turn one delimited string into one picked value, on an any-type wire
- *
Sometimes a "list" reaches you as one string: a line from a file, a comma-or-dollar-delimited batch value, a prompt packed into a single text field. Stringlist to Combo is the small node that splits that string on a separator and hands back one element - by default the first, or any index you name - on a * (any-type) output socket. It's the quiet workhorse for turning serialized text back into a single usable value.
How it works
The logic is short and worth knowing exactly, because the edge cases are the feature:
- If the input isn't a string (a float, int or bool), it passes through unchanged.
- If the separator is empty, or simply isn't found in the string, the whole string comes back untouched - so it degrades gracefully instead of erroring.
- Otherwise it splits on the separator and returns
splitted[index]. - If
indexis beyond the list, it returns the last element rather than crashing.
So with string = "sky$sea$forest" and the default separator $ and index = 0, you get sky; index 2 gives forest; index 9 gives forest too, thanks to that last-element fallback.
The inputs that matter
- string (STRING, forceInput) - the delimited text. It's marked forceInput, meaning you'll typically feed it from another node (a file reader, a text line extractor) rather than typing.
- separator (STRING, default
$) - the delimiter. Default is the dollar sign, not a comma - so if you're splitting comma-separated values, set it to,. - index (INT, default 0) - which element to pick; optional.
The single output is * (any), which means it plugs into nearly any socket - that's the point of a combo-style utility: it adapts to what you're feeding downstream.
Why you'd reach for it
It slots into the RvTools philosophy of workflow plumbing: strings that arrive on one wire (from wildcard systems, file lists, config text) get broken out into a selectable value. Pair it with an index slider and you've got a poor man's list browser - flip the index, get a different element. It's also handy with the pack's own text/wildcard nodes when you've got a packed string and want one token out.
Installing it
ComfyUI Manager → search ComfyUI-RvTools_v2, install, restart; or:
cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI-RvTools_v2
No model downloads, no extra dependencies.
Gotchas
The pack is unmaintained (superseded by ComfyUI_Eclipse) but this is stable plumbing. The v2 rename is the recurring trap for legacy ComfyUI-RvTools v1 workflows. Node-specific: remember the default separator is $ - if you feed it a comma list without changing the separator, the split won't happen and you'll get the whole string back (which is at least a predictable failure). And because non-string inputs pass through untouched, don't expect it to convert numbers to strings - that's a different job.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | — | |
| separator | STRING | $ | — |
| indexopt | INT | 0 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |