String to Combo | akatz-loops
Feed a String Into a Dropdown That Refuses Strings
- COMBO
- STRING
- *
ComfyUI is full of dropdowns that only accept values from a fixed list - sampler names, schedulers, model types - and when you want to drive one of those from a string (an external file, a shared parameter, a string you typed once in a central place), the graph just says no. StringToCombo is the adapter: it takes a plain STRING and emits a COMBO output you can plug into those dropdown inputs.
Here's where the one sharp edge lives, and it's right in the source: the node trims and lower-cases the string for the COMBO output. " Euler A " becomes "euler a", and it does that on purpose, because that's what most combo inputs expect. The cost is that case matters in the opposite direction now: if the target combo is case-sensitive and expects "euler_ancestral" with an underscore, your string has to match it exactly (lowercase, trimmed). This node is a convenience adapter, not a fuzzy matcher.
It actually has three outputs, and the trick is to use the right one:
- COMBO - the trimmed, lower-cased version, for combo/dropdown sockets.
- STRING - the original string, untouched.
*- also the original string, in a wildcard socket for nodes that takeANY.
So the workflow is: keep the string somewhere authoritative (a text node, a file loader, a shared parameter), run it through StringToCombo, and feed the COMBO output into whatever dropdown refuses to take a string directly. The other two outputs exist so you don't need a second copy of the value for string-consuming nodes downstream.
Where it earns its keep
The canonical use is sampler/scheduler selection: this pack even ships its own SamplerSelector and SchedulerSelector nodes for choosing those from the built-in lists - but when the name has to come from outside (a JSON config, a per-run batch value, a string you compute mid-graph), StringToCombo is what turns that external string into something a KSampler's sampler_name socket will accept. It's the same idea as the pack's "select with override" pattern: the graph stays parameterized, the dropdown gets fed dynamically.
If you're just matching a string against a list of options you control, check whether the target expects exact case before you wire the COMBO output - remember it's been lower-cased. And if you want to choose among strings by a boolean or index, that's a LazySwitch/LazyIndexSwitch job; this node only converts, it doesn't select.
Install
Part of Akatz-Loop-Nodes (akatz-ai). Via ComfyUI Manager, search "Akatz-Loop-Nodes"; or:
cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/Akatz-Loop-Nodes
Restart ComfyUI. The pack's only dependency is opencv-python (image nodes), no models. The custom_nodes.ComfyUI-Execution-Inversion module path on listings is lineage from BadCafeCode's execution-inversion demo - not a package you install. Troubleshooting is mostly the case-sensitivity note above: when a combo input rejects your string, look at the lowercase/trim first.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| COMBO | COMBO | — |
| STRING | STRING | — |
| * | * | — |