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

enable zerogpu

Browse files
Files changed (1) hide show
  1. app.py +1 -2
app.py CHANGED
@@ -327,7 +327,6 @@ def get_ref_anno(ref):
327
  image
328
  ):
329
  print("ready to run autoencoder")
330
- image = image.cuda()
331
  latent = opts.latent_scaling_factor * autoencoder.encode(image[None, ...]).sample()
332
  return image[None, ...], latent
333
 
@@ -338,7 +337,7 @@ def get_ref_anno(ref):
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)
342
  kpts_valid = check_keypoints_validity(keypts, opts.image_size)
343
  heatmaps = torch.tensor(
344
  keypoint_heatmap(
 
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
  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(