This is a workflow meant to be used with the Flux Equirectangular 360° Panorama LoRA to create 360 skyboxes or environments viewable in VR (optionally with 3D depthmaps).
Some settings will render fine with this LoRA with the seam barely being visible, but this workflow is designed to fully remove the seam and also upscale.
The basic idea is to generate an image with a 2:1 aspect ratio with this LoRA, then shift it over by halfway (or equivalently, rotate the camera by 180 degrees), then inpaint the middle half of the image to remove the seam. After that, it upscales by 2x, inpaints the middle 3/4 of the image to remove upscale noise, then shifts back and inpaints the middle half to remove the remaining noise.
After this, you can optionally create a stereo image from a depthmap, which can give the panorama a 3D effect in VR.
The Dev-to-Schnell LoRA can be useful for speeding up this workflow, but it will change the style and composition to some extent.
Without the Dev-to-Schnell LoRA, I recommend doing 20-30 steps (or more if you want) for the initial generation followed by 10-20 steps for the inpainting.
With the Dev-to-Schnell LoRA, I recommend doing 4-8 steps for the initial generation followed by 4 steps for the inpainting. 4 steps will be closer to the realism look and 8 will be a bit more cartoonish and tends to be higher saturation/brightness.
The example images here were all at Flux guidance 2.5 with the same prompt + seed, at a final resolution of 4096 x 2048. The one using no other LoRAs took about 7 minutes total, while the ones using the Dev-to-Schnell LoRA took about 3 minutes total. Being 4 separate generation steps makes it somewhat slow. Tested on a 4090.
Seems to also be compatible with other LoRAs, showing the Flat Color Anime style one here for example with Dev-to-Schnell and 6 steps.
Custom nodes used:
https://github.com/melMass/comfy_mtb (for transforming the image to do the seam fix)
https://github.com/kijai/ComfyUI-KJNodes (for creating a shape mask to inpaint the seam)
https://github.com/ltdrdata/ComfyUI-Impact-Pack (for Gaussian blurring the mask)
https://github.com/evanspearman/ComfyMath (not on the registry? for basic math...)
https://github.com/city96/ComfyUI-GGUF (optional, for GGUF model loading)
https://github.com/Fannovel16/comfyui_controlnet_aux (optional, for depthmap)
https://github.com/Dobidop/ComfyStereo (optional, for stereo generation)
Thanks to Kyle Farrington for the idea to shift the image over halfway to fix the seam :)
Description
Full workflow with some notes
FAQ
Comments (12)
Can't wait to try it out!
which node controls the upscale ratio? like 2x or if I want 3x. I couldn't figure it out. Is it the "Upscale Image by" which is set to 0.5?
I used a 4x upscale model but only wanted to upscale by 2x, so I scaled it down by half afterward. You could bypass the node that scales it by half and directly use a 2x or 3x upscale model. For 3x, you'd also need to change the nodes that multiply the width and height by 2 in the upscale section to 3 for the upscaled shift part to work correctly.
Great workflow !
Does anyone know how to add 3D for VR?
Yep. This video explains how to transform a 360 equirectangular image into a kind of squashed sphere using blender. The 360 image gets projected on the walls using a depthmap. I've tried it, and it works great, but takes a bit of time. Also, you can look in all directions with VR and it will look great as long as you're in the center of the created space. If you plan to move inside the created space, then the 3D impression will be ruined. https://inv.nadeko.net/watch?v=t9zzcRsf0IA
@pakupki476 thats not vr, vr would need an SBS, just use Y7 SBS it's an image afterall. use the warped and (may have to fiddle with what aspect ratios or resolutions work best)
Hi Sean. Thank you for shaing the workflow. I am confused on how to disable img2img and only use text2img.
When press"queue",it shows “Cannot execute because a node is missing the class_type property.: Node ID '#76'”,I don't know how to solve it, please help.
After update comfyUI, problem solved.
That's one hell of a workflow 🤯👍 You're correct in regards to interior. Unfortunate, but not your fault. Great Lora, great workflow. Now all we need is a circular VAE 😊
cannot reshape array of size 59323589 into shape (18432,3264)
How do these come out? (esp if you 180 them instead... half the info (if you aren't looking behind you)
And then SBS them? (using a depth of some kind?) To make a VR180?




