Views
No views yet
![]() | ![]() | ![]() |
![]() | ![]() | ![]() |
![]() | ![]() | ![]() |
pip install diffusers==0.32.01import torch
2import random
3from pipeline_flux import FluxPipeline # use our modifed flux pipeline to ensure close-loop.
4
5lora_path="lora_hubs/pano_lora_720*1440_v1.safetensors" # download panorama lora in our huggingface repo and replace it to your path.
6pipe = FluxPipeline.from_pretrained("black-forest-labs/FLUX.1-dev", torch_dtype=torch.bfloat16).to("cuda")
7pipe.load_lora_weights(lora_path) # change this.
8pipe.enable_model_cpu_offload() # save some VRAM by offloading the model to CPU
9
10prompt = 'A vibrant city avenue, bustling traffic, towering skyscrapers'
11
12pipe.enable_vae_tiling()
13seed = 119223
14
15#Select the same resolution as LoRA for inference
16image = pipe(prompt,
17 height=720,
18 width=1440,
19 generator=torch.Generator("cpu").manual_seed(seed),
20 num_inference_steps=50,
21 blend_extend=6,
22 guidance_scale=7).images[0]
23
24image.save("result.png")
25