๐๐ Select from List
Select from List (Bjornulf_custom_nodes) โ ComfyUI Node Guide
- selected_element_INT
- selected_element_STRING
- list_length_INT
A small glue node that does exactly one thing: takes a delimited list packed into a single string and hands you back one element from it by position. If you've ever had a text field full of ;-separated values - seeds, style names, prompt snippets, whatever - and wanted to grab "just the third one" without rebuilding the whole string or wiring up something heavier, this is the node.
How it works
It splits input_LIST on delimiter (semicolon by default) and returns the item at position selection - 1-indexed, so selection = 1 gets you the first element, not the zeroth. The README's own example is pulling the third seed out of the output from Bjornulf's Global Seed Manager node, which is the kind of use case this was built for: something upstream is generating or storing a batch of values as one string, and you want to manually scrub through them one at a time without touching the source.
Inputs and outputs
Three required inputs: input_LIST (the delimited STRING), selection (INT, 1 to 9999, default 1 - the position you want), and delimiter (STRING, default ;, single-line). Three outputs: selected_element_INT and selected_element_STRING - it gives you both a parsed-integer version and the raw string version of whatever you picked, so you don't need a separate type-conversion node if the value happens to be numeric - plus list_length_INT, telling you how many elements were actually in the list, which is handy for sanity-checking that selection is pointed somewhere valid.
Installing it
Comes with the rest of the pack. ComfyUI Manager โ search "Bjornulf_custom_nodes" โ install โ restart, or manually: cd ComfyUI/custom_nodes && git clone https://github.com/justUmen/Bjornulf_custom_nodes, then restart. No extra dependency for this node specifically - it's string splitting, nothing more.
Common issues & troubleshooting
The obvious trap: mismatched delimiters. If your upstream string uses commas and you leave delimiter at the default ;, you'll get the whole string back as "element 1" because there was nothing to split on. Check list_length_INT first - if it reads 1 when you expected many, that's almost always a delimiter mismatch, not a bug.
selection has no upper bound tied to the actual list length (the widget goes up to 9999 regardless of how many elements you actually have), so setting it past the end of your list will error or return something unexpected rather than silently clamping. Again, list_length_INT is your friend here - wire it to a Show node once while you're setting things up so you know your valid range.
And remember selection is 1-indexed, not 0-indexed. If you're used to Python-style zero-based indexing from elsewhere in ComfyUI, this is the one node in the pack where "give me the first item" means selection = 1, not 0.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| input_LIST | STRING | โ | |
| selection | INT | 11โ9999 | โ |
| delimiter | STRING | ; | โ |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| selected_element_INT | INT | โ |
| selected_element_STRING | STRING | โ |
| list_length_INT | INT | โ |