ComfyUI Node

Conditioning Switch

The cheap way to A/B test two prompts

By HavocsCall·Created 2 years ago·Updated 9 months ago· 4
Conditioning Switch
  • Conditioning_1
  • Conditioning_2
  • Conditioning
  • Selection
Selection1

Conditioning Switch is the node you reach for when you want to compare two prompts but you're too lazy to rewire the graph. It takes two CONDITIONING objects, picks one on a 1-or-2 selection, and sends it on. If you're A/B testing positive prompts, negative prompts, or whole text-encoder setups, this is one of the most useful little nodes in the pack.

Why this beats switching text

Here's the thing that makes conditioning switching genuinely smart: by the time something is a CONDITIONING object, the expensive part - running your prompt through the CLIP text encoder - is already done. ComfyUI encodes text once, into a compact tensor bundle, and then the sampler just consumes it. So flipping between two conditioning inputs is nearly free, and it's dramatically cheaper than switching CLIPs or re-encoding the same prompt repeatedly.

Practical setup: run your positive prompt through one CLIPTextEncode, your alternate through another, and feed both into this node. Or use it to toggle between a plain prompt and a more detailed one mid-run. It's the standard trick for prompt-tuning without rebuilding your workflow JSON every time you want to try something.

How it works

Like every switch in this pack, it's a tiny match statement:

case 1: return (Conditioning_1, Selection,)
case 2: return (Conditioning_2, Selection,)

Inputs that matter:

  • Selection - 1 or 2. It's an INT input, so you can drive it from any integer source: a random node for a "surprise me between two prompts" run, a Logic Compare output for a decision, or just click it.
  • Conditioning_1 and Conditioning_2 - wire your CLIPTextEncode (or ConditioningCombine, ConditioningSetArea, etc.) outputs in here.

Outputs:

  • Conditioning - the selected one, ready for your KSampler's positive or negative slot.
  • Selection - passed through, so you can see (or reuse) which branch was active.

Where people get burned

Conditioning_2 is optional. Select 2 with nothing wired in and you get a None in its place - the sampler will usually choke with an obscure "expected CONDITIONING" style error. Wire both sides up front.

Also worth remembering: a switch selects, it doesn't disable. ComfyUI still runs whatever's upstream of both inputs, so both prompts get encoded each run. That's fine here because encoding is cheap - but it means Conditioning Switch isn't a tool for skipping a heavy branch, just for choosing one. If you want to not run something, mute it.

One more naming note: "Conditioning Switch" is a generic name that appears in other packs, so if you ever get a node-class conflict after installing several switch packs, that's what's happening - search Manager for the HavocsCall one specifically.

Installing it

ComfyUI Manager → search "HavocsCall" → install → restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/HavocsCall/comfyui_HavocsCall_Custom_Nodes

Restart and look under HavocsCall/Switches. No requirements.txt, no models to download, no extra Python packages - install is genuinely instant.

CategoryHavocsCall/Switches

Inputs (3)

NameTypeDefaultDescription
SelectionINT11–2
Conditioning_1CONDITIONING
Conditioning_2optCONDITIONING

Outputs (2)

NameTypeDescription
ConditioningCONDITIONING
SelectionINT