Daniellesry commited on
Commit
32520ec
·
1 Parent(s): 5313d97
Files changed (1) hide show
  1. app.py +8 -3
app.py CHANGED
@@ -27,7 +27,7 @@ import datetime
27
  import shutil
28
  import tempfile
29
  import spaces
30
-
31
 
32
 
33
  #* better for bg: logs/outs/train/remote/sft-T2SQNet_glassverse_cleargrasp_HISS_DREDS_DREDS_glassverse_interiorverse-4gpus-origin-lora128-1.3B-rgb_depth-w832-h480-Wan2.1-Fun-Control-2025-10-28-23:26:41/epoch-0-20000.safetensors
@@ -148,7 +148,7 @@ def process_video(
148
 
149
 
150
 
151
- import time
152
  start_time = time.time()
153
 
154
  prediction_result = DKT_PIPELINE(
@@ -165,6 +165,7 @@ def process_video(
165
  end_time = time.time()
166
  spend_time = end_time - start_time
167
  logger.info(f"DKT_PIPELINE spend time: {spend_time:.2f} seconds for depth prediction")
 
168
 
169
 
170
 
@@ -180,6 +181,8 @@ def process_video(
180
  pc_end_time = time.time()
181
  pc_spend_time = pc_end_time - pc_start_time
182
  logger.info(f"prediction2pc_v2 spend time: {pc_spend_time:.2f} seconds for point cloud extraction")
 
 
183
  glb_files = []
184
 
185
  for idx, pcd in enumerate(pcds):
@@ -196,6 +199,7 @@ def process_video(
196
  success = create_simple_glb_from_pointcloud(points, colors, glb_filename)
197
  if not success:
198
  logger.warning(f"Failed to save GLB file: {glb_filename}")
 
199
 
200
  glb_files.append(glb_filename)
201
 
@@ -435,13 +439,14 @@ with gr.Blocks(css=css, title="DKT", head=head_html) as demo:
435
  return None, None, None, None, None, None, "Please upload a video file"
436
 
437
  try:
438
- import time
439
  start_time = time.time()
440
  output_path, glb_files = process_video(
441
  video_file, model_size, num_inference_steps, overlap
442
  )
443
  spend_time = time.time() - start_time
444
  logger.info(f"Total spend time in on_submit: {spend_time:.2f} seconds")
 
445
 
446
 
447
  if output_path is None:
 
27
  import shutil
28
  import tempfile
29
  import spaces
30
+ import time
31
 
32
 
33
  #* better for bg: logs/outs/train/remote/sft-T2SQNet_glassverse_cleargrasp_HISS_DREDS_DREDS_glassverse_interiorverse-4gpus-origin-lora128-1.3B-rgb_depth-w832-h480-Wan2.1-Fun-Control-2025-10-28-23:26:41/epoch-0-20000.safetensors
 
148
 
149
 
150
 
151
+
152
  start_time = time.time()
153
 
154
  prediction_result = DKT_PIPELINE(
 
165
  end_time = time.time()
166
  spend_time = end_time - start_time
167
  logger.info(f"DKT_PIPELINE spend time: {spend_time:.2f} seconds for depth prediction")
168
+ print(f"DKT_PIPELINE spend time: {spend_time:.2f} seconds for depth prediction")
169
 
170
 
171
 
 
181
  pc_end_time = time.time()
182
  pc_spend_time = pc_end_time - pc_start_time
183
  logger.info(f"prediction2pc_v2 spend time: {pc_spend_time:.2f} seconds for point cloud extraction")
184
+ print(f"prediction2pc_v2 spend time: {pc_spend_time:.2f} seconds for point cloud extraction")
185
+
186
  glb_files = []
187
 
188
  for idx, pcd in enumerate(pcds):
 
199
  success = create_simple_glb_from_pointcloud(points, colors, glb_filename)
200
  if not success:
201
  logger.warning(f"Failed to save GLB file: {glb_filename}")
202
+ print(f"Failed to save GLB file: {glb_filename}")
203
 
204
  glb_files.append(glb_filename)
205
 
 
439
  return None, None, None, None, None, None, "Please upload a video file"
440
 
441
  try:
442
+
443
  start_time = time.time()
444
  output_path, glb_files = process_video(
445
  video_file, model_size, num_inference_steps, overlap
446
  )
447
  spend_time = time.time() - start_time
448
  logger.info(f"Total spend time in on_submit: {spend_time:.2f} seconds")
449
+ print(f"Total spend time in on_submit: {spend_time:.2f} seconds")
450
 
451
 
452
  if output_path is None: