lionelgarnier commited on
Commit
3103d69
·
1 Parent(s): 07db937
Files changed (1) hide show
  1. app.py +6 -10
app.py CHANGED
@@ -207,8 +207,8 @@ def end_session(req: gr.Request):
207
 
208
  with gr.Blocks(delete_cache=(600, 600)) as demo:
209
  gr.Markdown("""
210
- ## Text to 3D Asset with Mistral + Flux + Trellis (https://trellis3d.github.io/)
211
- * 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.
212
  """)
213
 
214
  with gr.Row():
@@ -237,10 +237,6 @@ with gr.Blocks(delete_cache=(600, 600)) as demo:
237
  extract_glb_btn = gr.Button("Extract GLB", interactive=False)
238
  extract_gs_btn = gr.Button("Extract Gaussian", interactive=False)
239
 
240
- gr.Markdown("""
241
- *NOTE: Gaussian file can be very large (~50MB), it will take a while to display and download.*
242
- """)
243
-
244
  with gr.Column():
245
  video_output = gr.Video(label="Generated 3D Asset", autoplay=True, loop=True, height=300)
246
  model_output = LitModel3D(label="Extracted GLB/Gaussian", exposure=10.0, height=300)
@@ -309,8 +305,8 @@ with gr.Blocks(delete_cache=(600, 600)) as demo:
309
  if __name__ == "__main__":
310
  pipeline = TrellisImageTo3DPipeline.from_pretrained("JeffreyXiang/TRELLIS-image-large")
311
  pipeline.cuda()
312
- try:
313
- pipeline.preprocess_image(Image.fromarray(np.zeros((512, 512, 3), dtype=np.uint8))) # Preload rembg
314
- except:
315
- pass
316
  demo.launch()
 
207
 
208
  with gr.Blocks(delete_cache=(600, 600)) as demo:
209
  gr.Markdown("""
210
+ ## Text to 3D Asset with Mistral + Flux + Trellis
211
+ * Upload an image and click "Generate" to create a 3D asset
212
  """)
213
 
214
  with gr.Row():
 
237
  extract_glb_btn = gr.Button("Extract GLB", interactive=False)
238
  extract_gs_btn = gr.Button("Extract Gaussian", interactive=False)
239
 
 
 
 
 
240
  with gr.Column():
241
  video_output = gr.Video(label="Generated 3D Asset", autoplay=True, loop=True, height=300)
242
  model_output = LitModel3D(label="Extracted GLB/Gaussian", exposure=10.0, height=300)
 
305
  if __name__ == "__main__":
306
  pipeline = TrellisImageTo3DPipeline.from_pretrained("JeffreyXiang/TRELLIS-image-large")
307
  pipeline.cuda()
308
+ # try:
309
+ # pipeline.preprocess_image(Image.fromarray(np.zeros((512, 512, 3), dtype=np.uint8))) # Preload rembg
310
+ # except:
311
+ # pass
312
  demo.launch()