--- license: other license_name: flux-1-dev-non-commercial-license license_link: https://huggingface.co/black-forest-labs/FLUX.1-dev/blob/main/LICENSE.md language: - en library_name: diffusers pipeline_tag: text-to-image base_model: black-forest-labs/FLUX.1-dev tags: - diffusers - lora - flux inference: parameters: width: 1440 height: 720 --- # 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 ```shell pip install diffusers==0.32.0 ``` **Text-to-Panorama Generation** (run with our pipeline_flux.py in repo to ensure the close-loop) ```python 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 - [**LayerPano3D**: Layered 3D Panorama for Hyper-Immersive Scene Generation](https://github.com/3DTopia/LayerPano3D). LayerPano3D generates full-view, explorable panoramic 3D scene from a single text prompt. - [**Imagine360**: Immersive 360 Video Generation from Perspective Anchor](https://github.com/3DTopia/Imagine360). Imagine360 lifts standard perspective video into 360-degree video with rich and structured motion, unlocking dynamic scene experience from full 360 degrees. ## Non-commercial use As the base model is FLUX.1-[dev], it should be used for [non-commercial, personal or demonstration purposes only](https://github.com/black-forest-labs/flux/blob/main/model_licenses/LICENSE-FLUX1-dev). Please use it responsibly, thank you!