Latent Aspect
Seven standard canvases for SD1.5 and SDXL, one dropdown
- ratio
- width
- height
Latent Aspect is the smallest node in this pack and the most honest about it: it's a lookup table with a dropdown. Pick a model family (SD15 or SDXL), pick one of seven named aspects, and you get back the ratio, width, and height of the standard canvas that family was trained on. That's the whole job, and it's worth having.
The reason it exists: SDXL was trained at a specific set of resolutions - 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640 and their rotations. Generate at one of those and you're in the model's comfort zone. Generate at 987x621 and you're gambling on composition and quality for no reason. This node just stops you from having to memorize the table, which is exactly the kind of trivial thing that eats brain-space mid-workflow.
The table
| Aspect | Ratio | SD15 | SDXL | |---|---|---|---| | Vertical | 9:16 | 512x768 | 768x1344 | | Photo | 4:3 | 683x512 | 1152x896 | | Portrait | 4:5 | 512x640 | 836x1254 | | Square | 1:1 | 512x512 | 1024x1024 | | Landscape | 3:2 | 819x512 | 1216x832 | | Widescreen | 16:9 | 910x512 | 1344x768 | | Cinematic | 21:9 | 1195x512 | 1536x640 |
That's the full set of aspect choices, and the SD1.5 numbers are a little quirky by modern standards - it's the old 512-based world, so "Square" is 512x512 while SDXL's is 1024x1024. If you peek at the code, the SD1.5 list has a few extra monitor-ish buckets (16:10 and friends) hidden behind the scenes, but the seven named options above are what you pick from in the dropdown.
Inputs and outputs
Just two inputs: modeltype (SD15 or SDXL) and aspect (the seven names). Three outputs: ratio (FLOAT), width (INT), height (INT). Wire width and height into an Empty Latent Image and you're generating at a trained resolution - pick Vertical on SDXL and your latent comes out 768x1344 without typing a single number.
Honest take: core ComfyUI's Empty Latent Image already lets you type any size you want, so this node's entire value is speed and standardization. If you generate at oddball resolutions all the time, you may not miss it. But if you share workflows, it's genuinely nice that the size is self-documenting by name ("Widescreen") instead of an unexplained 1344x768 sitting in a widget.
It also forms a tidy pair with the pack's Aspect from Image node - that one snaps a source image to these same canvases, while this one starts from a named ratio. Both feed the same width/height outputs into the same Empty Latent Image, so if you have one, you understand the other.
Installing it
No dependencies beyond what ComfyUI already bundles - this is pure data math, nothing to download. ComfyUI Manager: search for Comfy_Felsirnodes (or "Felsir"), install, restart. Manual: cd ComfyUI/custom_nodes and git clone https://github.com/Felsir/Comfy_Felsirnodes, then restart. The node shows up under Add Node → Felsir.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| modeltype | COMBO | 2 options: SD15, SDXL | |
| aspect | COMBO | 7 options: Vertical, Photo, Portrait, Square, Landscape, Widescreen, +1 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| ratio | FLOAT | — |
| width | INT | — |
| height | INT | — |