🔧 SD3.5 Empty Latent Size Picker
A one-click resolution dropdown for SD3.5 (and the 16-channel catch)
- LATENT
- width
- height
Every ComfyUI graph starts the same way: an empty latent node where you punch in a resolution. The core EmptyLatentImage works, but it's a bare pair of width/height boxes - you either memorize SD3.5-friendly sizes or you guess. SD3.5 Empty Latent Size Picker (SD3_5EmptyLatent) replaces that with an 11-item dropdown of preset resolutions, so you can stop doing the math and just click.
Before the catch, here's what it's good at. The presets are all in the ~1-megapixel band where SD3.5 was trained - 640x1536 portrait up through 1344x704 landscape, with aspect ratios from 0.94 to 1.03. They're the same sizes you'll find scattered through community SD3.5 workflows. Pick one, and you get three things out: the LATENT tensor, plus the effective width and height as INTs. Those two extra outputs are the underrated part - wire them into a resolution-dependent node (an upscaler, a conditioning setup) and everything stays in sync automatically instead of you hardcoding the same number twice.
How it works
Mechanically it's boring in the best way. It parses the "WxH (ratio)" string, applies any overrides, clamps to sane bounds, snaps to a multiple of 64, and hands back torch.zeros([batch_size, 4, height // 8, width // 8]). The 8x division is the VAE's downsample factor - your 1024px image lives in a 128px latent until the VAE decodes it back.
The inputs you'll actually touch:
- resolution - the dropdown. 11 presets, default
1024x1024 (1.0). - batch_size - how many empty latents to make at once (up to 4096).
- width_override / height_override - set one to a custom pixel value (0 means "use the preset"). Both step by 8, which keeps you on proper multiples of 8 for the VAE.
- invert_ratios - swap width and height. Handy when you want the portrait version of a landscape preset without scrolling.
The catch: 4 channels is not what SD3.5 wants
Here's where you might get burned, and it's a real one. This node hardcodes a 4-channel latent - no option to change it. But SD3.5's VAE is a 16-channel latent space, same family as Flux's. That's exactly why core ComfyUI ships a separate EmptySD3LatentImage node (16 channels) next to the plain EmptyLatentImage (4 channels): feed SD3.5 a 4-channel latent and your sampler will choke or your output comes out garbage.
So treat this node honestly: it's an SDXL-style preset picker with an SD3.5 name. If you're actually sampling SD3.5, use core's EmptySD3LatentImage, or reach for the Flux node in this same pack and set its latent_channels to 16 - that one at least lets you choose.
Installing it
It ships in a two-node pack (this one plus FluxEmptyLatent), and it's about as painless as custom nodes get:
cd ComfyUI/custom_nodes
git clone https://github.com/theshubzworld/ComfyUI-SD3.5-Latent-Size-Picker
Then restart ComfyUI. Or skip the terminal entirely: open ComfyUI Manager → Custom Nodes, search "ComfyUI-SD3.5-Latent-Size-Picker", and hit Install. There's no requirements.txt, no model downloads, no Python packages - it only needs torch and ComfyUI itself, which you already have. The whole thing is ~100 lines of code under the MIT license.
One trivia note: the README's clone command still points at an old account name (mithamunda/...) while the repo now lives under theshubzworld/.... GitHub redirects renames, so either URL works - just don't get spooked when the folder names don't match the README.
Troubleshooting
- SD3.5 output looks wrong or the sampler errors - it's the 4-channel latent, not your install. Swap to
EmptySD3LatentImageor set channels to 16. - Nothing else breaks - this node has no dependencies to conflict with, which is more than most of your custom_nodes folder can say.
- The returned width/height are post-snap multiples of 64; if you override to
1028, you're getting1024in practice. That's by design, and the INT outputs tell you the truth.
For the niche use where you just want a curated dropdown of good SD3.5-ish ratios without thinking - it does that fine. Just don't feed its 4-channel output to an actual SD3.5 model and expect magic.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution | COMBO | 1024x1024 (1.0) | 11 options: 640x1536 (0.98), 704x1344 (0.94), 768x1280 (0.98), 832x1152 (0.96), 896x1152 (1.03), 960x1024 (0.98), +5 |
| batch_size | INT | 11–4096 | — |
| width_override | INT | 00–16384 | — |
| height_override | INT | 00–16384 | — |
| invert_ratios | COMBO | No | 2 options: No, Yes |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |
| width | INT | — |
| height | INT | — |