WidthHeightPicker
The 512Γ512 β 512Γ512 Node Everyone Needs
- width
- height
It's the least glamorous node in the pack and maybe the one you'll use most. WidthHeightPicker takes a width and a height, scales them, snaps them to a multiple - and hands you back two integers. That's the entire job. It exists because SDXL and Flux workflows spend half their life converting one resolution into another: the checkpoint wants 1024Γ1024, the latent should be 768Γ768, the VAE-crop needs multiples of 64, and nobody wants to do that arithmetic by hand on every workflow.
The four inputs:
width,height- where you start from. Feed these from a "Get resolution" node (Crystools) or an EmptyLatentImage output, or just type them.output_multiplier(default 0.5) - the scale factor. 0.5 of 1024Γ1024 is 512Γ512; set it to 0.75 and you get a downscaled variant of whatever your base res is.multiple_off(default 64) - the snap value. The result gets rounded to the nearest multiple of this, which is how you keep every latent happily divisible by 64 (or 8 for some video models).
Outputs are width and height as INTs. That's it. Wire them into an EmptyLatentImage and you've got a resolution that's always model-safe.
How it works
The mechanism is two lines of math, and they're worth knowing because they explain the name: multiply each dimension by output_multiplier, then round(dimension / multiple_off) * multiple_off. Rounding to the nearest multiple, not floor, means you might get 576 where you expected 512 - that's the snap doing its job, and if the mismatch bugs you, that's what the multiplier is for. The node prints the final resolution to the console on every run, which is oddly helpful when you're debugging why the latent is 576 wide.
It shows up in Eden's own SDXL example workflow, chained off Crystools "Get resolution" nodes to derive latent sizes that feed EmptyLatentImage - a nice pattern for workflows that need to adapt to whatever the user's base resolution is.
Installing it
Part of the Eden.art nodesuite, under Eden π±. ComfyUI Manager β search "Eden" β install, or:
cd ComfyUI/custom_nodes/
git clone https://github.com/edenartlab/eden_comfy_pipelines.git
cd eden_comfy_pipelines
pip install -r requirements.txt
Restart to load it.
Common issues
There's almost nothing to trip over here, which is the point of a utility node. Two footnotes: it doesn't enforce a minimum - a output_multiplier of 0.1 on a 512 input rounds 51 to 64, and on a smaller input you can get absurdly small dims, so don't go overboard on the multiplier. And remember the rounding is independent per dimension, so an oddly-sized source can give you a width and height that don't preserve aspect ratio perfectly. If aspect ratio matters more than the snap, do the scaling yourself and let a multiple-of node handle just the rounding. Otherwise, this is the node that makes the math disappear.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 5120β9223372036854776000 | β |
| height | INT | 5120β9223372036854776000 | β |
| output_multiplier | FLOAT | 0.50 | β |
| multiple_off | INT | 641β264 | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | β |
| height | INT | β |