Spaces:
Runtime error
Runtime error
jiaweir
commited on
Commit
·
8d987bd
1
Parent(s):
e48a5d9
remove render
Browse files
app.py
CHANGED
@@ -225,8 +225,8 @@ def optimize_stage_2(image_block: Image.Image, seed_slider: int):
|
|
225 |
process_dg4d(os.path.join("configs", "4d_demo.yaml"), os.path.join("tmp_data", f"{img_hash}_rgba.png"), guidance_zero123)
|
226 |
# os.rename(os.path.join('logs', f'{img_hash}_rgba_frames'), os.path.join('logs', f'{img_hash}_{seed_slider:03d}_rgba_frames'))
|
227 |
image_dir = os.path.join('logs', f'{img_hash}_rgba_frames')
|
228 |
-
return os.path.join('vis_data', f'{img_hash}_rgba.mp4'), [image_dir+f'/{t:03d}.ply' for t in range(28)]
|
229 |
-
|
230 |
|
231 |
|
232 |
if __name__ == "__main__":
|
@@ -294,7 +294,7 @@ if __name__ == "__main__":
|
|
294 |
with gr.Column(scale=5):
|
295 |
obj3d = gr.Video(label="3D Model",height=290)
|
296 |
# obj3d = gr.Model3D(label="3D Model",height=290)
|
297 |
-
video4d = gr.Video(label="4D Render",height=290)
|
298 |
obj4d = Model4DGS(label="4D Model", height=500, fps=28)
|
299 |
|
300 |
|
@@ -311,7 +311,7 @@ if __name__ == "__main__":
|
|
311 |
seed_slider2],
|
312 |
outputs=[
|
313 |
obj3d])
|
314 |
-
fourd_run_btn.click(check_video_3d_input, inputs=[image_block], queue=False).success(optimize_stage_2, inputs=[image_block, seed_slider], outputs=[
|
315 |
|
316 |
# demo.queue().launch(share=True)
|
317 |
demo.queue(max_size=10) # <-- Sets up a queue with default parameters
|
|
|
225 |
process_dg4d(os.path.join("configs", "4d_demo.yaml"), os.path.join("tmp_data", f"{img_hash}_rgba.png"), guidance_zero123)
|
226 |
# os.rename(os.path.join('logs', f'{img_hash}_rgba_frames'), os.path.join('logs', f'{img_hash}_{seed_slider:03d}_rgba_frames'))
|
227 |
image_dir = os.path.join('logs', f'{img_hash}_rgba_frames')
|
228 |
+
# return os.path.join('vis_data', f'{img_hash}_rgba.mp4'), [image_dir+f'/{t:03d}.ply' for t in range(28)]
|
229 |
+
return [image_dir+f'/{t:03d}.ply' for t in range(28)]
|
230 |
|
231 |
|
232 |
if __name__ == "__main__":
|
|
|
294 |
with gr.Column(scale=5):
|
295 |
obj3d = gr.Video(label="3D Model",height=290)
|
296 |
# obj3d = gr.Model3D(label="3D Model",height=290)
|
297 |
+
# video4d = gr.Video(label="4D Render",height=290)
|
298 |
obj4d = Model4DGS(label="4D Model", height=500, fps=28)
|
299 |
|
300 |
|
|
|
311 |
seed_slider2],
|
312 |
outputs=[
|
313 |
obj3d])
|
314 |
+
fourd_run_btn.click(check_video_3d_input, inputs=[image_block], queue=False).success(optimize_stage_2, inputs=[image_block, seed_slider], outputs=[obj4d])
|
315 |
|
316 |
# demo.queue().launch(share=True)
|
317 |
demo.queue(max_size=10) # <-- Sets up a queue with default parameters
|