DD Or Getter
The if/then you'll actually use every day
- on_true
- on_false
- *
If you install this pack and only ever use one node, it should be this one. The DD Or Getter is the closest thing ComfyUI has to a plain "if this toggle is on, use this value, otherwise use that one" - and because its inputs are lazy, the value you don't pick doesn't get computed at all.
Three inputs: on_true and on_false (MatchType - they adopt whatever type you plug in, so images, latents, text, conditioning, even models all work), plus a single expression boolean. One * output. When expression is true, you get on_true; when it's false, you get on_false. That's it - and the "it" is genuinely useful.
Why this is the one to reach for
It's the simplest member of the getter family, and simplicity is the feature. A portrait-or-landscape decision: your comparison node outputs "is height greater than width" - that's expression. Wire the portrait-resize result into on_true, the landscape result into on_false, and out comes whichever one applies. Two model variants behind a toggle, two prompt styles, two upscale paths - same shape every time. This is the exact pattern that people ask "how do I do an if/then in ComfyUI?" about, and this node is a tidy answer.
The lazy detail that makes it worth it
on_true and on_false are marked lazy, and the node tells ComfyUI which one it needs before that side runs. If expression is true, whatever heavy chain hangs off on_false never executes - not skipped-after-the-fact, never queued. Wire a full second KSampler branch into on_false and toggle expression true, and that branch costs you nothing. Stock switch nodes evaluate both sides and throw one away; this doesn't waste the work in the first place.
What to watch
Both on_true and on_false must be the same type - the getter's template enforces it, and ComfyUI won't let you wire a latent into one side and text into the other. And expression defaults to true, so a fresh node routes to on_true until you connect it. Neither is a bug; both are worth knowing before you wonder why a branch is or isn't running.
Installing
The shared DD-LogicNodes install: ComfyUI Manager → search DD-LogicNodes → Install → restart, or git clone https://github.com/dumbdemon/DD_LogicNodes into ComfyUI/custom_nodes. No dependencies, no models, nothing to configure. The only real requirement is a current-enough ComfyUI - the pack is built on the newer extension API, and on old builds the node simply won't be in the menu.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| on_true | COMFY_MATCHTYPE_V3 | — | |
| on_false | COMFY_MATCHTYPE_V3 | — | |
| expression | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | COMFY_MATCHTYPE_V3 | — |