Prompt Selector
A/B test your prompts — flip between standard and Ollama on one toggle
- clip
- positive
- negative
- positive_string
- negative_string
The ComfyUI-RPG-Characters pack can generate the same character two ways: the standard tag-string path and the Ollama path, where a local LLM rewrites everything as prose. Prompt Selector is the node that lets you keep both in one workflow and flip between them with a single dropdown - which is exactly what the pack's "with switch" example does, wiring both branches into one node and toggling prompt_source to compare.
If you've been manually swapping wires or commenting out prompt nodes to A/B test, this is your quiet convenience. It takes two complete prompt pairs (standard and ollama, each positive and negative), picks the active one based on the dropdown, encodes it with your CLIP, and hands back conditioning and the raw strings.
How it works
The node holds four string inputs plus a CLIP. When you set prompt_source to "Standard" or "Ollama", it selects that pair, runs the text through ComfyUI's built-in CLIPTextEncode, and returns four outputs: the two CONDITIONING outputs and the two original strings, passed through untouched. So you get the encoded result for the sampler and the plain text for a preview or log - same source, two views.
Everything is forceInput: the four prompt fields are wire-only, so you can't type into them. In practice you'd feed the standard pair from the two selector nodes (via the concatenator if you want them combined), and the ollama pair from an LLM node's text output. The dropdown is the only widget you actually touch.
Inputs and outputs
Inputs: standard_positive, standard_negative, ollama_positive, ollama_negative (all strings), clip, and prompt_source (the dropdown).
Outputs:
positive/negative- the encoded CONDITIONING for whichever pair is selected.positive_string/negative_string- the raw text of the selected pair, handy for a PreviewAny readout.
Install
Same pack, same drill: ComfyUI Manager, search RPG-Characters, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/lord-lethris/ComfyUI-RPG-Characters.git
Restart ComfyUI. No requirements.txt, no model downloads.
Common issues
- The dropdown flips, nothing changes. Check that both pairs are actually wired. Since everything is
forceInput, a missing wire means an empty prompt gets encoded, and you'll "A/B test" a blank against your real prompt. The string outputs are the fastest way to see what the node thinks it's sending. - It needs a CLIP even if you only want the strings. The node always encodes both polarities, so no clip means no outputs, full stop.
- Ollama side is dead? The ollama pair has to come from somewhere - an LLM node. That means the whole ComfyUI-Ollama + Ollama server stack has to be working before this side of the switch is interesting. The standard side works standalone; the ollama side inherits whatever the LLM setup does (or doesn't) do.
- One wart in the pack's code. The pack's
__init__.pyregisters a leftoverprompt_selector_nodekey that points at a module instead of a class. It's dead weight - the real node is registered underPromptSelectorNodeand loads fine, but if your ComfyUI log ever throws aboutprompt_selector_node, that's what it is, and it's harmless.
If you're comparing tag-style prompts against LLM-rewritten prose - which is genuinely worth doing on SDXL, where the two approaches produce visibly different results - this node is the cleanest way to keep both experiments alive in one graph.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| standard_positive | STRING | — | |
| standard_negative | STRING | — | |
| ollama_positive | STRING | — | |
| ollama_negative | STRING | — | |
| clip | CLIP | — | |
| prompt_source | COMBO | 2 options: Standard, Ollama |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| positive | CONDITIONING | — |
| negative | CONDITIONING | — |
| positive_string | STRING | — |
| negative_string | STRING | — |