Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
|
@@ -1,3 +1,25 @@
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
-
gr.Interface.load("models/Intel/ldm3d-pano").launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import gradio as gr
|
| 2 |
|
| 3 |
+
gr.Interface.load("models/Intel/ldm3d-pano").launch()
|
| 4 |
+
|
| 5 |
+
|
| 6 |
+
from diffusers import StableDiffusionLDM3DPipeline
|
| 7 |
+
|
| 8 |
+
pipe = StableDiffusionLDM3DPipeline.from_pretrained("Intel/ldm3d-pano")
|
| 9 |
+
pipe.to("cuda")
|
| 10 |
+
|
| 11 |
+
|
| 12 |
+
prompt ="360 view of a photorealistic 4K futuristic cityscape"
|
| 13 |
+
name = "bedroom_pano"
|
| 14 |
+
|
| 15 |
+
output = pipe(
|
| 16 |
+
prompt,
|
| 17 |
+
width=1024,
|
| 18 |
+
height=512,
|
| 19 |
+
guidance_scale=7.0,
|
| 20 |
+
num_inference_steps=50,
|
| 21 |
+
)
|
| 22 |
+
|
| 23 |
+
rgb_image, depth_image = output.rgb, output.depth
|
| 24 |
+
rgb_image[0].save(name+"_ldm3d_rgb.jpg")
|
| 25 |
+
depth_image[0].save(name+"_ldm3d_depth.png")
|