Krea Dual Resolution Selector
Two resolutions, one aspect ratio, zero math
- base_width
- base_height
- final_width
- final_height
- seed
A calculator that earns its keep as a pair
Let's be honest about what this node is: it takes an aspect ratio, a base megapixel count, and a final megapixel count, and hands back four integers. You could do that math in your head. But the Dual Resolution Selector isn't meant to sit alone - it's the resolution side of the pack's Two-Stage Sampler, and it's tuned for Krea 2. Run stage 1 at a small, fast base resolution, then let the sampler finish at the full size. This node keeps both halves in the same aspect ratio and rounds everything to ComfyUI-safe multiples, so your two passes stay composable instead of drifting into weird dimensions.
How it works
It's straightforward area math. Pick an aspect ratio, and for each of base_megapixels and final_megapixels the node works out a width/height that hits that pixel count (where 1 megapixel = 1024×1024 pixels), then rounds both dimensions to a multiple you choose. Concrete example: at 1:1, 1 MP gives exactly 1024×1024, and 2 MP gives 1456×1456. At 3:2, 1.5 MP base gives that classic 1536×1024. Nothing exotic - which is the point.
The one genuinely interesting feature is the aspect-ratio selection. Besides the fixed ratios (1:1, 4:5, 2:3, 9:16, 2.35:1, 21:9 and the rest - the set the author picked specifically for Krea 2's native aspect behavior), there are Random modes: all ratios, vertical-only, horizontal-only, or a constrained set of the seven most useful ones. The Random modes aren't actually random per frame - they resolve deterministically from random_seed, so you can lock a run and keep aspect choices reproducible.
Inputs and outputs
aspect_ratio- the enum: Random modes plus 11 fixed ratios.base_megapixels- default 1.0; the stage-1 resolution.final_megapixels- default 2.0; the target you want to end at.multiple- default 16, range 8–128 in steps of 8. This is the rounding grid for both dimensions; 16 keeps you comfortably inside ComfyUI's dimension conventions.random_seed- only matters in a Random aspect mode; it's what picks which ratio shows up.
The four outputs are base_width, base_height, final_width, final_height. The base pair feeds an EmptyLatentImage (that's your stage-1 latent); the final pair plugs into the Two-Stage Sampler's final_width/final_height, which is where the upscale-at-handoff actually happens. If you just want one resolution and no two-stage shenanigans, set both MP values the same and only use the base outputs.
Installing it
Same pack as the Two-Stage Sampler, so if that's already installed you're done:
cd ComfyUI/custom_nodes
git clone https://github.com/Auryg/Krea-2-Two-Stage-Sampler
# or: ComfyUI Manager → "Two-Stage Sampler and Krea 2 Resolution Picker"
Zero Python dependencies; the node only calls ComfyUI core.
The honest caveats
The rounding means you rarely land exactly on your target megapixels - 2 MP at 1:1 resolves to 1456×1456, which is 2.02 MP. Nobody cares in practice, but don't set multiple to 8 chasing exactness and then wonder why your numbers look odd. Also note random_seed has control_after_generate attached, so hitting Generate and seeing the aspect flip-flop is expected in Random mode, not a bug - turn that widget to "fixed" if you want the ratio to stick.
With 41 impressions this is the least-searched node in the pack, and that's fair: it's a thin utility. But it's the one I'd grab whenever I'm building a Krea 2 two-stage workflow from scratch, because it keeps the base/final math aligned for you instead of leaving you typing 1024 in three places and praying.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | 1:1 | 15 options: Random, Random Vertical, Random Horizontal, Random Constrained, 1:1, 4:5, +9 |
| base_megapixels | FLOAT | 1.00.1–16 | — |
| final_megapixels | FLOAT | 2.00.1–16 | — |
| multiple | INT | 168–128 | — |
| random_seed | INT | 00–18446744073709550000 | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| base_width | INT | — |
| base_height | INT | — |
| final_width | INT | — |
| final_height | INT | — |
| seed | INT | — |