Seokju Cho commited on
Commit
e4d9159
1 Parent(s): 205164d

add to_device

Browse files
Files changed (1) hide show
  1. app.py +7 -0
app.py CHANGED
@@ -202,6 +202,13 @@ def track(
202
  device = "cuda" if torch.cuda.is_available() else "cpu"
203
  dtype = torch.bfloat16 if device == "cuda" else torch.float16
204
 
 
 
 
 
 
 
 
205
  # Convert query points to tensor, normalize to input resolution
206
  query_points_tensor = []
207
  for frame_points in query_points:
 
202
  device = "cuda" if torch.cuda.is_available() else "cpu"
203
  dtype = torch.bfloat16 if device == "cuda" else torch.float16
204
 
205
+ video_feature = FeatureGrids(
206
+ lowres=(video_feature.lowres[0].to(device, dtype),),
207
+ hires=(video_feature.hires[0].to(device, dtype),),
208
+ highest=(video_feature.highest[0].to(device, dtype),),
209
+ resolutions=video_feature.resolutions,
210
+ )
211
+
212
  # Convert query points to tensor, normalize to input resolution
213
  query_points_tensor = []
214
  for frame_points in query_points: