Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
|
@@ -257,21 +257,20 @@ def split_image(image: Image.Image) -> List[Image.Image]:
|
|
| 257 |
|
| 258 |
with gr.Blocks(delete_cache=(600, 600)) as demo:
|
| 259 |
gr.Markdown("""
|
| 260 |
-
## Image to 3D Asset with [TRELLIS](https://github.
|
| 261 |
-
|
| 262 |
-
*
|
| 263 |
-
|
| 264 |
-
|
| 265 |
-
|
| 266 |
-
""")
|
| 267 |
|
| 268 |
with gr.Row():
|
| 269 |
with gr.Column():
|
| 270 |
with gr.Tabs() as input_tabs:
|
| 271 |
with gr.Tab(label="Single Image", id=0) as single_image_input_tab:
|
| 272 |
-
image_prompt = gr.Image(label="Image Prompt", format="png", image_mode="RGBA", type="pil", height=300
|
| 273 |
with gr.Tab(label="Multiple Images", id=1) as multiimage_input_tab:
|
| 274 |
-
multiimage_prompt = gr.Gallery(label="Image Prompt", format="png", type="pil", height=300, columns=3
|
| 275 |
gr.Markdown("""
|
| 276 |
Input different views of the object in separate images.
|
| 277 |
|
|
@@ -412,4 +411,4 @@ if __name__ == "__main__":
|
|
| 412 |
pipeline.preprocess_image(Image.fromarray(np.zeros((512, 512, 3), dtype=np.uint8))) # Preload rembg
|
| 413 |
except:
|
| 414 |
pass
|
| 415 |
-
demo.launch()
|
|
|
|
| 257 |
|
| 258 |
with gr.Blocks(delete_cache=(600, 600)) as demo:
|
| 259 |
gr.Markdown("""
|
| 260 |
+
## Image to 3D Asset with [TRELLIS](https://trellis3d.github.io/)
|
| 261 |
+
* Upload an image and click "Generate" to create a 3D asset. If the image has alpha channel, it be used as the mask. Otherwise, we use `rembg` to remove the background.
|
| 262 |
+
* If you find the generated 3D asset satisfactory, click "Extract GLB" to extract the GLB file and download it.
|
| 263 |
+
|
| 264 |
+
✨New: 1) Experimental multi-image support. 2) Gaussian file extraction.
|
| 265 |
+
""")
|
|
|
|
| 266 |
|
| 267 |
with gr.Row():
|
| 268 |
with gr.Column():
|
| 269 |
with gr.Tabs() as input_tabs:
|
| 270 |
with gr.Tab(label="Single Image", id=0) as single_image_input_tab:
|
| 271 |
+
image_prompt = gr.Image(label="Image Prompt", format="png", image_mode="RGBA", type="pil", height=300)
|
| 272 |
with gr.Tab(label="Multiple Images", id=1) as multiimage_input_tab:
|
| 273 |
+
multiimage_prompt = gr.Gallery(label="Image Prompt", format="png", type="pil", height=300, columns=3)
|
| 274 |
gr.Markdown("""
|
| 275 |
Input different views of the object in separate images.
|
| 276 |
|
|
|
|
| 411 |
pipeline.preprocess_image(Image.fromarray(np.zeros((512, 512, 3), dtype=np.uint8))) # Preload rembg
|
| 412 |
except:
|
| 413 |
pass
|
| 414 |
+
demo.launch()
|