🪠️ WWAA Switch Int
Toggle two integers without rebuilding your graph
- output_1
- output_2
ComfyUI is full of switches that pick one input out of several - the classic A/B selector. WWAA Switch Int is the opposite shape of problem: you have two values and you want to route them through in the same order, or swapped, depending on a boolean. It's a two-way swap node, and for such a tiny thing it saves real graph surgery.
Think of the actual use case: you have a width and a height, or a seed pair, or min/max values, and you want to be able to flip which one lands where without dragging a second set of wires and nodes into your workflow. Drop this in, toggle one checkbox, done. It's the kind of utility that earns its place in the graph the first time you need to A/B two values quickly.
How it works
Three required inputs:
int_aandint_b- the two integers (wire these from anything that outputs an int: seeds, dimensions, batch sizes, math nodes).switch- the boolean that decides the output order.False(default) passes through as-is;Trueswaps.
The two outputs, output_1 and output_2, then hold either (int_a, int_b) or (int_b, int_a). The mechanism is exactly that - it's a pure passthrough with an optional swap, no state, no caching, no surprises. You can even drive switch from another node's boolean output, which turns this into a conditional router: compare two values upstream, and let the result decide the order of what flows through here.
Where people get burned: it only handles INT. If your pipeline is built on floats, strings, or images, this isn't the node - you'd need a per-type variant. But for integer routing it's a clean, dead-simple building block, and dead-simple is exactly what you want for something you'll be touching constantly while iterating on a workflow.
Install
It's part of WWAA-CustomNodes. In ComfyUI Manager, search "WWAA Custom Nodes" and install; or:
cd ComfyUI/custom_nodes
git clone https://github.com/hgabha/WWAA-CustomNodes
# restart ComfyUI
No extra dependencies, no model downloads - the pack's requirements.txt explicitly lists nothing beyond ComfyUI's stock libraries. It shows up under the 🪠️ WWAA/utilities menu.
The verdict
This is a thin utility node and it doesn't pretend otherwise. If you've never needed to swap two integers on a toggle, you'll install it, nod, and forget it exists - which is fine. But if you're building anything with two interchangeable values (seed swapping for reproducibility tests, dimension flipping for portrait/landscape experiments), it's the difference between a two-second toggle and a minute of rewiring. The WWAA pack is a grab-bag built by the WeirdWonderfulAI.Art team for their own workflows, and Switch Int is one of those "we kept needing this, so we wrote it" pieces that quietly keeps showing up in real graphs.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| int_a | INT | — | |
| int_b | INT | — | |
| switch | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output_1 | INT | — |
| output_2 | INT | — |