🪠️ WWAA Image Switcher
Route one image or the other based on a boolean — an A/B switch for images
- image_a
- image_b
- output_x
- output_y
The WWAA Image Switcher is a two-input, two-output image router: when switch is False, image A flows to output X and image B to output Y; flip it True and they swap, A to Y and B to X. It's the image equivalent of an A/B toggle, from the WWAA-CustomNodes pack by WeirdWonderfulAI.Art.
Why bother, when you could just reroute wires by hand? Because "by hand" doesn't work when the choice is made by your workflow. Drive switch from a frontend toggle, a counter, or any boolean-producing logic, and you get a single graph that can present the "before" or "after" image to the next stage depending on state - useful for conditional processing, comparison demos, or testing two upscalers against the same source without maintaining two graphs.
How it works
The logic is dead simple - switch False is pass-through, switch True swaps - but the node is picky about input in a way worth respecting: it only accepts single images. Each input must have a batch size of exactly 1, and if you feed it a batch it raises a clear error rather than silently doing something weird. If you need to switch batches, this isn't the node.
The two outputs, output_x and output_y, always carry one image each, and since it's a pure router there's no processing - no resize, no color conversion, nothing. Whatever device and format the inputs arrive on, they leave unchanged.
Inputs that matter
image_a/image_b- the two candidates (single images only).switch- the boolean that picks the routing.
Installing it
It's in the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/hgabha/WWAA-CustomNodes
Restart ComfyUI. Or ComfyUI Manager → search "WWAA Custom Nodes" → install → restart. It's under 🪠️ WWAA/image. No models, no declared dependencies.
Gotchas
The batch-size restriction is the thing that'll bite you: if you're comparing rendered batches, you'll hit the "must be a single image" error immediately. Slice the batch down to one frame first (or just use it at the end of a pipeline where single images live). And note it routes, it doesn't merge - if you wanted a "switch that outputs whichever input is active," that's a different node design; this one always outputs both, just rearranged. For its narrow job - A/B routing driven by a boolean - it's clean and predictable, and there's no sharper tool for it in the pack.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image_a | IMAGE | — | |
| image_b | IMAGE | — | |
| switch | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| output_x | IMAGE | — |
| output_y | IMAGE | — |