Latent Image (Mango)
Skip the aspect-ratio math, pick a preset
- latent_image
- width
- height
Diffusion models don't generate images directly - they generate compressed latent tensors, and the empty latent you start from defines the output's dimensions. Latent Image (Mango) is the beginner-friendly version of that: instead of typing width and height and remembering that the latent is 8x smaller per side, you pick "16:9 landscape 1344x768" from a dropdown and get a ready-to-sample latent plus the width and height as integers.
It's a convenience node, nothing more mysterious than that. The value is that the presets are sane, common aspect ratios with sensible pixel dimensions, and the height/width outputs let other nodes - like a prompt node or a metadata field - know the resolution without you hardcoding it.
How it works
The node maps your chosen preset to explicit width and height (the full 8x/8x and 16:9 variants are all there), then creates a zero-filled latent tensor of shape [1, 4, height // 8, width // 8] - 4 channels and an 8x per-side downscale, which is how ComfyUI represents empty latents. Samplers fill that tensor with noise and refine it; a VAE decode later turns it back into pixels. Zero-filled just means "nothing decided yet"; the sampler does the rest.
The one input and three outputs
- dimensions - the only input: a dropdown with twelve presets. Square, portrait (3:4, 5:8, 9:16, 9:21), landscape (4:3, 3:2, 16:9, 21:9, 32:9), plus "XL" variants of the two most-used non-square ratios (9:16 portrait XL 1024x1820 and 16:9 landscape XL 1820x1024) for models that like bigger canvases.
Outputs:
- latent_image - wire into your sampler.
- width / height - INT outputs, handy for display or wiring into anything that wants the resolution.
Installing it
Latent Image (Mango) ships in the Mango Node Pack:
cd ComfyUI/custom_nodes
git clone https://github.com/mang01010/MangoNodePack
Restart ComfyUI, or install "Mango Node Pack" from ComfyUI Manager. The README lists pip install safetensors as the only extra dependency.
Gotchas
The honest take: this node saves you maybe thirty seconds versus ComfyUI's native "Empty Latent Image" node, and it's a little less flexible (no free-form resolution, no batch size). Where it shines is in workflows that want the resolution readable elsewhere - the width/height outputs are genuinely useful, and the preset naming is clearer for beginners than raw pixel boxes. One real caveat: the "XL" presets run 1820px on the long side, which is a lot of pixels for some GPUs to chew through, so don't assume bigger is always better. If you know the exact resolution you want, the native node is arguably the better tool; if you want sensible presets and don't want to think about it, this one's fine.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| dimensions | COMBO | 12 options: 1:1 square 1024x1024, 3:4 portrait 896x1152, 5:8 portrait 832x1216, 9:16 portrait 768x1344, 9:16 portrait XL 1024x1820, 9:21 portrait 640x1536, +6 |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| latent_image | LATENT | — |
| width | INT | — |
| height | INT | — |