๐ฉท Empty Latent Selector
Pick a resolution from a preset list
- LATENT
Every image workflow starts with an empty latent, and every empty latent needs a width and height. The stock node makes you type both and remember what's actually good for your model. This one replaces the typing with a dropdown of named, model-appropriate presets - "SDXL - Square - 1024x1024 (1:1)," "SD1.5 - Portrait - 512x768 (2:3)," and 40 more. Pick one, wire it to your KSampler, done.
Why this beats typing dimensions
Resolution isn't a free choice - models have native resolutions they were trained on, and straying from them costs you. SD 1.5 was trained at 512ร512 and falls apart much above that, throwing duplicated heads and stretched bodies. SDXL wants roughly a megapixel - 1024ร1024 and its aspect-ratio siblings like 1152ร896 and 832ร1216. Feed a model a resolution it never saw and you get anatomical chaos, not a bigger picture. Newer models shift the target again.
So the "right" dimensions are really a lookup table keyed on your model family and the aspect ratio you want, and nobody memorizes the whole table. This node is the table. The presets are labeled by family and ratio, so instead of recalling that SDXL portrait at 2:3 is 832ร1216, you read it off the menu. Fewer malformed generations from a resolution slip, less mental overhead.
How it works
Two inputs:
- resolution_preset - the labeled resolution, from 42 options grouped by model family (SD1.5, SDXL, and more) and orientation (Square, Landscape, Portrait) with the aspect ratio spelled out. The label tells you everything:
SDXL - Landscape - 1216x832 (3:2)is exactly what it says. - batch_size - how many empty latents to make at once (1โ64, default 1). Bump it to generate several images in parallel from the same setup.
The single output is LATENT - the empty latent tensor at the chosen size. It goes straight into your KSampler's latent input, exactly where an Empty Latent Image node would. That's the entire integration: it's a drop-in replacement for the stock empty-latent node with a smarter picker on the front.
Installing the pack
One pack for all ~170 nodes: ComfyUI Manager โ Install Custom Nodes โ search Bjornulf_custom_nodes โ install โ restart, or
cd ComfyUI/custom_nodes
git clone https://github.com/justUmen/Bjornulf_custom_nodes
Restart and it's under Bjornulf. No dependencies or models - it just builds an empty tensor.
Common issues
The one that actually bites: match the preset to the model you're loading. The node happily hands an SD 1.5 preset to an SDXL checkpoint or vice versa - it's just making a latent, it doesn't know or check what model you loaded. Pick an SD1.5 preset by habit while running SDXL and you'll get a tiny, degraded 512px result from a model that wanted 1024; go the other way and SD 1.5 will tile and duplicate. If your output looks wrong before you've even tuned the prompt, check that the preset family matches your checkpoint family first.
Second, batch_size multiplies VRAM - a batch of 8 at SDXL resolution is real memory, so back it off if you hit an out-of-memory error. And if you need a resolution that isn't in the list (an oddball ratio, or a newer model with its own native size the presets don't cover yet), fall back to the stock Empty Latent Image node and type it in; this node is a convenience layer over the common cases, not a replacement for the ability to set arbitrary dimensions.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution_preset | COMBO | 42 options: SD1.5 - Square - 512x512 (1:1), SD1.5 - Square - 640x640 (1:1), SD1.5 - Square - 768x768 (1:1), SD1.5 - Landscape - 640x480 (4:3), SD1.5 - Landscape - 768x512 (3:2), SD1.5 - Landscape - 704x384 (16:9), +36 | |
| batch_size | INT | 11โ64 | โ |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | โ |