Nodes/ComfyUI Easy Use/If (🚫Deprecated)
ComfyUI Node Runs on cloud

If (🚫Deprecated)

The old wildcard ternary, deprecated in favor of easy ifElse

By yolain·Created 3 years ago·Updated 8 days ago· 2,633
If (🚫Deprecated)
  • any
  • if
  • else
  • ?

Short version: don't build anything new on this one. easy if lives in the pack's own Deprecated category now, and the pack tells you exactly what replaced it - easy ifElse. If you're here because an old workflow you downloaded has this node in it and ComfyUI is complaining, the fix is usually just to swap it for the modern version.

What it did

Three wildcard inputs - any, if, else - and one wildcard output. That's a ternary: it's ComfyUI's version of condition ? a : b. Whatever landed on any decided which of the other two got passed through as the single output. Because every slot is typed *, you could plug in numbers, strings, images, models - anything - which made it flexible but also made it a black box on the canvas: hovering a wire told you nothing about what was actually flowing through it or why one branch fired instead of the other.

That's the tradeoff every wildcard-routing node makes, and it's the same one the community argued about when a much bigger "route anything to anything" extension got pushback for making workflows impossible to debug even though it was convenient. easy if sits on the convenient side of that line, which is a reasonable thing to want during a quick experiment and a bad thing to leave buried in a workflow you'll open again in six months.

Why it's deprecated

easy ifElse does the same job with one real improvement: it takes an explicit boolean input instead of asking a wildcard slot to double as a condition. That means the thing deciding your branch is visibly a true/false value on the canvas, not an ambiguous "whatever landed on any." Same ternary logic, clearer graph. If you're starting fresh, use easy ifElse and wire a comparison (easy compare, or any boolean-producing node) into its boolean input - you get the identical branching behavior with a condition you can actually read at a glance.

The inputs and outputs

  • any (wildcard) - the condition slot. Whatever you feed it is evaluated for truthiness to decide the branch.
  • if (wildcard) - the value returned when the condition is true.
  • else (wildcard) - the value returned when the condition is false.
  • Output (wildcard, labeled ?) - whichever of if / else got selected.

All four slots accept any type, so keep if and else the same kind of thing (both IMAGE, both a number, whatever) - the node that consumes the output downstream only knows how to handle one type at a time.

Installing it

You'll get this node automatically with the pack - there's nothing to install separately for a deprecated node. ComfyUI Manager: search ComfyUI Easy Use, install, restart. Or by hand:

cd ComfyUI/custom_nodes
git clone https://github.com/yolain/ComfyUI-Easy-Use

then run install.bat on Windows or pip install -r requirements.txt, and restart.

Common issues

A downloaded workflow shows this as red/missing. It shouldn't - it's deprecated, not removed. If it's genuinely missing, update the pack; older Easy-Use installs occasionally have deprecated-category nodes trimmed in a refactor. Updating first is always the cheap move.

You can't tell why a branch fired. That's the wildcard-typing problem described above, and it's not fixable on this node - it's inherent to how it's built. Migrate to easy ifElse and feed it a real boolean; you'll get the same behavior with a condition you can trace.

Mismatched branch types cause a downstream error. Same rule as any ternary/switch node in this pack: whatever consumes the single output can only handle one type, so if if is an IMAGE and else is a LATENT, the run that takes the "wrong" branch breaks. Keep both sides the same type, on this node or its replacement.

CategoryEasyUse/🚫 Deprecated

Inputs (3)

NameTypeDefaultDescription
any*
if*
else*

Outputs (1)

NameTypeDescription
?*