📝 String Selector v2 (OreX)
A prompt library that rides along inside your workflow file
- String
- String Batch
Most prompt managers are a text file you keep alt-tabbing to, or a dropdown that forgets everything when you close the tab. String Selector v2 does the unglamorous version: it holds named prompts, and they travel inside the workflow .json itself. Share the workflow, the prompts come with it.
What it actually is
It's one of 28 nodes in comfyui-OreX, a pack by OreX (Oleg K.) and PaBoKor (Pavel K.) that's mostly image/video/audio utilities plus LLM connectors. This one is pure plumbing - no pixels, no VRAM. Every workflow is roughly 70% nodes that touch no pixels, and a prompt retyped into five CLIP Text Encode boxes is exactly the repetition they exist to kill. If you know rgthree's Power Prompt, same neighborhood, one notch more opinionated about storage.
Two places to keep things, and that's the whole design
The Custom tab belongs to the workflow. Names and texts save with the graph, the selected prompt shows in a word-wrapped field below the list, and drag-reordering sticks too. This is where the prompts for this image set go.
The Prompt / Style / Edit / LLM tabs belong to a shared library in OreX_StringSelector_v2.json, next to the node in custom_nodes/comfyui-OreX/. Every entry has exactly one type and the tabs are filters over that file. Heart pushes a Custom prompt into it; trash (with confirmation) removes one; double-click edits name, text and type. The library is shared across every workflow on the install - feature or surprise, see the traps below.
Mechanically, the Custom tab is serialized into the graph as prompt_names (newline-joined names) and prompts_json (a JSON array of texts), with the active prompt written into the prompt widget. Those fields are hidden behind the node's UI - don't hand-edit them.
The two outputs, and the one that matters
String is text_before + the selected prompt + text_after, joined with single spaces, empty parts skipped. Wire it into a CLIP Text Encode and you're done.
String Batch is the interesting one. It's a list output holding every Custom prompt (same before/after wrapping), and list outputs make ComfyUI run the downstream chain once per element. Convert the CLIP text widget to an input, wire String Batch into it, and one queued run gives one image per prompt - the "same seed, twelve variations" trick without queueing twelve times. Same idea as the old A1111 {this|that} bracket syntax, but with prompts you can name and reorder.
The catch nobody mentions up front: the library tabs never feed the batch. Only Custom entries do. Copy a library prompt into Custom if you want it in the batch run.
The inputs you'll actually touch:
select- 1-based index of the active Custom entry (clicking a row sets it for you).text_before/text_after- optional STRING sockets. They're force-inputs, so they only ever appear as wires; connect a PrimitiveString if you want to type into them.
Installing it
ComfyUI Manager → search the pack title comfyui-OreX (it lists as "Orex Nodes") → install → restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/orex2121/comfyui-OreX
pip install -r comfyui-OreX/requirements.txt
# restart ComfyUI
That requirements file is Pillow, soundfile, pydub, pyloudnorm, modelscope - none of which this node needs; its module uses only the standard library plus aiohttp, which ComfyUI ships. The pack's __init__.py imports all 28 modules up front, so a broken dependency can stop the whole pack loading. modelscope is the one to watch, though it's imported lazily inside the skin-retouching node.
Where people get burned
The pack's own README tells you to delete the node folder and reinstall. Do that and you delete OreX_StringSelector_v2.json - your whole library. It's the first line of the readme, so it's easy to follow and easy to regret. Hit the blue Backup button before any update; it downloads a copy without touching the original.
The library is global. Prompts you add in one workflow show up in every other workflow on that install. Custom entries don't.
Reordering is per type. Dragging a Style above a Prompt is rejected by the node's backend, and the file is always written grouped by type.
An empty Custom tab gives an empty batch list. Nothing downstream runs and it looks broken. Check the tab.
Library writes need the folder writable. It writes atomically (temp file, then replace) inside the pack folder, so a read-only container mount turns the heart and trash buttons into errors.
One honest note: the pack has essentially no community footprint - a reddit search for the name turns up nothing, so no thread to fall back on. The upside is a node that's ~200 lines of plain stdlib Python. Swapping between two prompts? Core PrimitiveString is less machinery. This earns its place with a roster: fifteen named prompts, some in the graph, some in the library, one click to pick.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| prompt_names | STRING | Prompt 1 | — |
| prompt | STRING | — | |
| prompts_json | STRING | [""] | — |
| select | INT | 11–9223372036854776000 | — |
| selection_state | STRING | {} | — |
| text_beforeopt | STRING | — | |
| text_afteropt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| String | STRING | — |
| String Batch | STRING | — |