Image Dimension Resizer
Snap any resolution onto a standard bucket
- width
- height
Every diffusion architecture has resolutions it was actually trained at, and generating way off that - a random 1400x900 you typed because it seemed reasonable - is a common cause of the stretched-body, double-head artifacts people complain about. Image Dimension Resizer's job is to take whatever width and height you're currently working with and remap them onto one of a set of known-good target resolutions, without losing your original aspect ratio and pixel budget where possible.
Inputs and output. original_width and original_height (both default 512, up to 4096) describe the image dimensions you're starting from. target_dimensions is a preset dropdown - the pack ships at least 14 choices, including the common SD/SDXL buckets (512x512, 768x768, 1024x1024) and widescreen video-style presets (1280x720, 1920x1080), among others. Per the README, the node computes new width/height based on the selected target while preserving the original pixel count and aspect ratio - so rather than blindly forcing your image to the target's exact numbers, it uses the target as a resolution class to snap toward. Output is a plain width and height, both INT, ready to wire into an EmptyLatentImage or a resize node.
Installing it. Search "comfyui_gr85" in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/veighnsche/comfyui_gr85
Restart ComfyUI. No model downloads, no extra dependencies - it's arithmetic on integers.
Why this matters beyond convenience. SDXL, for instance, was trained on a fixed set of aspect ratios centered on roughly 1024x1024 - feed it a stretched or off-bucket resolution and you're generating outside the space the model actually learned. Flux is more flexible but still wants dimensions divisible by 64. Picking a preset here rather than typing arbitrary numbers keeps you inside the range where the model behaves the way you expect.
Common issues. Match the target_dimensions family to the model you're actually running - a 1920x1080 preset picked for an SD 1.5 checkpoint is going to produce a much worse result than the same preset used with a model actually suited to that resolution class, because the node snaps toward the target's shape but can't retroactively make a small model handle a large canvas well. If your final image still looks stretched after using this node, the more likely cause is that you picked a preset mismatched to your model's native training resolution, not that the node computed the numbers wrong.
Where it fits next to its siblings. GR85 ships three resolution nodes and this is the simplest entry point of the three - you give it a starting size and a target bucket, and it does the rest. If you need finer control (an explicit orientation flip, or a fixed pixel budget you want held constant while the ratio changes), GR85_ImageSizer and GR85_ImageSizerAll cover those cases; reach for this one first and only move to the others once you know specifically what extra control you're missing.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| original_width | INT | 5121–4096 | — |
| original_height | INT | 5121–4096 | — |
| target_dimensions | COMBO | 14 options: 512x512, 512x768, 768x768, 768x1024, 1024x1024, 1024x1280, +8 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |