Nodes/GraftingRayman/GR Prompt Selector
ComfyUI Node

GR Prompt Selector

Keep six prompts on deck and switch between them with one number

By GraftingRayman·Created 2 years ago·Updated about a month ago· 76
GR Prompt Selector
  • clip
  • positive
  • negative
  • prompts
positive_a1
positive_a2
positive_a3
positive_a4
positive_a5
positive_a6
always_a1
negative_a1
select_prompt1

If you generate a lot of images, you know the tedium this node was built to kill: you've got several prompt variations you want to cycle through, and the usual workflow is retyping or reconnecting a text node every time you want to try a different one. This node's whole point is to let you write up to six positive prompts once, then flip a single number to pick which one runs - no retyping, no rewiring, just change select_prompt and hit queue.

How it works

You write text into positive_a1 through positive_a6, one prompt idea per slot. select_prompt (1-6) picks which of those six actually gets encoded and sent to your sampler this run. always_a1 is separate from the six slots - it's text that goes out regardless of which one you selected, which is the natural place to put a style tag, a quality booster, or anything else you always want present no matter which variant you're testing. negative_a1 is a single shared negative prompt across all six positives, not six separate ones - so this node is built for "test different subjects/scenes with one consistent negative," not "test six fully independent prompt pairs."

The inputs and outputs that matter

  • clip - your CLIP model, required to actually encode any of the text into conditioning.
  • positive_a1 through positive_a6 - your six candidate prompts.
  • select_prompt (1-6, default 1) - the one input you'll actually touch between runs.
  • always_a1 - always-included text, independent of which slot is selected.
  • negative_a1 - the single shared negative.

Three outputs: positive and negative (CONDITIONING, ready to wire straight into your sampler), and prompts - a STRING output that echoes back the actual text that was used this run. That last one is worth wiring into a text-display node if you're testing several variants in a batch and want to confirm which prompt produced which image without tracing the graph by hand.

How to install it

ComfyUI Manager, search GraftingRayman. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/GraftingRayman/ComfyUI_GraftingRayman

Restart afterward. This pack needs OpenAI's CLIP installed separately or nothing imports - portable ComfyUI: .\python_embeded\python.exe -m pip install git+https://github.com/openai/CLIP.git; system Python: pip install git+https://github.com/openai/CLIP.git. Worth noting this node also takes a clip model input as a required wire - that's your loaded CLIP checkpoint from a checkpoint loader, a completely separate thing from the OpenAI CLIP Python package the pack needs to import at all. Don't confuse the two.

Common issues & troubleshooting

Pack won't load. Check your console at startup for the missing-CLIP-package import error and run the pip install above.

Changing select_prompt doesn't seem to change the output. Double-check you actually edited the slot you think you did - it's an easy mistake to type your new prompt into positive_a2 while select_prompt is still pointing at 1, or vice versa. The prompts output is the fastest way to confirm what actually got used.

Prompt out of range. select_prompt is clamped 1-6 by the schema, so you can't accidentally point it at an empty seventh slot - if nothing's coming out right, the problem is which of the six you populated, not an out-of-range index.

Want a different negative per prompt variant. This node doesn't support that - negative_a1 is shared across all six. If you need fully independent positive/negative pairs, you're better served chaining separate CLIP Text Encode nodes with a switch, rather than this node.

CategoryGraftingRayman/Prompt

Inputs (10)

NameTypeDefaultDescription
clipCLIP
positive_a1STRING
positive_a2STRING
positive_a3STRING
positive_a4STRING
positive_a5STRING
positive_a6STRING
always_a1STRING
negative_a1STRING
select_promptINT11–6

Outputs (3)

NameTypeDescription
positiveCONDITIONING
negativeCONDITIONING
promptsSTRING