Empty Latent by Size (WLSH)
Empty Latent by Size (WLSH)
- latent
- width
- height
The pack's own README is refreshingly blunt about this one: it's "nearly identical to the default empty latent node." Same width, same height, same batch size - if you dropped ComfyUI's stock Empty Latent Image node into your graph, this does the exact same job. The one difference, and the entire reason it exists, is that it also hands back width and height as separate integer outputs alongside the latent, which the stock node doesn't give you.
That sounds small until you actually need those numbers somewhere else in the graph and realize the stock node makes you either retype the values a second time or add a completely separate "get image size" style node just to extract them. This node saves that step - set your dimensions once, and both the latent and the numbers come out of the same box, ready to feed a filename string, an SDXL conditioning node's target size fields, or a crop calculation downstream.
Inputs: width and height, both INT, default 512, ranging 16 to 8192 in steps of 8 - the step-of-8 constraint matches how latent space actually quantizes, so you can't accidentally pick a dimension the VAE can't cleanly encode/decode. batch_size (1–4096, default 1) sets how many latents this generates in one pass.
Outputs, three of them: latent is the standard empty LATENT tensor - wire it into your sampler's latent_image input exactly like the stock node. width and height come back unchanged as plain integers, mirroring whatever you set on the inputs - genuinely just a passthrough plus packaging, not a calculation.
Installing it: search "wlsh_nodes" in ComfyUI Manager, or clone the pack manually:
cd ComfyUI/custom_nodes
git clone https://github.com/wallish77/wlsh_nodes
Restart ComfyUI. No models, no extra dependencies - it's a thin wrapper over standard latent construction.
When to reach for this instead of one of the pack's other latent nodes. If you already know your exact pixel dimensions and just want the numbers echoed back for convenience, this is the simplest option - no aspect-ratio math, no resolution lookup table, just what you typed in, returned as usable integers. If instead you want the node to pick dimensions for you based on an aspect ratio or a target pixel budget, that's a different job - look at Empty Latent by Ratio (WLSH) or Empty Latent by Pixels (WLSH) for that. And if you're specifically working SDXL and want its known-good training resolutions rather than typing arbitrary numbers, SDXL Quick Empty Latent (WLSH) is the more targeted choice.
Troubleshooting: since this is functionally the stock node plus two extra outputs, there's little unique to it. The one thing to double check is that your width/height actually land on the step-of-8 grid the widget enforces - if you're setting values programmatically from an upstream node rather than the widget itself, an off-grid number can still slip through depending on how it's wired, and a badly-sized latent is a common (if unglamorous) cause of a VAE decode producing artifacts at the image edges.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| width | INT | 51216–8192 | — |
| height | INT | 51216–8192 | — |
| batch_size | INT | 11–4096 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| width | INT | — |
| height | INT | — |