Nodes/DD-LogicNodes/DD NAND Getter
ComfyUI Node

DD NAND Getter

Fall back only when both conditions are true

By dumbdemon·Created 6 months ago·Updated a day ago· 0
DD NAND Getter
  • on_true
  • on_false
  • *
expression1true
expression2false

The NAND Getter is the value-returning version of the DD NAND Gate, and it answers the question people actually mean when they reach for NAND: "give me the good path in every situation except when both of these are true." Where the gate hands you a boolean, the getter hands you whichever value you chose for the outcome.

The shape is identical to the other getters in this pack: on_true and on_false (MatchType, any type you plug in) plus two boolean expressions, and one * output that matches the type of the inputs. When expression1 and expression2 are both true, you get on_false. In every other combination - one true, or neither - you get on_true.

The lazy part is the whole point

Like every getter in the pack, on_true and on_false are lazy, and the node tells ComfyUI which branch it needs before that branch executes. So if your two expressions are both true and the node routes to on_false, whatever expensive chain hangs off on_true never runs at all - no skipped-and-stubbed, genuinely not queued. That's the advantage over a stock switch that evaluates both sides and throws one away.

A real use

Think of it as a guard with a default. "Run the default path unless both blocker conditions are set." Concretely: you have two flags - "model is already high resolution" and "output doesn't need upscaling" - and when both are true you want to skip the upscale branch. Wire the default/upscale path into on_true, the skip path into on_false. Both conditions true → skip. Anything else → upscale. It reads backwards relative to AND until it clicks, and once it clicks it's the right tool for "unless" logic.

Watch the defaults

The expressions default to true and false respectively, so a fresh node has both-true not met and routes to on_true. That means an unwired NAND Getter passes your on_true value through. If you expected it to do nothing until you connect something, that's the behavior to know about - it's a pass-through by default, not a gate.

Installing

The shared DD-LogicNodes install applies: ComfyUI Manager → search DD-LogicNodes → Install → restart, or clone https://github.com/dumbdemon/DD_LogicNodes into ComfyUI/custom_nodes. No dependencies or models, but it needs a current-enough ComfyUI for the newer extension API - if the node's missing from your menu, update ComfyUI before troubleshooting anything else.

CategoryDD Logic Nodes/Getters

Inputs (4)

NameTypeDefaultDescription
on_trueCOMFY_MATCHTYPE_V3
on_falseCOMFY_MATCHTYPE_V3
expression1BOOLEANtrue
expression2BOOLEANfalse

Outputs (1)

NameTypeDescription
*COMFY_MATCHTYPE_V3