⚗ Alchemica · Resolution
An empty latent that does the aspect maths for you — and knows 4 MP is the sweet spot
- latent
- width
- height
You want a 3:2 image at roughly 4 megapixels. You do the square root in your head, round to something divisible by 16, get one dimension wrong, and end up with a latent Krea 2 half-dislikes. This node is the fix: pick an aspect ratio, pick a megapixel count, get a correctly shaped empty latent back.
What it does
It builds an empty Krea 2 latent - 16 channels, the Wan 2.1 shape the architecture uses - at the side lengths that match your aspect and megapixel target. Both sides are forced to multiples of 16, which is the real constraint rather than a stylistic one: the latent is a factor of 8 smaller than the image, and the DiT's patchification wants the rest. Odd sizes don't throw an error, they just quietly degrade, so the rounding here is doing you a favour.
There are three inputs, and one of them you'll never touch again.
aspect - a fixed list: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, 5:4, 9:16, 16:9, 21:9. Default is 2:3, which is the portrait default this pack's example workflows use.
megapixels - the final resolution, 0.25 to 8, default 2.5. This is the number worth thinking about.
batch_size - how many latents, 1 to 16.
Outputs are latent, plus width and height as integers. The width/height pair is the underrated half: wire them into a SaveImage filename prefix or an EmptyLatentImage downstream and your file names stop lying about what they contain.
Picking the megapixel count
The author calibrated this and the measurements are unusually specific, so use them instead of vibes:
- 4 MP is the sweet spot. Detail per face area keeps improving up to 5 MP, but at 5 MP flat skin starts showing a repeating mesh texture. 5 MP is a close-up tool, not a default.
- The 3 MP and 4 MP calibration profiles are nearly identical (hand-off sigma 0.87 versus 0.864), so one calibration genuinely covers both. You don't need to re-measure when you nudge the size.
- Above roughly 1.5 MP you want two-stage sampling on. The all-in-one samplers default
due_stadito on for exactly this reason: compose at half resolution, refine at full. - Out of memory at 5 MP is expected on a 16 GB card. Drop to 4 MP or switch
modotoveloce.
The wider community story matches this. Krea 2 is a 12B model with a Qwen-Image VAE, and the recurring complaint thread on r/StableDiffusion is that most samplers and schedulers behave fine up to about 1200 px per side and then fall apart - one commenter's line was that 8 MP and up is where hands and extra arms start appearing, and the recommendation was to upscale after rather than generate bigger. The pack's calibration-based approach is one answer to that; generating at 3–4 MP and handing the result to SeedVR2 is the other.
Wiring it up
latent goes into the latent_image input of any Alchemica sampler. The tooltip on those samplers matters here: it wants the final resolution. In two-stage mode the first pass runs at a fraction of this - you don't give it a smaller latent, the sampler does the downscale itself.
The example workflow KREA2_RISOLUZIONE does a 2.5 / 3 / 4 / 5 MP ladder on one seed, which is a faster way to learn your own taste for this than reading anyone's table.
Installing
Part of the pack:
cd ComfyUI/custom_nodes
git clone https://github.com/Nessuno76/ComfyUI-AlchemicaSampler
Then restart the ComfyUI server - a browser reload won't pick up new nodes. It appears under Add Node → ⚗ AlchemicaMente → sampling. No extra models, no pip install.
Traps
Feeding it a latent it doesn't want. This node produces an empty latent for txt2img. For img2img or a hires-fix second pass you need a real encoded latent, and denoise < 1 on the sampler - which conveniently disables two-stage mode and (in Pro) previews.
Assuming bigger is better. 8 MP is available and 8 MP is the setting where Krea 2's VAE softness and the model's composition habits both get worse. If you need a large print, generate at 4 MP and upscale.
Rounding surprise. If you ask for 0.25 MP at 21:9 you'll get a very small image, clamped at 256 px on the short side. That's the floor, not a bug.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| aspect | COMBO | 2:3 | 10 options: 1:1, 2:3, 3:2, 3:4, 4:3, 4:5, +4 |
| megapixels | FLOAT | 2.500.25–8 | FINAL resolution |
| batch_size | INT | 11–16 | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| width | INT | — |
| height | INT | — |