Ard Resize
ARD Resize computes your sizes without touching a single pixel
- latent_width
- latent_height
- x_pos
- y_pos
Let's get the name out of the way: ARD Resize doesn't resize anything. No image goes in, no image comes out, and the node itself is flagged as an output node in the source, which just means ComfyUI always runs it. What it does do is compute the latent dimensions and centering offsets you need to generate an image at a specific aspect ratio - then hands you the numbers to plug into the rest of your workflow. It's a planning node with a misleading brand.
Here's the problem it solves. SDXL was trained on a specific set of aspect ratios (1024x1024, 1152x896, 1216x832, 1344x768, 1536x640 and their rotations), and generating wildly off those gives you stretched anatomy and double heads. The standard advice is: generate at a sensible aspect ratio, then crop or paste to fit. ARD Resize is the "figure out what those numbers are" step, done in one node instead of on a notepad.
How it works
You tell it your source/target image size (img_width, img_height, both default 1024) and your caps (max_width, max_height, both 1024). Then you set the aspect with width_ratio and height_ratio - defaults are 16 and 9, so out of the box it plans a 16:9 image. It compares the ratios to decide orientation: if width_ratio >= height_ratio it's landscape, so the long side is capped by max_width and the short side is computed from the ratio; portrait works the other way around. upscale_multiplier (FLOAT, default 1.0) scales the whole thing, so 1.5 with a 1024 cap gives you a 1536-ish long side.
Two details matter. The computed dimensions are rounded up to a multiple of 8 (the latent-legal size), which means it can nudge you 7px past your cap - usually fine, but know it. And the x_pos/y_pos outputs are the interesting part: they're the centering offset between your computed latent size and your img_width/img_height. Positive means the latent is bigger than the image and you crop a centered window out of it; negative means the latent is smaller and you offset it to paste centered on a larger canvas.
What you actually wire
latent_widthandlatent_height→ your Empty Latent, KSampler dims, or the width/latent inputs on the pack's ARD Control Box.x_posandy_pos→ a crop or offset/paste node that needs a top-left position (the pack pairs it with ARD Position and ARD 4crop Latent).
So a typical loop: compute dims → generate at those dims → crop/paste to your final canvas. It's a calculator, and it plays nice with the pack's Control Box if that's your control hub.
Install and gotchas
It's part of ComfyUI-Ardenius. Manager: search "Ardenius". Or:
cd ComfyUI/custom_nodes
git clone https://github.com/ArdeniusAI/ComfyUI-Ardenius
Restart, and it's under Ardenius as "Ard Resize". No models, no downloads.
One heads-up about the repo itself: the README is mostly an ad for the author's paid Ko-fi product (a "CPlus_Ardenius Control Box" sold as a zip), and its install steps talk about renaming that folder to CPlus_Ardenius and extracting into ComfyUI/custom-nodes/ - note the hyphen, that's a typo in their README; the real directory is custom_nodes. Ignore the paid link; the free git clone above is all you need for the ARD nodes.
Gotchas, in order of how often they bite: it only rounds up, so expect occasional 7px overshoot on the cap; there's no clamping and no VRAM awareness, so a 2x multiplier on a 1024 cap will happily plan a 2048-wide latent your GPU might choke on; and the img_width/img_height fields are easy to leave at defaults when they should match your actual canvas. The node is honest about what it does - it's a sizing and positioning helper for aspect-ratio workflows, not a magic resizer. Set the ratio, read the outputs, done.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| img_width | INT | 1024 | — |
| img_height | INT | 1024 | — |
| max_width | INT | 1024 | — |
| max_height | INT | 1024 | — |
| upscale_multiplier | FLOAT | 1.00 | — |
| width_ratioopt | INT | 16 | — |
| height_ratioopt | INT | 9 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| latent_width | INT | — |
| latent_height | INT | — |
| x_pos | INT | — |
| y_pos | INT | — |