Spaces:
Runtime error
Runtime error
lionelgarnier
commited on
Commit
·
a1f1dd5
1
Parent(s):
666f4e2
remove gbl extraction
Browse files
app.py
CHANGED
@@ -487,28 +487,28 @@ def create_interface():
|
|
487 |
value=DEFAULT_NUM_INFERENCE_STEPS,
|
488 |
)
|
489 |
|
490 |
-
|
491 |
-
|
492 |
-
|
493 |
-
|
494 |
-
|
495 |
-
|
496 |
-
|
497 |
-
|
498 |
-
|
499 |
-
|
500 |
-
|
501 |
-
|
502 |
-
|
503 |
-
|
504 |
-
|
505 |
|
506 |
-
|
507 |
-
|
508 |
-
|
509 |
-
|
510 |
-
|
511 |
-
|
512 |
|
513 |
output_buf = gr.State()
|
514 |
|
@@ -534,16 +534,16 @@ def create_interface():
|
|
534 |
outputs=[generated_image, message_box]
|
535 |
)
|
536 |
|
537 |
-
|
538 |
-
|
539 |
-
|
540 |
-
|
541 |
-
|
542 |
-
|
543 |
-
|
544 |
-
|
545 |
-
|
546 |
-
|
547 |
|
548 |
# # Add handlers for GLB and Gaussian extraction
|
549 |
# gr.on(
|
|
|
487 |
value=DEFAULT_NUM_INFERENCE_STEPS,
|
488 |
)
|
489 |
|
490 |
+
with gr.Tab("3D Generation Settings"):
|
491 |
+
trellis_seed = gr.Slider(0, MAX_SEED, label="Seed", value=0, step=1)
|
492 |
+
trellis_randomize_seed = gr.Checkbox(label="Randomize Seed", value=True)
|
493 |
+
gr.Markdown("Stage 1: Sparse Structure Generation")
|
494 |
+
with gr.Row():
|
495 |
+
ss_guidance_strength = gr.Slider(0.0, 10.0, label="Guidance Strength", value=7.5, step=0.1)
|
496 |
+
ss_sampling_steps = gr.Slider(1, 50, label="Sampling Steps", value=12, step=1)
|
497 |
+
gr.Markdown("Stage 2: Structured Latent Generation")
|
498 |
+
with gr.Row():
|
499 |
+
slat_guidance_strength = gr.Slider(0.0, 10.0, label="Guidance Strength", value=3.0, step=0.1)
|
500 |
+
slat_sampling_steps = gr.Slider(1, 50, label="Sampling Steps", value=12, step=1)
|
501 |
+
|
502 |
+
with gr.Tab("GLB Extraction Settings"):
|
503 |
+
mesh_simplify = gr.Slider(0.9, 0.98, label="Simplify", value=0.95, step=0.01)
|
504 |
+
texture_size = gr.Slider(512, 2048, label="Texture Size", value=1024, step=512)
|
505 |
|
506 |
+
with gr.Row():
|
507 |
+
extract_glb_btn = gr.Button("Extract GLB", interactive=False)
|
508 |
+
extract_gs_btn = gr.Button("Extract Gaussian", interactive=False)
|
509 |
+
gr.Markdown("""
|
510 |
+
*NOTE: Gaussian file can be very large (~50MB), it will take a while to display and download.*
|
511 |
+
""")
|
512 |
|
513 |
output_buf = gr.State()
|
514 |
|
|
|
534 |
outputs=[generated_image, message_box]
|
535 |
)
|
536 |
|
537 |
+
gr.on(
|
538 |
+
triggers=[gen3d_button.click],
|
539 |
+
fn=image_to_3d,
|
540 |
+
inputs=[generated_image, trellis_seed, ss_guidance_strength, ss_sampling_steps, slat_guidance_strength, slat_sampling_steps],
|
541 |
+
outputs=[output_state, video_output],
|
542 |
+
).then(
|
543 |
+
# Update button states after successful 3D generation
|
544 |
+
lambda: (gr.Button.update(interactive=True), gr.Button.update(interactive=True), "3D model generated successfully"),
|
545 |
+
outputs=[extract_glb_btn, extract_gs_btn, message_box]
|
546 |
+
)
|
547 |
|
548 |
# # Add handlers for GLB and Gaussian extraction
|
549 |
# gr.on(
|