Aspect Size
Stop guessing the resolution, let the math pick it
- Width
- Height
AspectSize is a calculator disguised as a node. You tell it which model family you're using and what aspect ratio you want, and it returns the exact Width and Height integers to feed your Empty Latent Image - sized to keep the pixel budget sane and divisible by 16. It's the kind of node you shrug at until you've spent an hour fighting "why does my 1342x763 latent look blurry."
Two inputs do everything. model_type is a three-way dropdown - SD (512×512 base), SDXL (1024×1024 base), Cascade (2048×2048 base). This sets the pixel budget: the node preserves total pixel count near the base while stretching to your ratio. Then aspect_ratio_width and aspect_ratio_height express the ratio itself - 16 and 9 for widescreen, 9 and 16 for portrait, 1 and 1 for square. Output is a Width and Height integer pair, both forced to multiples of 16 so your latent dimensions stay model-compatible (non-multiple-of-8 latents are where a chunk of "my image came out weird" bugs live).
The mechanism is straightforward: take the base resolution's pixel count, solve for dimensions that hit your ratio, then round to the nearest 16. That's it. Which is why the honest review is: for anything SD/SDXL-shaped, this is a nice convenience but not magic - you could do the same in a math node. Where it actually saves you is the mental overhead of remembering that SDXL wants ~1024² total and that 16:9 at that budget is 1152×640, not 1536×864 (which is 1.3MP, well over budget, and will likely degrade). The node keeps you honest about the pixel budget automatically.
The practical traps: it doesn't know your model's native resolution beyond the three buckets, so if you're on an Illustrious-based SDXL model that likes specific nonstandard sizes, trust the model's own guidance over this node. And the 16-divisibility guarantee is for SD/SDXL/Cascade - Cascade is the odd one, being a different architecture entirely, so don't be surprised if its outputs want a different treatment in practice. Also note it's a still-image calculator: video models (WAN, Qwen) have their own resolution norms, which is exactly what the V2 of this node exists to handle.
Should you grab V2 instead? V2 adds a customizable downscale_factor and a much bigger model_type list (QWEN, WAN22, 1440x, 4K, 8K, 16K...). If you only generate stills on SDXL and SD, this V1 is plenty and the extra model types are noise. If you touch video models or want control over divisibility, V2 is the one. Install for both: ComfyUI Manager → "DJZ-Nodes", or cd ComfyUI/custom_nodes && git clone https://github.com/MushroomFleet/DJZ-Nodes && pip install -r requirements.txt. It's a zero-dependency utility, so the only cost is the whole-pack install.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model_type | COMBO | 3 options: SD, SDXL, Cascade | |
| aspect_ratio_width | INT | 1 | — |
| aspect_ratio_height | INT | 1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| Width | INT | — |
| Height | INT | — |