Sign In

Flux Equirectangular 360° Panorama Workflow

48
570
17
Type
Workflows
Stats
570
Reviews
Published
Sep 12, 2024
Base Model
Flux.1 D
Hash
AutoV2
8ECE300ADA
The FLUX.1 [dev] Model is licensed by Black Forest Labs. Inc. under the FLUX.1 [dev] Non-Commercial License. Copyright Black Forest Labs. Inc.
IN NO EVENT SHALL BLACK FOREST LABS, INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH USE OF THIS MODEL.

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 :)