Home Creators Posts Import Register Favorites Logout

Content

Hey everyone,

I am super happy that so many of you are excited about the new video! We focused heavily on the 3D generation part in it, so the txt2Panorama and img2Panorama workflows got less screen time than they deserved. Here is the standalone version, with all the stuff that did not fit.

Why panoramas, and why Krea 2

Krea 2 shipped without image editing, but the open source community (and especially Ostris) fixed that!

The patch makes Krea 2 read your reference image, which stock Krea 2 in ComfyUI ignores entirely. Under the hood it feeds your image in two places, once through the text encoder and once as clean image data the model holds onto.

But still you have to help krea out a bit. Basically you need to show krea 2 a varied set of images, one time raw and one final image with the corresponding caption, so krea learns what image editing actually means. There are several general image editing LoRAs already, but I wanted to train one specifically for 360 panorama creation, since I like krea's speed and quality a lot.

And having a equirectangular panoramas is great for a lot of things! Drop it into Blender as a world texture and you have the environment for your shot. Same in Unreal or any other 3D app. Use it as a backdrop behind your tracked geometry, view it in VR, or use it as the base for set extensions. I am also working on an HDRI version of this workflow, so you can also use these panoramas to light your 3D scenes.

Training the text to panorama LoRA

So for txt2panorama I built a dataset of hundreds of varied equirectangular images (2:1 images that unwrap the sphere into a flat rectangle) from Poly Haven, all CC0, captioned with descriptive text.

Very early in training the model already had the equirectangular layout: the horizon stays flat, the poles smear the way they are supposed to, and the vertical distortion behaves.

But it never really learns to create a seamless image. The left and right edge have to match exactly, or the panorama tears open when you wrap it around a sphere. So the workflow runs two more passes after generation.

Seam fix

Fixing the seam is pretty easy. We take the finished panorama and offset it horizontally by half its width. The two edges that used to sit on the outside of the frame are now next to each other in the middle. Mask a thin strip over that new center seam, inpaint it (repaint just that strip), then shift the image back.

This is reliable because the model never has to repair an edge. It only ever fixes the middle of an image, where it has context on both sides.

Upscaling

Generation happens at the resolution the model was trained on, because that is where the composition holds together. Going straight to a huge resolution gives you more pixels and a worse image.

Detail gets added afterwards in a tiled pass at low denoise. Low, because the pass should add texture and nothing else. Push the denoise up and you get detail, plus new objects appearing and the horizon drifting. The tiles wrap around the left and right edge, otherwise the upscale undoes the seam fix on the very last step.

Training the image to panorama LoRA

