FermiQ/multiViewdiffspace
0
1import gradio as gr2 3def run(image):4 image = np.array(image, dtype=np.float32) / 255.05 images = multi_view_diffusion_pipeline("", image, guidance_scale=5, num_inference_steps=30, elevation=0)6 7 images = [Image.fromarray((img * 255).astype("uint8")) for img in images]8 9 width, height = images[0].size10 grid_img = Image.new("RGB", (2 * width, 2 * height))11 12 grid_img.paste(images[0], (0, 0))13 grid_img.paste(images[1], (width, 0))14 grid_img.paste(images[2], (0, height))15 grid_img.paste(images[3], (width, height))16 17 return grid_img18 19demo = gr.Interface(fn=run, inputs="image", outputs="image")20demo.launch()21 