DD And Getter
The AND gate that hands you a value, not just a true/false
- on_true
- on_false
- *
This is the AND gate's useful sibling. The plain DD And Gate tells you a boolean; the DD And Getter takes that same two-condition check and hands you whichever value you picked for the outcome. That's the half of conditional ComfyUI that actually saves you from spaghetti.
Here's the setup you've probably already hit: you want to resize an image one way if it's portrait and another way if it's landscape, and only one path should actually run. That's exactly what a getter does. Feed it the boolean result of your comparison, give it the two candidate results as on_true and on_false, and out the other side comes the winner.
Inputs and outputs
on_trueandon_false- MatchType inputs, meaning they adopt whatever type you plug in. Images, latents, text, conditioning, a whole model - a getter doesn't care. It's type-agnostic routing.expression1,expression2- the twoBOOLEANconditions. Both default totrue.- Output: a single
*output that matches the type you fed in.
The logic: only when both expressions are true does it pass on_true; any other combination passes on_false. That's expression1 and expression2 deciding between two values.
The part that's actually special: lazy evaluation
Here's where this pack earns its keep over a plain switch node. The on_true and on_false inputs are marked lazy, and the node tells ComfyUI which one it's going to need before that side runs. If your expressions say on_false, then whatever expensive chain you hung off on_true - a whole second KSampler, a ControlNet pass, a face detailer - is never executed. At all. Not skipped-and-stubbed, but never queued.
That's a real difference from core ComfyUI switch nodes, which happily evaluate both sides and then throw one away. If you're building a workflow with two heavyweight branches and a toggle, a getter like this is the difference between "one branch runs" and "both branches burn your VRAM." Lazy inputs like this are exactly why people reach for logic packs at all.
Using it
Say expression1 is "face detected" and expression2 is "image is sharp enough." Wire the "good path" into on_true, the fallback into on_false. Both true → good path; anything else → fallback. If you only need one condition, the DD Or Getter (single boolean) is the simpler cousin and the better starting point.
One real constraint: on_true and on_false share a type template, so they have to be the same type. ComfyUI won't even let you drop a latent into one side and a text string into the other. That's by design - you can't meaningfully "choose between" two different types.
Installing
Part of the DD-LogicNodes pack - ComfyUI Manager, search DD-LogicNodes, Install, restart. Or git clone https://github.com/dumbdemon/DD_LogicNodes into ComfyUI/custom_nodes. No dependencies, no model files. Just keep ComfyUI reasonably current; the pack targets the newer extension API.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| on_true | COMFY_MATCHTYPE_V3 | — | |
| on_false | COMFY_MATCHTYPE_V3 | — | |
| expression1 | BOOLEAN | true | — |
| expression2 | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | COMFY_MATCHTYPE_V3 | — |