Layerpano3D-FLUX-Panorama-LoRA

Image 9 Image 4 Image 3
Image 2 Image 5 Image 6
Image 7 Image 8 Image 1

A LoRA model to generate panoramas using Flux (Text2Panorama and Panorama inpaint).

Which image ratio and resolution to use?

This model has been trained on images with a 2:1 ratio.

[NOTES]: Since we use lora for training, we find that using the same image resolution as training during inference will have better results. We provide lora with multiple resolutions in lora_hubs(now 720×1440 / 512×1024 version1), and will continue to update safetensors with better results and more flexible resolution in the future.

Inference

pip install diffusers==0.32.0

Text-to-Panorama Generation (run with our pipeline_flux.py in repo to ensure the close-loop)

import torch
import random
from pipeline_flux import FluxPipeline # use our modifed flux pipeline to ensure close-loop.

lora_path="lora_hubs/pano_lora_720*1440_v1.safetensors" # download panorama lora in our huggingface repo and replace it to your path.
pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to("cuda")
pipe.load_lora_weights(lora_path) # change this.
pipe.enable_model_cpu_offload()  # save some VRAM by offloading the model to CPU

prompt = 'A vibrant city avenue, bustling traffic, towering skyscrapers'

pipe.enable_vae_tiling()
seed = 119223

#Select the same resolution as LoRA for inference
image = pipe(prompt, 
            height=720,
            width=1440,
            generator=torch.Generator("cpu").manual_seed(seed),
            num_inference_steps=50, 
            blend_extend=6,
            guidance_scale=7).images[0]

image.save("result.png")

Related 360-Panoramic Project

Non-commercial use

As the base model is FLUX.1-[dev], it should be used for non-commercial, personal or demonstration purposes only.

Please use it responsibly, thank you!

Downloads last month
0
Inference Providers NEW
Examples

Model tree for ysmikey/Layerpano3D-FLUX-Panorama-LoRA

Adapter
(19430)
this model