Edit model card

MultiView-InContext-Lora

Prompt
[TWO-VIEWS] This set of two images presents a scene from two different viewpoints. [IMAGE1] The first image shows 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. [IMAGE2] The second image shows the same room but in another viewpoint.
Prompt
[TWO-VIEWS] This set of two images presents a scene from two different viewpoints. [IMAGE1] The first image shows 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. [IMAGE2] The second image shows the same room but in another viewpoint.
Prompt
[TWO-VIEWS] This set of two images presents a scene from two different viewpoints. [IMAGE1] The first image shows a bedroom with a bed, dresser, and window. The bed is covered with a blanket and pillows, and there is a carpet on the floor. On the right side of the room, there are cupboards with drawers, a mirror, a lamp, and other objects. There is also a chair, a table with a lamp and other items, and another table with various items. The walls are adorned with photo frames, and the windows have curtains. Through the window, we can see trees outside. [IMAGE2] The second image shows the same room but in another viewpoint.
Prompt
[TWO-VIEWS] This set of two images presents a scene from two different viewpoints. [IMAGE1] The first image shows a bedroom with a bed, dresser, and window. The bed is covered with a blanket and pillows, and there is a carpet on the floor. On the right side of the room, there are cupboards with drawers, a mirror, a lamp, and other objects. There is also a chair, a table with a lamp and other items, and another table with various items. The walls are adorned with photo frames, and the windows have curtains. Through the window, we can see trees outside. [IMAGE2] The second image shows the same room but in another viewpoint.

Model description

Inspired by In-Context-LoRA, this project aims to generate multi-view images of the same scene or object simultaneously. By using flux with the multiview-incontext-lora, we can divide the images into portions to obtain novel views.

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.

Roadmap

  • ๐Ÿ”„ Improve the consistency between the two-view images.
  • 4๏ธโƒฃ Generate 4 views of a scene in a grid format.
  • ๐Ÿงธ Generate 4 canonical coordinates view points of a single object in a grid format.
  • ๐Ÿ›๏ธ 3D reconstruction from multi-view images.

Inference

import torch
from diffusers import FluxPipeline

pipeline = FluxPipeline.from_pretrained(
    "black-forest-labs/FLUX.1-dev",
    torch_dtype=torch.bfloat16,
)
pipeline.load_lora_weights(
    "ysmao/multiview-incontext",
    weight_name="twoview-incontext-b02.safetensors",
)
pipeline.fuse_lora()

scene_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"
prompt = 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."
image_height = 576
image_width = 864
output = pipeline(
    prompt=prompt,
    height=int(image_height),
    width=int(image_width * 2),
    num_inference_steps=30,
    guidance_scale=3.5,
).images[0]

output.save("twoview-incontext-beta.png")

Download model

Weights for this model are available in Safetensors format.

Download them in the Files & versions tab.

Downloads last month
0
Inference API
Examples

Model tree for ysmao/multiview-incontext

Adapter
(9017)
this model

Space using ysmao/multiview-incontext 1