Nodes/ComfyUI-IfBranchRouter/If Branch Router
ComfyUI Node

If Branch Router

A ComfyUI node in logic/branch with 6 inputs and 33 outputs.

By Lingyuuuux·Created 4 months ago·Updated 4 months ago· 0
If Branch Router
  • condition
  • passthrough
  • if_1
  • if_2
  • if_3
  • if_4
  • if_5
  • if_6
  • if_7
  • if_8
  • if_9
  • if_10
  • if_11
  • if_12
  • if_13
  • if_14
  • if_15
  • if_16
  • if_17
  • if_18
  • if_19
  • if_20
  • if_21
  • if_22
  • if_23
  • if_24
  • if_25
  • if_26
  • if_27
  • if_28
  • if_29
  • if_30
  • if_31
  • if_32
  • otherwise
compare_asAUTO
conditions_json["0", "1"]
string_trimfalse
case_sensitivetrue
Categorylogic/branch

Inputs (6)

NameTypeDefaultDescription
conditionINT,STRINGValue used by the if checks. INT and STRING values are supported.
compare_asCOMBOAUTOAUTO compares as INT when both sides are integer-like, otherwise as STRING.
conditions_jsonSTRING["0", "1"]Stored by the UI. Without the UI, edit this as a JSON array such as ["0", "1"].
string_trimBOOLEANfalseTrim spaces before STRING comparison.
case_sensitiveBOOLEANtrueWhen STRING comparison is used, match upper/lower case exactly.
passthroughopt*Optional value to pass through the selected branch. If omitted, the condition value is output.

Outputs (33)

NameTypeDescription
if_1*
if_2*
if_3*
if_4*
if_5*
if_6*
if_7*
if_8*
if_9*
if_10*
if_11*
if_12*
if_13*
if_14*
if_15*
if_16*
if_17*
if_18*
if_19*
if_20*
if_21*
if_22*
if_23*
if_24*
if_25*
if_26*
if_27*
if_28*
if_29*
if_30*
if_31*
if_32*
otherwise*