Spaces:
Sleeping
Sleeping
fix
Browse files
app.py
CHANGED
|
@@ -213,9 +213,12 @@ def render_from_pointcloud(rgb_frames, depth_frames, intrinsics, original_extrin
|
|
| 213 |
|
| 214 |
@spaces.GPU
|
| 215 |
def run_spatial_tracker(video_tensor):
|
|
|
|
|
|
|
|
|
|
| 216 |
video_input = preprocess_image(video_tensor)[None].cuda()
|
| 217 |
with torch.no_grad():
|
| 218 |
-
with torch.
|
| 219 |
predictions = vggt4track_model(video_input / 255)
|
| 220 |
extrinsic, intrinsic = predictions["poses_pred"], predictions["intrs"]
|
| 221 |
depth_map, depth_conf = predictions["points_map"][...,
|
|
|
|
| 213 |
|
| 214 |
@spaces.GPU
|
| 215 |
def run_spatial_tracker(video_tensor):
|
| 216 |
+
if tracker_model.spatrack.base_model is None:
|
| 217 |
+
tracker_model.spatrack.base_model = vggt4track_model
|
| 218 |
+
|
| 219 |
video_input = preprocess_image(video_tensor)[None].cuda()
|
| 220 |
with torch.no_grad():
|
| 221 |
+
with torch.amp.autocast('cuda', dtype=torch.bfloat16):
|
| 222 |
predictions = vggt4track_model(video_input / 255)
|
| 223 |
extrinsic, intrinsic = predictions["poses_pred"], predictions["intrs"]
|
| 224 |
depth_map, depth_conf = predictions["points_map"][...,
|