Krea2 Full-Res Reference
Fix the Krea-2 reference that keeps landing in the corner
- conditioning
- vae
- image
- CONDITIONING
If you've outpainted a panorama with Krea 2 and your source photo came out wedged in the top-left corner, this is the node you were missing. Krea 2 is a genuinely good base for pano outpainting - it's the 12B open diffusion transformer that took the ecosystem over in 2026 - but its edit/outpaint path has a resolution bug that shows up exactly in this use case, and this node exists to patch around it.
The bug it fixes
Krea-2 edit conditioning (the Ostris TextEncodeKrea2OstrisEdit node, from the ai-toolkit family) caps reference images at 1 megapixel. On its own that's a sensible memory guard. The problem is that the reference's RoPE positions are assigned from zero, so when the reference grid is smaller than the target grid, the reference sits in the top-left corner instead of covering the frame. Concretely: a 2048×1024 target gives a 128×64 target grid, but the reference gets capped to 1456×720, a 91×45 grid - so your original photo covers only about half the area, anchored top-left. At 1408×704 or 1440×720 you'd never notice, because both are under 1 MP and the cap never fires. Anything above that falls apart.
For pixel-exact equirect outpainting the reference grid has to match the target grid exactly, which is what this node guarantees.
How it works
It encodes the canvas uncapped through the VAE and writes the result into the conditioning as reference_latents, overriding whatever the encode attached. You get a max_megapixels safety cap (default 8) so you can't accidentally ask for a 16K reference and OOM - 8 lets a 2048×1024 canvas through untouched. If it does have to cap, it area-downscales to the closest multiple of 16 and tells you in the console.
The cost is real but bounded: reference tokens grow quadratically with resolution. 1408×704 is ~3.9K tokens, 2048×1024 is ~8.2K. With the KV-cache model patch, the reference is computed once and reused across all steps, so you're paying for extra attention keys, not repeated encodes.
Inputs and outputs
Three required: conditioning (your Krea-2 edit conditioning), vae (the Qwen-Image VAE Krea uses - don't swap in a Flux one), and image (the canvas to encode as reference). One output: CONDITIONING, ready to feed your sampler.
Two things that bite
ModelSamplingFluxmust be set to the same resolution. Krea's mu is resolution-dependent; if the sampling model is at the wrong resolution the whole frame shifts even with a correct reference. This is a stated requirement in the node source, and it's the usual cause of "it still looks wrong."- Model setup isn't the pack's job. Krea 2 needs three files - the model, the Qwen3-VL text encoder (~8GB), and the Qwen-Image VAE - plus the Ostris edit node to condition on. That's the wider workflow; this node just fixes the reference alignment inside it.
Install
Part of Mickmumpitz-Nodes (MIT, deps are numpy/Pillow/opencv-python - no downloads for this node itself). ComfyUI Manager, search "Mickmumpitz", or:
cd ComfyUI/custom_nodes && git clone https://github.com/mickmumpitz/ComfyUI-Mickmumpitz-Nodes.git
Restart, find it as "Krea2 Full-Res Reference" under Mickmumpitz/Panorama. The niche is narrow - you only need it when outpaining above 1 MP with Krea-2 edit - but when you do, it's the difference between a pano and a photo glued to a corner.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| vae | VAE | — | |
| image | IMAGE | — | |
| max_megapixelsopt | FLOAT | 8.000.25–32 | Safety cap against running out of memory. 8 lets 2048x1024 through uncapped. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONDITIONING | CONDITIONING | — |