Chaerin5 commited on
Commit
4395911
·
1 Parent(s): 8ec0b78

enable zerogpu

Browse files
Files changed (1) hide show
  1. app.py +2 -1
app.py CHANGED
@@ -327,6 +327,7 @@ def get_ref_anno(ref):
327
  image
328
  ):
329
  print("ready to run autoencoder")
 
330
  latent = opts.latent_scaling_factor * autoencoder.encode(image[None, ...]).sample()
331
  return image[None, ...], latent
332
 
@@ -337,7 +338,7 @@ def get_ref_anno(ref):
337
  Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5], inplace=True),
338
  ]
339
  )
340
- image = image_transform(img).to(device)
341
  kpts_valid = check_keypoints_validity(keypts, opts.image_size)
342
  heatmaps = torch.tensor(
343
  keypoint_heatmap(
 
327
  image
328
  ):
329
  print("ready to run autoencoder")
330
+ print(f"image.device: {image.device}, type(image): {type(image)}")
331
  latent = opts.latent_scaling_factor * autoencoder.encode(image[None, ...]).sample()
332
  return image[None, ...], latent
333
 
 
338
  Normalize(mean=[0.5, 0.5, 0.5], std=[0.5, 0.5, 0.5], inplace=True),
339
  ]
340
  )
341
+ image = image_transform(img) #.to(device)
342
  kpts_valid = check_keypoints_validity(keypts, opts.image_size)
343
  heatmaps = torch.tensor(
344
  keypoint_heatmap(