Image Switch
The author's 'masterpiece', and honestly it earns it
- input1
- input2
- image
The pack's README calls the Image Switch "a masterpiece imo" and admits the author uses "a lot of them." Hyperbole aside, this is the node that spawned the entire RvTools switch family - an Image Switch pulled from the ComfyRoll set and reworked into the two-input router you see here. It takes two images, one integer widget picks which one flows through, and one image comes out. That's it, and that's exactly why people use a lot of them.
How it works
Same recipe as every RvTools switch. The Input widget (default 1, min 1, max 2) selects between input1 and input2, and the chosen IMAGE exits the single image output. No resizing, no blending, no magic - a straight router. The value is organizational, not computational.
The behavior that makes them addictive: bypass the switch and ComfyUI passes input1 straight through. The author built the family around that quirk because his own workflows are full of groups that get bypassed rather than muted. A switch plus a bypass becomes an on/off switch for a whole image branch - no unplugging, no reconnecting.
The inputs that matter
- Input - the 1-or-2 router. Drive it from a control value if you want the choice automated, or click it to flip branches.
- input1 / input2 - the two IMAGE candidates, both
forceInput(cable-only).
The image output feeds whatever's next: a VAE Decode, an upscaler, a ControlNet preprocessor, a preview node, the next switch in a chain. Two of these lets you build a quick 4-way selector by cascading them.
Why you'd reach for it
Two common patterns, and both are about keeping a graph manageable:
- Branch selection. Two image sources (e.g., a hires pass output and an img2img pass output) competing for one consumer. One switch widget decides which branch the rest of the graph processes.
- Graph tidiness. In a big workflow, a switch gives you a single labeled decision point instead of a tangle of wires you have to trace every time you change your mind.
If you see the Image Switch v2 variant instead, that's the same node with a Purge_VRAM toggle added for GPU-memory flushes - grab that one if you're switching between VRAM-heavy branches on one card.
Installing it
Part of the RvTools v2 pack - no model files. ComfyUI Manager → search RvTools → install ComfyUI-RvTools_v2, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/r-vage/ComfyUI-RvTools_v2
Restart and look for RvTools v2: Version 2.5.x in the console. Extra deps (opencv-python, pilgram, pynvml, piexif) install automatically via Manager.
Troubleshooting
- Unwired branch → None. Switch to an input that isn't connected and downstream gets
None- either an error or silence. Both inputs need cables. - Bypassed switch ignores the widget. If it's bypassed, input1 flows through no matter what Input says. Confusing once, useful forever after.
- Old v1 RvTools references fail in Manager - the original repo was deleted, which is why v2 renamed all nodes (including this one). The author's successor project is ComfyUI_Eclipse.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| Input | INT | 11–2 | — |
| input1opt | IMAGE | — | |
| input2opt | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |