π§ Flux Empty Latent (Enhanced)
A 72-preset resolution dropdown for Flux β just don't forget the 16 channels
- LATENT
- width
- height
Resolution matters more for Flux than almost any model you've used. Aspect ratios that "just work" on SDXL will give you warped hands and doubled subjects on Flux, which is why a community resolution guide pulling 300+ upvotes exists at all. Flux Empty Latent (Enhanced) (FluxEmptyLatent) is that guide, compressed into a dropdown: 72 preset resolutions spanning squares, portrait, landscape, ultrawide, mobile 4:7, and full 16:9 up to 1920x1080. You pick, it builds the empty latent, you move on with your life.
It's the meatier of the two nodes in the ComfyUI-SD3.5-Latent-Size-Picker pack, and the "Enhanced" in the name is doing real work - the presets alone beat poking numbers into the core EmptyLatentImage node.
What you actually set
Most runs, you touch two things:
- resolution - 72 presets like
1024x1024 (1:1),768x1152 (2:3),1280x720 (16:9). The list is a genuine Flux ratio cheat-sheet. - batch_size - empty latents to generate at once (up to 4096).
The rest are for when the preset list isn't enough. width_override / height_override let you type a custom pixel dimension, and aspect_ratio_lock is the genuinely nice touch: set it to Width and override width, and the node recomputes the height to preserve the preset's ratio (and vice-versa). invert_ratios swaps portrait/landscape. downsample_factor is the VAE's pixel-to-latent ratio - auto resolves to 8, which is what Flux's VAE actually uses, so leave it alone unless you know why you're changing it.
Output is the LATENT tensor plus width and height as INTs - wire those into a downstream node that needs to know the real dimensions.
How it works, and its one quirk
It parses "WxH (ratio)", applies overrides (with the ratio lock), then computes the latent as ceil(pixels / factor) per side and creates torch.zeros([batch, latent_channels, latent_h, latent_w]). Unlike the SD3.5 node in this pack, it does not snap your pixel dimensions to a multiple of 64. Instead it rounds the latent up and reports the actual covered pixels back through the width/height outputs. So pick 1664x936 and you might get back a slightly larger effective size than you typed. Not a bug - just read the INT outputs rather than assuming your request came back verbatim.
The trap that will actually bite you
latent_channels defaults to 4, and that's wrong for Flux. Flux's VAE is a 16-channel latent space - the whole reason core ComfyUI has a separate EmptySD3LatentImage node that hardcodes 16. The node's own docstring admits it ("4 for SD, 16 for Flux"), but the default won't save you. Feed a 4-channel latent to Flux and you get errors or visual garbage. Set latent_channels to 16 before your first Flux run - or, for that matter, before an SD3.5 run, since it's 16 there too. The default only makes sense if you're reusing this as an SDXL picker.
Install and gotchas
Same pack, same dead-simple install. ComfyUI Manager β search "ComfyUI-SD3.5-Latent-Size-Picker" β Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/theshubzworld/ComfyUI-SD3.5-Latent-Size-Picker
Restart after. There's no requirements.txt and no model downloads - it's pure torch + ComfyUI, ~150 lines, MIT-licensed. The README's clone URL references an old GitHub account name (mithamunda); the repo moved to theshubzworld, and GitHub redirects renames, so either URL clones fine.
Troubleshooting
- Flux output is broken or the sampler refuses the latent - 99% chance it's
latent_channels=4. Set it to 16. - Aspect ratio comes back wrong when you override - check
aspect_ratio_lock;Unlockedoverrides both axes independently, whileWidth/Heightpreserve the preset ratio. - Dimensions look bigger than you asked - the ceil-then-report behavior above. Trust the
width/heightoutputs.
It's a small, single-purpose node, but it's the kind of thing that quietly removes a daily annoyance - and once you've set 16 channels, it's the one you'll actually reach for over the core empty-latent nodes.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution | COMBO | 1024x1024 (1:1) | 72 options: 512x512 (1:1), 576x576 (1:1), 640x640 (1:1), 704x704 (1:1), 768x768 (1:1), 832x832 (1:1), +66 |
| batch_size | INT | 11β4096 | β |
| width_override | INT | 00β16384 | β |
| height_override | INT | 00β16384 | β |
| aspect_ratio_lock | COMBO | Unlocked | 3 options: Unlocked, Width, Height |
| latent_channels | INT | 41β16 | β |
| downsample_factor | COMBO | auto | 3 options: auto, 4, 8 |
| invert_ratios | COMBO | No | 2 options: No, Yes |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | β |
| width | INT | β |
| height | INT | β |