ICHIS Aspect Ratio Plus
SDXL's aspect-ratio cheat sheet, wrapped in a node
- WIDTH
- HEIGHT
- LATENT
- SELECTED_RATIO
- NEXT_STEP
Every SDXL workflow starts the same way: an Empty Latent node, and you frantically trying to remember which pixel dimensions are actually 3:4. The ICHIS Aspect Ratio Plus node from the Ichis pack is that node with the cheat sheet welded on. Pick a ratio and it hands you the correct width, height, and a ready-to-sample latent - and if you want, it will roll through ratios for you across batches instead of you editing the widget by hand every time.
What it actually does
It's a drop-in replacement for core EmptyLatentImage, except the aspect_ratio dropdown carries the eight SDXL-recommended presets (1:1 square 1024x1024, 3:4 portrait 896x1152, 9:16 portrait 768x1344, 16:9 landscape 1344x768, 21:9 landscape 1536x640, and the rest). Pick one and it outputs:
WIDTHandHEIGHT- the pixel dimensions, handy if you're doing size math downstream.LATENT- a blank 4-channel tensor at 1/8 resolution. SDXL's VAE downsamples 8x per side into 4 latent channels, so the node builds it the exact same way core ComfyUI does, then KSampler adds the noise. Feed it straight into the sampler.SELECTED_RATIO- the human-readable name of what won.NEXT_STEP- which step index is coming up next, if you care to display it.
The inputs that matter
aspect_ratio- the preset picker. This is the one you'll set 95% of the time.upscale- a plain multiplier on both dimensions (0.1–10). One catch: the result gets integer-truncated and the latent iswidth // 8on each side. Upscale to something not divisible by 8 and your reportedWIDTHwon't quite match what decodes. Keep multiples of 8 unless you like off-by-one geometry.mode-normal(use the picker),step(cycle through the enabled ratios one per queue, wrapping around), orrandom(seeded choice).size_modeand theinclude_*toggles - filter which ratios are eligible when cycling or rolling randomly. You can, for example, restrict to landscape only and step through them.seed(random mode),reset_step(jump the step counter back to zero),batch_size(how many identical latents).
One behavior worth knowing: in normal mode the node caches like any ordinary node, but step and random force themselves to re-run on every queue because their IS_CHANGED returns a fresh timestamp. That's deliberate - a stepped or random ratio has to execute even if nothing else changed. If everything seems to re-run every time, check you haven't left it in random.
How to install it
Install the whole pack - all the ICHIS nodes ship together:
cd ComfyUI/custom_nodes
git clone https://github.com/ichabodcole/ComfyUI-Ichis-Pack
Then restart ComfyUI. You can also just search for ComfyUI-Ichis-Pack (or "Ichis") in ComfyUI Manager and click install. There are no model downloads and no heavy dependencies - the pack's only real dependency is torch, which you already have.
Troubleshooting
The latent is zeros, not noise - that's correct and matches core EmptyLatentImage; KSampler adds the noise. If your images come out a different size than the picker promised, you upscaled to a non-multiple-of-8 dimension. And if random mode ignores your picks, remember the include_* toggles and size_mode filter the pool; with everything toggled off it silently falls back to the manually selected ratio.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | 1:1 square 1024x1024 | 8 options: 1:1 square 1024x1024, 3:4 portrait 896x1152, 5:8 portrait 832x1216, 9:16 portrait 768x1344, 9:21 portrait 640x1536, 3:2 landscape 1216x832, +2 |
| upscale | FLOAT | 1.00.1–10 | — |
| batch_size | INT | 11–64 | — |
| mode | COMBO | normal | 3 options: normal, step, random |
| size_modeopt | COMBO | all | 3 options: all, portrait only, landscape only |
| seedopt | INT | 00–18446744073709550000 | — |
| include_1_1opt | BOOLEAN | true | — |
| include_3_4opt | BOOLEAN | true | — |
| include_5_8opt | BOOLEAN | true | — |
| include_9_16opt | BOOLEAN | true | — |
| include_9_21opt | BOOLEAN | true | — |
| include_3_2opt | BOOLEAN | true | — |
| include_16_9opt | BOOLEAN | true | — |
| include_21_9opt | BOOLEAN | true | — |
| reset_stepopt | BOOLEAN | false | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| WIDTH | INT | — |
| HEIGHT | INT | — |
| LATENT | LATENT | — |
| SELECTED_RATIO | STRING | — |
| NEXT_STEP | INT | — |