Eric Krea2 Resolution
Tell the Ultra node what size the image should be — or let the source image tell it
- image
- width
- height
- dims
- latent
Resolution math in ComfyUI is the kind of thing you solve once and then wish you'd written down. Eric Krea2 Resolution is that solution: it turns an aspect ratio plus a megapixel target (or, better, a source image) into concrete width/height integers - plus a blank KREA2_LATENT canvas at that size, ready to use.
The default mode is simple: pick aspect_ratio from eleven options (21:9 ultrawide down to 9:21 tall), set megapixels, and the node derives width and height the same way the Ultra node's own s1_megapixels math does. This is the node to wire into Multi-Stage Ultra's width and height inputs when you want explicit control over Stage 1 instead of trusting the aspect dropdown on the Ultra node itself.
The genuinely useful input is image. Connect any source image - say from a Load Image node - and width/height are taken from that image (rounded to /16), with aspect_ratio and megapixels ignored. That's the canonical img2img wiring:
Load Image → Eric Krea2 Resolution → width/height → Multi-Stage Ultra
Load Image → Eric Krea2 VAE Encode → init_latent → Multi-Stage Ultra
Size Stage 1 to your source, feed the encoded latent in, and your img2img pass starts at the right resolution with no mental arithmetic. Two small helpers: swap_orientation flips landscape/portrait without adding mirrored ratio entries, and the fill choice decides what goes in the output KREA2_LATENT canvas - noise (unit-variance white, a ready init for a full-denoise pass) or zeros. seed seeds that noise fill, and is ignored when fill=zeros. Since the Ultra node re-noises any init at its s1_start_step, at start step 0 the two fills are effectively equivalent anyway.
Outputs: width, height, dims (a string like "2048x1024", handy for labels and logging), and latent. The width/height outputs are what you'll actually wire forward - they're plain INTs, so they'll also feed non-Eric nodes that take size.
One note on the mental model: this node computes sizes, it doesn't resize anything. If you already have a latent and want to change its size, that's Latent Resize's job. Think of this as "decide the size," Latent Resize as "change the size," and the Ultra node as "use the size."
How to install
Part of EricRollei/Krea2_ComfyUI_Advanced. ComfyUI Manager → search "Krea2_ComfyUI_Advanced", or:
cd ComfyUI/custom_nodes
git clone https://github.com/EricRollei/Krea2_ComfyUI_Advanced
Restart, and the pack's shared prerequisites apply (git diffusers with Krea2Pipeline, transformers>=4.57.0, Krea 2 weights for anything downstream).
Common issues
- Width/height don't match the source image exactly - values round to /16. Close, but not pixel-identical; that's by design for the model.
- Nothing changes when you move
aspect_ratio- animageis connected, so it's overriding both. Disconnect the image to use the ratio math. - "Where's my image coming out?" - this node doesn't generate; it emits sizes and a blank latent. The picture comes from whatever you wire downstream.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect_ratio | COMBO | 5:4 landscape | 11 options: 21:9 ultrawide, 16:9 wide, 3:2 landscape, 4:3 landscape, 5:4 landscape, 1:1 square, +5 |
| megapixels | FLOAT | 3.000.05–16 | Target size in megapixels; width/height are derived from the aspect ratio. Matches the Ultra node's s1_megapixels math. |
| imageopt | IMAGE | Optional source image (img2img): when connected, width/height are taken from THIS image (rounded to /16) and the aspect_ratio + megapixels are ignored. Wire Load Image -> here -> the Ultra node's width/height inputs to size Stage 1 to your source picture. | |
| swap_orientationopt | BOOLEAN | false | Swap width and height (e.g. turn a landscape ratio into portrait) without adding a mirrored entry to the ratio list. |
| fillopt | COMBO | noise | Contents of the output KREA2_LATENT canvas. noise = unit-variance white noise (a ready init for a full-denoise img2img/refine pass); zeros = an empty canvas. The Ultra node re-noises any init at its s1_start_step, so for start_step 0 the two are equivalent. |
| seedopt | INT | 00–18446744073709550000 | Seed for the noise fill (reproducible). Ignored when fill=zeros. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |
| dims | STRING | — |
| latent | KREA2_LATENT | — |