- width
- height
Komfy_AspectRatio is a dropdown with the boring work already done. It ships sixteen fixed aspect-ratio presets - square, landscape, portrait, ultrawide, and a couple of oddballs - and every one has the width and height precomputed. You pick 16:9 (Landscape - 1280x720) and out come two integers, 1280 and 720, ready to feed an Empty Latent Image or a resize node. No arithmetic, no misremembering whether 21:9 was 2560×1080 (it is, and yes you did misremember).
It's part of the Komfy sub-category inside the HMT Suite pack - a set of small value nodes. Nothing about it downloads a model or touches a checkpoint; it's pure plumbing.
What's in the dropdown
The presets cover the ranges people actually need:
- Square: 1:1 at 1024×1024 and 512×512
- Standard photo: 4:3 (1024×768), 3:4 (768×1024), 3:2 (1536×1024), 2:3 (1024×1536), 5:4 (1280×1024), 4:5 (1024×1280)
- Screen/video: 16:9 at 1920×1080, 1280×720, and 1024×576; 9:16 portrait at 1080×1920, 720×1280, 576×1024
- Ultrawide: 21:9 at 2560×1080 and 1920×823
Notice the logic: the SD-era 512 sizes sit next to 1024-based SDXL sizes and 720/1080 video sizes, so one node works for image and video workflows alike. There's no custom-entry option - if you need something off this list, a plain Integer node or "convert widget to input" is the better tool.
Inputs and outputs
One input, ratio (the dropdown, defaulting to 1:1 1024×1024). Two outputs: width and height, both INT.
Wire them straight into Empty Latent Image - that's the classic setup: pick a ratio, and your latent dimensions follow without touching a calculator. Because width and height come out as wires rather than typed-in widgets, one Komfy_AspectRatio can drive several nodes at once, and changing the ratio propagates everywhere with one edit. That's the "one source, many consumers" pattern that makes value nodes worth having.
Install
Same pack as the whole HMT Suite:
cd ComfyUI/custom_nodes
git clone https://github.com/tuyenhm68/ComfyUI-HMT-Suite.git
cd ComfyUI-HMT-Suite
pip install -r requirements.txt
Restart, then find it under HMT Suite > Komfy > Aspect Ratio.
Is it worth it?
Honest take: ComfyUI core already ships aspect-ratio-ish primitives, and this node doesn't compute anything - it's a curated lookup table. Its real value is that the choices are already made for you, and the two wire outputs fan out cleanly. If you're tired of typing 1280×720 from memory every video workflow, it's a genuine convenience. If you hate preset pickers, you'll ignore it inside a week. Both are fine.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| ratio | COMBO | 1:1 (Square - 1024x1024) | 16 options: 1:1 (Square - 1024x1024), 1:1 (Square - 512x512), 4:3 (Landscape - 1024x768), 3:4 (Portrait - 768x1024), 16:9 (Landscape - 1920x1080), 16:9 (Landscape - 1280x720), +10 |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |