Empty Latent Ratio Select SDXL (Mikey)
Empty Latent Ratio Select SDXL (Mikey Nodes) — pick SDXL's actual trained aspect ratios
- LATENT
SDXL wasn't trained at every resolution - it was trained on a specific set of multi-aspect buckets, and generating outside those buckets is a common, easy-to-avoid cause of the stretched-anatomy, duplicated-limb look that trips up new users. This node exists so you never have to remember the exact numbers by hand: pick a ratio by name from a dropdown, get a correctly-sized empty latent out.
Why the exact numbers matter
Check the ratios this node offers against SDXL's actual documented training buckets - 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640 (and their rotations) - and they line up directly: this node's 4:3 [1152x896 landscape], 3:2 [1216x832 landscape], 16:9 [1344x768 landscape], and 21:9 [1536x640 landscape] options are exactly those trained resolutions, not approximations. Generating at one of these instead of an arbitrary size is the actual reason "off-ratio generation stretches anatomy" is a known failure mode - the model has real training exposure to these specific dimensions and comparatively little to anything else.
What it does
One dropdown, one number field, one output. ratio_selected gives you a labeled list - "1:1 [1024x1024 square]," "16:9 [1344x768 landscape]," their portrait mirror images, and more (the schema shows twelve entries plus a few extra beyond that) - and the node translates whichever one you pick into the correct width and height for an empty LATENT tensor, the same job ComfyUI's core Empty Latent Image node does with raw width/height fields, minus the guesswork. batch_size (1-64, default 1) controls how many latents come out in the batch, same meaning as anywhere else in ComfyUI.
Output is a single LATENT - wire it straight into your KSampler's latent input as the starting point for a text-to-image generation, exactly where you'd normally plug in an Empty Latent Image node.
Worth knowing: custom ratios
The README documents a user_ratios.json file you can create by hand in your ComfyUI root to add your own custom width/height entries beyond the built-in list - the mechanism is introduced alongside the pack's Prompt With Style node, but the underlying ratio-selection machinery is shared across the pack's ratio pickers, so it's worth knowing about even if you only ever touch this specific node. The format is a simple JSON object mapping a name to a {"width": ..., "height": ...} pair.
Installing
Comes with the full Mikey Nodes pack. ComfyUI Manager: search "Mikey Nodes," install, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/bash-j/mikey_nodes, then restart. No extra models needed - this is pure arithmetic, no inference involved.
Where people get it wrong
- Picking a ratio, then overriding the resolution somewhere downstream. If you chain a resize node after this and forget you're doing it, you can accidentally undo the benefit of starting on-ratio in the first place. Keep the pipeline straight: pick your ratio here, generate, and only resize after the base image looks right.
- Assuming any ratio works equally well. Square (1:1) is the most forgiving because it's the model's primary training resolution; the more extreme ratios (21:9, 9:16) push further from that center and can be a little less reliable for complex compositions - if something looks off at an extreme ratio, try the same prompt at 1:1 first to rule out a ratio-specific issue versus a prompt issue.
- Not knowing this doesn't include a refiner step. SDXL shipped with an optional refiner model for a second denoising pass, but the community mostly stopped using it once fine-tuned checkpoints matured - this node only builds the starting latent, it has no opinion on whether you run a refiner afterward.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| ratio_selected | COMBO | 15 options: 1:1 [1024x1024 square], 8:5 [1216x768 landscape], 4:3 [1152x896 landscape], 3:2 [1216x832 landscape], 7:5 [1176x840 landscape], 16:9 [1344x768 landscape], +9 | |
| batch_size | INT | 11–64 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |