ComfyUI Node
If Branch Router
A ComfyUI node in logic/branch with 6 inputs and 33 outputs.
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)
| Name | Type | Default | Description |
|---|---|---|---|
| condition | INT,STRING | Value used by the if checks. INT and STRING values are supported. | |
| compare_as | COMBO | AUTO | AUTO compares as INT when both sides are integer-like, otherwise as STRING. |
| conditions_json | STRING | ["0", "1"] | Stored by the UI. Without the UI, edit this as a JSON array such as ["0", "1"]. |
| string_trim | BOOLEAN | false | Trim spaces before STRING comparison. |
| case_sensitive | BOOLEAN | true | When 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)
| Name | Type | Description |
|---|---|---|
| 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 | * | — |