String To Combo JK๐
Turn a comma-separated string into a usable value
- any
Somewhere between "string in a text box" and "value a node will accept" there's a gap, and this node is a bridge over it. String To Combo JK takes a comma-separated string and outputs the first item, trimmed. It's a direct port of Comfyroll's CR String To Combo, which is why it carries the CR prefix even though it lives in Jake's pack.
How it works
Feed it "foo, bar, baz" and you get "foo". Feed it "alpha,beta" and you get "alpha". The mechanics are simple: split on commas, take the first element, strip whitespace. Empty input gives you an empty string back rather than an error.
The output is typed any (*), which is the clever part - ComfyUI lets an any-typed output connect to almost any input slot, so the resulting string can plug into combo boxes, text fields, or even values that expect a specific format. That's the "combo" in the name: it lets a plain string stand in where a dropdown selection would normally go.
Inputs and outputs
string- the comma-separated text. The only input.any- the first item, as a wildcard-typed output.
Installing it
It ships in ComfyUI-JakeUpgrade:
- ComfyUI Manager โ search "JakeUpgrade" โ install โ restart.
- Or:
cd ComfyUI/custom_nodes
git clone https://github.com/jakechai/ComfyUI-JakeUpgrade
cd ComfyUI-JakeUpgrade
pip install -r requirements.txt
Windows portable: run install.bat or ../../../python_embeded/python.exe -s -m pip install -r requirements.txt.
Common issues
- It only ever returns the first item. If you're expecting a random pick, a rotating pick, or any item beyond the first, this is the wrong node. JakeUpgrade has
Get Nth String JKfor indexing into a comma-separated list - use that when you need item two or three. - The "combo" in the name overpromises. This doesn't produce a dropdown; it produces a single value from a string. It's for converting one string into a typed slot, not for generating selection UIs.
- Whitespace surprises.
"foo ,bar"gives you"foo"(stripped), which is usually what you want, but if the source string came from a multi-line prompt with awkward spacing, sanity-check the output before you build a workflow around it.
Honestly, this is a niche utility. It earns its keep in API-driven or parameterized workflows where a caller hands you a string like "photoreal, 8k, detailed" and a downstream node only wants the first token. If you're not doing that, you may never touch it - but when you need it, it's exactly the boring reliable thing it looks like.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| string | STRING | Comma-separated string to convert to combo |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| any | * | โ |