Chaerin5 commited on
Commit
e277aac
·
1 Parent(s): a0aef17

enable zerogpu

Browse files
Files changed (1) hide show
  1. app.py +2 -4
app.py CHANGED
@@ -256,9 +256,6 @@ hands = mp_hands.Hands(
256
 
257
  @spaces.GPU(duration=120)
258
  def get_ref_anno(ref):
259
- print(torch.cuda.is_available())
260
- print(torch.cuda.device_count())
261
- print(torch.cuda.get_device_name(0))
262
  if ref is None:
263
  return (
264
  None,
@@ -362,6 +359,7 @@ def get_ref_anno(ref):
362
  target_size=opts.image_size,
363
  latent_size=opts.latent_size,
364
  )
 
365
  latent = opts.latent_scaling_factor * autoencoder.encode(image).sample()
366
  if not REF_POSE_MASK:
367
  heatmaps = torch.zeros_like(heatmaps)
@@ -1555,4 +1553,4 @@ with gr.Blocks(css=custom_css) as demo:
1555
  # _, _, shared_url = demo.queue().launch(
1556
  # share=True, server_name="0.0.0.0", server_port=7739
1557
  # )
1558
- demo.launch()
 
256
 
257
  @spaces.GPU(duration=120)
258
  def get_ref_anno(ref):
 
 
 
259
  if ref is None:
260
  return (
261
  None,
 
359
  target_size=opts.image_size,
360
  latent_size=opts.latent_size,
361
  )
362
+ print("ready to go to autoencoder")
363
  latent = opts.latent_scaling_factor * autoencoder.encode(image).sample()
364
  if not REF_POSE_MASK:
365
  heatmaps = torch.zeros_like(heatmaps)
 
1553
  # _, _, shared_url = demo.queue().launch(
1554
  # share=True, server_name="0.0.0.0", server_port=7739
1555
  # )
1556
+ demo.launch(share=True)