StrToCombo
Feed a dropdown-only input from a plain string
- COMBO
Here's a ComfyUI quirk that trips people up the first time they hit it: some inputs are typed as COMBO - a dropdown - and a dropdown normally only accepts a value picked by clicking it, not a wire from another node. Checkpoint names, sampler names, a bunch of enum-style choices across the ecosystem all work this way. If you're driving a workflow from outside ComfyUI - an API call, a script, another node that computed the value - and you need to set one of those dropdown fields dynamically, you hit a wall. StrToCombo is built to get you past it.
What it does
One required input: value, a plain string, defaulting to empty. One output, named literally COMBO, marked as a list. Feed it a string - a checkpoint filename, a sampler name, whatever text value you need - and it comes back out typed as a COMBO, which lets you wire it into inputs that would otherwise only accept a value chosen from a fixed dropdown.
Why this matters more than it looks like it should
The author of this pack also builds Comfizen, a desktop app that turns a ComfyUI API workflow into a simplified UI - the whole point of that kind of tool is letting someone change a parameter (a model name, a sampler) without touching the node graph at all. That only works if every field the UI wants to expose can actually be set from outside the graph. Dropdown-typed fields are the ones that resist that by default, because their choices are normally locked to a fixed list baked into the node at load time. StrToCombo is the adapter that makes a COMBO input controllable the same way any other input is - from a string, which could come from an API parameter, a config file, another node's computed output, or SP-Nodes' own SP_XYValues if you're sweeping across several dropdown choices as part of a comparison.
How you'd use it
Wherever a node's input greys out or refuses your wire because it's expecting a COMBO and you've only got a string, drop StrToCombo in between. Type or feed in the exact text the dropdown would normally show - get the spelling right, since there's no autocomplete or validation happening here, just a type conversion - and wire the COMBO output into the field that was rejecting you.
Installing it
Part of the SP-Nodes pack:
- ComfyUI Manager: search "SP-Nodes", install, restart.
- Manual:
cd ComfyUI/custom_nodes && git clone https://github.com/bananasss00/ComfyUI-SP-Nodes, restart ComfyUI.
No models, no extra dependencies.
Troubleshooting
The single biggest failure mode: the string has to match one of the actual valid choices exactly, including case and any file extension the original dropdown expects (a checkpoint dropdown, for instance, usually wants the exact filename as it appears on disk). Since this node does a type conversion, not a validation, a typo or near-match won't get caught here - it'll surface as a downstream error, or silently do nothing useful, once the value hits the node that actually consumes it. If something isn't picking up correctly, go check the original dropdown's real option list first and match it character for character.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| value | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| COMBO | * | — |