Switch WH Pixaroma
Flip between a loaded image's size and a manual resolution with one click
- width
- height
Switch WH Pixaroma is the two-way switch for image dimensions: pick width and height from one of two sources with a single click. Wire one W/H pair into A, another into B, click A or B on the node, and whichever pair you chose flows out the width and height outputs. No rewiring cables when you change your mind.
The setup it's built for: you've got a Load Image feeding a workflow that sometimes wants the image's native size and sometimes wants a fixed manual resolution. Instead of pulling and re-plugging wires every time you switch modes, both live on the node and one click picks.
How it works
The inputs are the four slots that make two pairs:
- width_a / height_a - source A, e.g. a Load Image Pixaroma's
WIDTH/HEIGHToutputs. - width_b / height_b - source B, e.g. a Resolution or WH Pixaroma's manual size.
The outputs - width and height - carry the active pair's values. Click A or B on the node body to choose, and the active side is highlighted so you can see at a glance which one is live. Wire the outputs into an empty latent, a resize node, or anything that takes a size.
There's a forgiving fallback worth knowing: if only one pair is wired, that pair is used regardless of the toggle. So you can set up the node with just A connected during early workflow building and add B later - the node won't error, it just uses what it has. If nothing is wired at all, you get a clear error message rather than silence.
When you'd reach for it
- A workflow that alternates between img2img at native size and fixed-size generation.
- You want to compare "the source image's resolution" vs "my target resolution" without rewiring.
- Anywhere you have two W/H sources and want to switch between them without a pile of manual edits.
It pairs naturally with the pack's WH Pixaroma (the manual two-number field) - wire WH's outputs into one bank and a loader's size into the other, and you've got the whole flip-between-manual-and-native rig in two nodes.
Install and gotchas
Standard Pixaroma install - ComfyUI Manager (search "Pixaroma") or:
cd ComfyUI/custom_nodes
git clone https://github.com/pixaroma/ComfyUI-Pixaroma
Restart. No dependencies or model downloads.
Only real caveat is the pack-wide one: after an update, nodes can look blank because the browser is serving a cached copy - hard-refresh with Ctrl+Shift+R (Cmd+Shift+R on Mac) before you suspect a bug. And remember the outputs are plain INTs, so whatever you wire them into needs to accept numbers - which is almost everything that takes a size.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| width_aopt | INT | Width of source A (e.g. a Load Image Pixaroma's width). Click A on the node to send the A pair to the output. | |
| height_aopt | INT | Height of source A. Pairs with width_a. | |
| width_bopt | INT | Width of source B (e.g. a Resolution Pixaroma's width). Click B on the node to send the B pair to the output. | |
| height_bopt | INT | Height of source B. Pairs with width_b. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | The width from the active (highlighted) source. |
| height | INT | The height from the active (highlighted) source. |