π¦ Kraken Flux Empty Latent Image
Flux's Empty Latent Image Is Lying to You β This One Does the Math
- latent
- width_out
- height_out
- resolution
- preset_out
If you've ever wired Flux into the stock Empty Latent Image node and wondered why your img2img chain came out smeared, here's the thing nobody tells beginners: that default node hands you a 4-channel latent, and Flux's autoencoder doesn't work in 4 channels. Flux runs 16 channels at an 8Γ downscale per side - four times as much information per unit of latent as SDXL. Feed it the wrong shape and your encode/decode cycles get noisy instead of subtly wrong. That mismatch is exactly what this node exists to fix.
π¦ Kraken Flux Empty Latent Image builds the latent the way Flux actually expects and, more usefully, does the resolution math you were doing on a calculator. This is the front of the KrakenTools workflow: pick a megapixel and an aspect ratio, and it returns a latent plus the resolution and preset strings the pack's other two nodes read.
How it works
You pick a megapixel (how much total canvas you want) and a preset (the aspect ratio). It computes width and height so the area matches - a 1.0 MP 2:3 (Classic Portrait) lands at roughly 832Γ1216 - then rounds both to a model-friendly multiple. The divisible_by field handles that: Auto uses 64 for canvases over 1.5 MP, 32 for over 0.75 MP, 16 below. Flux is finicky about non-multiples-of-8, so this saves you the silent tile-in-your-generation problem.
The latent it returns is [batch, 16, h//8, w//8] - the 16 channels and the 8Γ factor are Flux's VAE geometry, not a guess. It also renders a little preview image showing the intended canvas size, so you can see the box before you burn a sampling pass.
The inputs that matter
megapixel- the total canvas budget (0.5 to 3.0, orCustomto type raw WΓH).preset- 64 choices. Plain ratios (2:3 Classic Portrait,16:9 Panorama) scale with your megapixel; theScreen:andVideo:presets (likeiPhone Wallpaper - 1170x2532orKlingAI Wide - 1344x768) are fixed sizes that ignore the megapixel field.divisible_by- leave it onAutountil you know why you need something else.batch_size- number of latents, for when you're generating variations.
Skip use_custom_aspect unless you need a ratio no preset covers. You get five outputs, but the two that matter downstream are resolution (a "736 x 1344" string) and preset_out (a "736x1344" string) - those feed KrakenUpscaleTileCalc and KrakenResolutionHelper so the whole chain agrees on the target. latent goes into your sampler as usual, and width_out/height_out are there for any node that wants plain integers.
Installing it
Through ComfyUI Manager, search Kraken Tools (or ComfyUI-KrakenTools). Or by hand:
cd /path/to/ComfyUI/custom_nodes
git clone https://github.com/krakenunbound/ComfyUI-KrakenTools
Restart ComfyUI. That's it - no requirements.txt, no model downloads, nothing beyond the torch/numpy/Pillow ComfyUI already ships. The whole pack is MIT-licensed and small enough to read in one sitting.
Common gotchas
- Don't expect exact dimensions from the presets. They're aspect-driven and snap to the divisible grid - at 1.0 MP,
2:3gives you ~832Γ1216, not 736Γ1344. That's fine; the pack's design is "close enough for sampling, exact at the end," which is whatKrakenResolutionHelperis for. - The
Screen:/Video:presets don't scale with megapixel. If you pick one of those,megapixelis ignored - the listed WΓH is what you get. - This is a young, small pack (first release late 2025, by "The Kraken" on X/YouTube). Don't expect a big community or a wiki - the source is the documentation.
One thing I'll say for it: it's the rare "empty latent" node that thinks in canvas area instead of raw pixels, which is exactly how Flux users actually talk about resolution.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| megapixel | COMBO | 1.0 | 12 options: 0.5, 0.75, 1.0, 1.25, 1.5, 1.75, +6 |
| preset | COMBO | Custom | 64 options: Custom, 1:1 (Perfect Square), 2:1 (Panorama Landscape), 2:3 (Classic Portrait), 3:4 (Golden Ratio), 3:5 (Elegant Vertical), +58 |
| use_custom_aspect | BOOLEAN | false | β |
| custom_aspect | STRING | 1:1 | β |
| width | INT | 102464β4096 | β |
| height | INT | 102464β4096 | β |
| divisible_by | COMBO | Auto | 7 options: Auto, 8, 16, 32, 64, 128, +1 |
| batch_size | INT | 11β64 | β |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | β |
| width_out | INT | β |
| height_out | INT | β |
| resolution | STRING | β |
| preset_out | STRING | β |