Int Switch (VantageV2)
Rule-based routing that only runs the branch you picked
- input_0
- value
This is the switch you reach for when a number should decide which pipeline runs, not just which value gets passed along.
What it is
Give it an integer and a short ordered list of rules, and it hands you the data branch belonging to the first rule that matches. Each rule is a comparison operator, a constant, and a zero-based input index. The input sockets (input_0, input_1, …) are wildcards, so a rule can select an IMAGE, a MODEL, a latent, a whole conditioning bundle - anything that plugs into a * socket.
The important architectural bit: those inputs are declared lazy. When a rule picks input_2, the backend asks for input_2 and nothing else. The losing branches are never evaluated. In a graph where each branch is a full loader → sampler → decode chain, that's the difference between a two-second run and a two-minute one. Switch index and Any Switch in the same pack don't do this; this one does.
Setting up the rules
The conditions field is a JSON string, and you don't hand-edit it - click the gear in the node's title bar to add, delete and reorder rules. Each rule takes an operator and a value and an input index. Supported comparisons are =, !=, <, <=, >, >=.
First match wins, and rule order is the whole logic. From the README's own example:
| Order | Condition | Selected input |
| --- | --- | --- |
| 1 | value = 0 | input_0 |
| 2 | value < 4 | input_1 |
| 3 | value >= 5 | input_3 |
Feed it 3 and rule 2 fires. Feed it 4 and nothing fires, because no rule covers 4 - you get None. That gap is deliberate (you control the overlap) and it's also the most common way people break their own workflow: write ranges that leave a hole, then wonder why one seed value produces nothing.
Two rules may point at the same input, which is a cheap way to say "0, 1 and 3 all get the fast path". The socket count expands to cover the highest index any rule references, and dropping rules that referenced the top indices trims the trailing sockets back.
Wiring it up
value is the comparison integer - a widget by default, convertible to an input when the number comes from somewhere else (a value switch, a steps field, a seed). One output, named value, typed *, into whatever the winning branch should feed.
Choose it over the alternatives by intent: Any Switch when the graph should figure out what's live, Switch index when a bare number picks a port with no conditions, this node when the number's meaning matters and you want the unselected branches to stay unexecuted.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/vantagewithai/Vantage-NodesV2.git
Restart, hard-refresh the browser, and the node is under Vantage/Utils. ComfyUI Manager should also find it by pack name - the repo carries a [tool.comfy] publisher block - but the clone is the documented path.
Nothing to install alongside it. No requirements file, no declared dependencies; the pack runs on ComfyUI's own stack, but it does need a recent ComfyUI because the frontend leans on the newer title-button and widget APIs. That's also why the gear dialog exists at all - it's a title-bar button, not a stock widget.
Common issues
If the output is None, check rule order first, then whether the selected socket is actually connected, then whether your ranges cover the value you fed in. A switched-but-unconnected input returns None rather than erroring, which is friendly right up until it isn't.
Don't expect to see rule changes without pressing Save in the dialog - the configuration is applied on save, not live.
And the pack-wide one: rules and their order save with the workflow, so a shared workflow carries its logic with it, but if an update changes the node's input schema, create a fresh instance instead of reusing the old one.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| value | INT | 0-2147483648–2147483647 | — |
| conditions | STRING | [{"operator":"=","value":0,"input":0}] | — |
| input_0opt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| value | * | — |