Views
No views yet
NOTE: This is a beta release of the model. The consistency between views may not be perfect, and the model might sometimes generate views that don't perfectly align or maintain exact object positions across viewpoints. I am working on improving the geometric consistency and spatial relationships between generated views.
1import torch
2from diffusers import FluxPipeline
3
4pipeline = FluxPipeline.from_pretrained(
5 "black-forest-labs/FLUX.1-dev",
6 torch_dtype=torch.bfloat16,
7)
8pipeline.load_lora_weights(
9 "ysmao/multiview-incontext",
10 weight_name="twoview-incontext-b03.safetensors",
11)
12pipeline.fuse_lora()
13
14scene_prompt = "a living room with a sofa set with cushions, side tables with table lamps, a flat screen television on a table, houseplants, wall hangings, electric lights, and a carpet on the floor"
15prompt = f"[TWO-VIEWS] This set of two images presents a scene from two different viewpoints. [IMAGE1] The first image shows {scene_prompt}. [IMAGE2] The second image shows the same room but in another viewpoint."
16image_height = 576
17image_width = 864
18output = pipeline(
19 prompt=prompt,
20 height=int(image_height),
21 width=int(image_width * 2),
22 num_inference_steps=30,
23 guidance_scale=3.5,
24).images[0]
25
26output.save("twoview-incontext-beta.png")