Nodes/ComfyUI-DD-Nodes/DD Condition Switcher
ComfyUI Node

DD Condition Switcher

Swap positive/negative prompt branches with one number

By Dontdrunk·Created 2 years ago·Updated 21 days ago· 181
DD Condition Switcher
  • 条件1
  • 条件2
  • 条件3
  • 条件4
  • 条件
选择输出1

DD Condition Switcher picks one of up to four CONDITIONING inputs and passes it through. That's it - and if you've ever kept two prompt variants in one workflow just so you could toggle between them without losing the loser, you already know why this exists.

What it's actually for

Conditioning in ComfyUI is the output of a CLIP text encoder - your prompt, after the model has turned it into tensors. The usual trap: you want to try two phrasings of a prompt, or switch between a rich prompt and a short one, and the "keep both, delete later" instinct leaves you rewiring CLIP output into the KSampler every time. This node lets you build both branches once and choose with the 选择输出 (Select Output) integer. Change 1 to 2, hit queue, done. Same seed, same settings, different prompt - the cleanest A/B you'll get.

It also earns its place when you've got a workflow that wants either a long positive prompt or a negative-only variant for img2img, or when you're testing prompt weight schemes. Because conditioning is just data flowing to the sampler, you can even switch between a positive and a negative conditioning output if your sampler wiring allows it - the node doesn't care, it's type-blind to semantics.

How it works

List-and-index, identical to the DD Latent and Model Switchers that ship alongside it. Condition 1 and Condition 2 are required inputs, Condition 3 and Condition 4 optional, and the selected one comes out of the single 条件 (Condition) output. Source detail worth remembering: selecting an empty optional slot logs a warning and silently falls back to Condition 1. A selector reading "3" with no wire on port 3 is quietly giving you condition 1's data - check your ports before you trust a result.

Installation

It's one pack, one install. Either ComfyUI Manager → search "ComfyUI-DD-Nodes", or:

cd ComfyUI/custom_nodes
git clone https://github.com/Dontdrunk/ComfyUI-DD-Nodes
cd ComfyUI-DD-Nodes && pip install -r requirements.txt

Then restart ComfyUI. No models, no API keys, just the pack's pip dependencies (numpy, torch, opencv-python, pillow, and the rest).

The honest take

Conditioning switching is one of the few genuinely useful niche utilities in a pack that's mostly known for UI eye-candy, because prompt A/B testing is something every serious user ends up doing. Is it smarter than just having two copies of the workflow? It's cheaper and it keeps the graph readable. Just don't expect condition-driven routing - this is a manual knob, not a logic node. And as with all the DD nodes, the labels default to Chinese; switch ComfyUI's language to English in settings if you want the field names to match this article. The one behavior to keep front-of-mind is that fallback to Condition 1: it never throws, which is friendly, but it can quietly invalidate your experiment if you select an empty port.

Category🍺DD系列节点

Inputs (5)

NameTypeDefaultDescription
条件1CONDITIONING
条件2CONDITIONING
选择输出INT11–4
条件3optCONDITIONING
条件4optCONDITIONING

Outputs (1)

NameTypeDescription
条件CONDITIONING