🪠️ WWAA Image Dimension Size
Longest or shortest edge, plus a quick multiplier — for orientation logic
- image
- edge_value
- upscaled_value
The WWAA Image Dimension Size node answers two small questions about an image: which edge is longer (or shorter), and what that edge is multiplied by some factor. It's a measurement utility from the WWAA-CustomNodes pack by WeirdWonderfulAI.Art, and its whole job is feeding orientation or sizing decisions into the rest of your graph.
That sounds trivial until you want a workflow that branches on "is this a portrait or landscape image?" - ComfyUI has no built-in "which way is this facing" primitive, and this node is the cheap way to get it. Give it an image, pick edge (long or short), and out come two INTs: edge_value (the raw dimension) and upscaled_value (that dimension times multiplier).
How it works
The implementation reads the tensor's height and width, compares them, and returns max(width, height) for long or min(width, height) for short. multiplier (1–10, default 1) produces a pre-multiplied upscaled_value, so you can get "the long edge at 2×" in one step without a separate math node. There's no resizing - it only reports numbers - and everything's also logged to the console.
The classic wiring: take the edge_value into a comparison or switch, and use upscaled_value as a target dimension for a conditional resize. The README frames it as useful for "determining image orientation and making conditional decisions" - exactly that.
Inputs that matter
image- any image.edge-longpicks the bigger dimension,shortthe smaller.multiplier- pre-scales the output value (1 = just the raw edge).
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
It's a measurement node, not a resizer - if you feed upscaled_value straight into a Scale node expecting it to be a fully-formed target, remember it's just one edge; pair it with the Image Dimension Calculator if you need a complete width/height pair rounded to a model-friendly multiple. Also, it works on whatever image you feed it, so a batch input will report the batch's first frame's dimensions. Otherwise there's not much to trip over: pick an edge, get two integers, branch on them. Sometimes the simplest node is the one that makes your "portrait vs landscape" routing finally click.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| edge | COMBO | long | 2 options: long, short |
| multiplier | INT | 11–10 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| edge_value | INT | — |
| upscaled_value | INT | — |