For training a LoRA that actually understands input images we need to take a different approach. First, you feed it a photo, the workflow projects it onto a 2:1 canvas and fills everything unknown with exact green (#00ff00), and the LoRA fills that green in as a full panorama.

I tried several approaches and the one by nomadoor worked best: https://huggingface.co/nomadoor/flux-2-klein-9B-360-erp-outpaint-lora

Klein and Krea were then trained on the same dataset, so I only had to build it once.

The dataset

A training pair is a control image and a target image. The control is a 1408x704 equirectangular canvas with one to three re-projected photos on it, every other pixel exactly

#00ff00, hard edges. The target is the same panorama, complete, as a lossless PNG.

Source is Poly Haven, CC0. 986 assets in the catalogue, curated down to 798 scenes with two or three virtual cameras each, so around 2000 pairs. Pure skies are out because there is no geometry to continue into. Studio and night are capped at about 5 percent each, for opposite reasons: studio stays in because a featureless surrounding is a real input case and teaches smooth continuation instead of invention, while too many dark tops teach the model to give up on the poles. At most two assets per numbered series, ranked by download count as a quality proxy, and no training scene shares a series with a holdout (test) scene.

Captions

For training we use three sentences as a trigger phrase instead of a one word caption. The dataloader prepends it to every caption at every step. Klein and Krea use the identical string:

Fill the green spaces according to the image. Outpaint as a seamless 360 equirectangular panorama (2:1). Keep the horizon level. Match left and right edges.

The .txt files hold one optional scene sentence, and two thirds of them are empty (660 non-empty out of 1997). When there is a sentence it is one lowercase clause, no period, no instruction words, no 360 vocabulary, capped at 240 characters. Subject, then light, then contrast and colour:

a sunlit wide city avenue at midday, clear sky, strong directional sunlight, high contrast and neutral asphalt tones
canary wharf, overcast morning, soft natural light, low-contrast partly cloudy sky, cool urban reflections and gentle shadows
small studio with large octaboxes casting soft directional artificial light on a white infinity cyc; medium contrast, neutral tones

The empty ones matter as much as the written ones. In my first build I put the same fixed string on all the pairs. The text channel carried zero variance and the LoRA came out unpromptable. Nomadoor's split is the same, 7 of 10 published sample captions empty.

That variance is why the scene prompt is a working control at inference (when you actually generate) instead of decoration. On Krea it is worth around 30 percent on my reconstruction score. The model only ever sees your canvas at a tiny 384x384 pixel budget, so with a photo covering 5 percent of the sphere there is almost no visual evidence of where this place is, and the sentence supplies it. That is the SCENE PROMPT (one sentence) node in the workflow, and every number in this post was measured with it filled in.

Training

On Flux 2 Klein this trained fast. By step 500 you could already see that the model understood what it was supposed to do. Krea 2 did not, and that is where I lost a few weeks.

The training settings

My mistake was reusing the same small, gentle recipe I used for Klein.

That recipe is right for Klein, because Klein already knows how to read a reference image. The LoRA only has to nudge that skill toward a narrow job (green means continue the scene), so small and gentle is exactly what you want.

None of that is true for Krea. Krea shipped with no editing at all, so the LoRA has to teach it that whole skill first, and only then the panorama job on top. That needs a much bigger, longer run. A gentle recipe barely moves it, which is why Klein is done around step 600 but Krea does not reach anything usable before about 6500.

The run that finally worked:

Rank 32Learning rate 1e-412000 stepsGradient accumulation 1Base model: Krea 2 Raw, not Turbo

That was about 17 to 18 hours on the RTX 6000 Pro. That was not cheap! So thank you for making that possible.

Results

On five out of six test scenes the Krea LoRA now beats both the Klein version and nomadoor's original, and it leaves no unfilled green at all.

The LoRA runs fine on Krea 2 Turbo fp8, which is what the workflow ships with, at about 65 seconds per panorama.

Seam fix and upscaling are still necessary. The LoRA fills the green convincingly, but nothing about that guarantees a closed loop, so both passes stay in.

One thing worth checking before you commit: Krea 2 runs under its own community license, where commercial use is free only while your company revenue stays under one million dollars a year. For most of you that changes nothing, but if you are doing client work it is worth a read.

GUIDE

This makes the 360 equirectangular start image for the Splatting Worlds pipeline (the write-up before this covers how it all works). Two modes in one graph:

A, TEXT to PANO: Krea 2 Turbo plus the 360 LoRA paint a panorama from a text prompt.

B, IMAGE to PANO: your photo is projected onto the sphere and the outpaint LoRA fills everything around it.

Both end in the same seam fix and 8K upscale, then feed the 3DGS Dataset Creator workflow.

1. Install

Drag the JSON into ComfyUI and install the missing custom nodes.

Node packs

ComfyUI-Mickmumpitz-Nodes pano warp, roll, seam mask, harmonize, full-res reference, Bundle, ResolutionPicker

ComfyUI-SplatKit A/B switch

ComfyUI-Krea2-Ostris-Edit (ostris) edit patch + text encode

ComfyUI_essentials (cubiq) CAS pre-sharpen

ComfyUI_UltimateSDUpscale 8K tile pass

ComfyUI_preview360panorama 360 viewer (optional)

Models

krea2_turbo_fp8_scaled.safetensors (or krea2_turbo_nvfp4 on RTX 50xx) diffusion_models Comfy-Org/Krea-2  ·  nvfp4: Abiray/Krea-2-Turbo-FP8-NVFP4

krea2_t2i_360_erp_lora_v1.safetensors loras

krea2_oedit_360_erp_outpaint_lora_v1.safetensors loras

qwen3vl_4b_fp8_scaled.safetensors

wan_2.1_vae.safetensors

RealESRGAN_x2.pth

2. Quick start

① MODE: true = A, false = B. Only the selected branch runs.

② Pano resolution: keep 2:1. 2048 x 1024 is the sweet spot everything downstream expects.

Fill in the prompt for your mode (below).

Prompt for Upscaler (⑤): a few plain words like High resolution photography, no scene detail.

Queue and leave it alone.

Outputs land in ComfyUI/output/panorama/: pano_360_2k_.png (before upscale) and pano_360_.png (final 8K). The PanoramaViewerNode lets you look around inside the result.

3. Mode A: text to panorama

Group ③a, node 🌍 SCENE PROMPT. Keep the leading trigger sentence exactly as it is and write your scene after it:

img-txt-2-360 A full 360 degree equirectangular panorama in 2:1 spherical projection, <your scene>, photoreal, seamless wrap, level horizon.

Sampler: 10 steps, cfg 1, er_sde / simple, denoise 1. Negative is a zeroed conditioning (correct at cfg 1). The ③b seam fix runs automatically, nothing to set.

4. Mode B: photo to panorama

④a INPUT IMAGE: load your photo.

The photo is composited onto the exact #00ff00 canvas the outpaint LoRA expects.

④b 🌍 SCENE PROMPT (one sentence): describe the surroundings, e.g. Professional photography of living room. Leave the fixed instruction string above it as-is.

5. Upscale (⑤, both modes)

RealESRGAN x2, lanczos resize to 8192 x 4096, CAS pre-sharpen 0.5, a touch of noise (0.01), then UltimateSDUpscale without upscaling: 1-2 steps, cfg 1, er_sde / simple, denoise 0.15, tile 1024, uniform tiles on, seam fix off. Keep the denoise low and give it some time!

LINKS

You can find the loras here: https://huggingface.co/mickmumpitz/Krea2-360-ERP-LoRAs/tree/main

Workflow and Guide for the full process here: https://mickmumpitz.ai/posts/new-video-free-167647096

Files

Comments

DBJ19

Fantastic brother you got it working! Thank you!