Empty Latent
Pick a ratio, not pixels
- latent
- width
- height
Core ComfyUI's Empty Latent Image makes you type width and height and remember which combinations are divisible by 8. UtilEmptyLatent replaces that whole thought process: you pick an aspect ratio, it does the divisibility math, and hands you the latent plus the width and height it chose. If you've ever run a batch where every frame was a slightly different size because someone typed 1344x768 for one and 1024x1024 for another, you know exactly why this node exists.
How it works
Five named ratios - 21:9, 1.85:1, 16:9, 9:16, 1:1 - each paired with a long_side value. The node computes the short side from the ratio, then rounds both dimensions down to multiples of 8 (the latent-space requirement), and generates a zero-filled latent tensor of the right shape. The channels dropdown is where the architecture knowledge lives: 16 is for the DiT-era models - Flux, Lumina, SD3, and friends whose latents run 16 channels - and 4 is for classic SD/SDXL VAE latents. Pick the wrong one and nothing about the sampler works, so this node naming the choice explicitly beats a raw tensor.
The inputs
- ratio -
21:9/1.85:1/16:9/9:16/1:1. Same set as this pack's ImageCropResize, which is convenient: crop your reference to a ratio here and your latent to the same ratio, and they line up. - long_side (INT, default 1024, 256–4096, step 64) - the longer dimension in pixels.
- channels -
16(Flux/Lumina/SD3-style) or4(SD/SDXL). - batch_size (INT, default 1, up to 64) - how many latents to stack.
Outputs: latent (LATENT) for the sampler, plus width and height (INT) so you can feed the actual dimensions into conditioning nodes or other sizing logic without computing them yourself. Those extra int outputs are quietly the most useful part - they keep the rest of your graph in sync with what you actually generated.
Why you'd reach for it
Storyboard and video work lives on named ratios, not pixel dimensions - "give me a 16:9 panel, long side 1024" is how you think, and this node is that sentence. It also sidesteps the classic empty-latent footgun: forgetting whether your model's latent channels are 16 or 4. And because width/height come out as ints, you can wire them into aspect-aware text encoders or resize nodes without hardcoding.
Install
Ships in the IXIWORKS pack - ComfyUI Manager → search ComfyUI-VideoDescription → Install, restart, or clone into custom_nodes/. No extra dependencies; it's pure torch. If your workflow already uses core Empty Latent fine, there's no urgency to switch - but if you're tired of the divisibility dance, this is a one-node quality-of-life upgrade.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| ratio | COMBO | 16:9 | 5 options: 21:9, 1.85:1, 16:9, 9:16, 1:1 |
| long_side | INT | 1024256–4096 | — |
| channels | COMBO | 16 | 2 options: 16, 4 |
| batch_size | INT | 11–64 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| width | INT | — |
| height | INT | — |