Text Input (Custom Selector)
Text Input (Custom Selector)
- prefix
- suffix
- text_list
- concat_text
If you've ever deleted a wire from your CLIP Text Encode just to try a scene without the "35mm film" line, this node is for you. CustomTextInputSelector_Standalone - display name Text Input (Custom Selector) - takes a few text blocks, lets you pick which ones count with a tiny string like 0,2 or 1:, and hands back both a list and one joined string.
No pixels, no model - it holds a value on one wire and makes the composition of that value editable.
How the blocks stack up
Under the hood it builds one flat list: every prefix block, then text, then every suffix block. The selector is parsed into indices, and those blocks come back out.
The two optional inputs are typed *, ComfyUI's wildcard socket, so they take a string or a list of strings: one string is one block, a list is one block per item. Unwired, they contribute nothing - an unconnected optional input never arrives, which is the None-means-absent convention every switch node in ComfyUI is built on.
So your index is only stable if the block count upstream is stable. Wire a three-item list into prefix and your main text is now block 3, not block 0. Nothing errors; you just get a different prompt.
The inputs that matter
text (multiline) is the main block, and it's always a block: the default is an empty string, so an empty box still occupies an index.
selector (defaults to :) is the actual control surface:
| You write | You get |
|---|---|
| (empty) | all blocks |
| 2 | block 2; -1 is the last |
| 0,2 | blocks 0 and 2, in that order |
| 1:3 | blocks 1 and 2 (end exclusive) |
| -2: | the last two |
Two outputs: text_list, the selected blocks as a LIST, and concat_text, the same blocks joined with no separator at all. concat_text is the one you'll actually use - wire it into any STRING input, most obviously the CLIP Text Encode prompt. Since its text is a widget, right-click it and pick Convert widget to input first - the standard ComfyUI gesture for turning a typed field into a socket.
Installing it
It's a one-node pack from h1531095, first released August 2026, MIT-licensed. Search Text Input Selector in ComfyUI Manager (it's on the Comfy Registry, so it should be indexed), or do it by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/h1531095/Comfyui-TextInputSelector
Restart ComfyUI; it appears under custom/text. Zero dependencies - the pyproject.toml declares an empty dependency list and the README agrees - the best thing you can say about a pack in ComfyUI's world: it can't join the dependency pileup. No model files, no compile step.
Where people get burned
The failure mode here is silence, not a red error box.
- A typo'd selector gives you an empty prompt. Range endpoints get clamped, and a part that isn't a number is swallowed by a
try/except. So1;3selects nothing,concat_textcomes out"", and your CLIP Text Encode happily encodes the empty string. No error anywhere - just an image that ignores your prompt. - No separator in the join.
"B"and"C"concatenate to"BC". Put the spaces and commas in the block text itself. - Reversed ranges are empty, and there's no step.
3:1returns nothing. Despite the "Python-slice-style" billing,0:6:2behaves as0:6. text_listis a LIST, not a per-item execution. One list value on one wire: it won't run the downstream node per block, and it won't connect to a STRING socket.*accepts things that aren't text. Wire an IMAGE or MODEL intoprefixandconcat_textstringifies its Python repr into your prompt. Strings only, really.
Should you reach for it
It's for one habit: three or four prompt modules - a character line, a style line, a camera line - on fixed wires, dropped or reordered by editing one short field instead of dragging wires. Subject-then-camera-then-lighting is still the ordering that works.
Getting several blocks into prefix needs an upstream node that emits a LIST, because one socket takes one wire. And it's a first-release, single-maintainer pack with no community footprint - ComfyUI's ecosystem has no code review, so read the eight lines of Python if you care. It's dependency-free and deterministic, though, so the blast radius is small. On Flux/Qwen-era LLM-template encoders, remember that prompt weights get discarded and the negative box does nothing. Block selection still works, because it's text assembled before the encoder sees it.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| text | STRING | — | |
| selector | STRING | : | — |
| prefixopt | * | — | |
| suffixopt | * | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| text_list | LIST | — |
| concat_text | STRING | — |