multimodalart HF Staff commited on
Commit
96afe9c
·
verified ·
1 Parent(s): a97673a

Upload folder using huggingface_hub

Browse files
Files changed (1) hide show
  1. app.py +3 -2
app.py CHANGED
@@ -458,7 +458,8 @@ def decode_video(pred_latent):
458
  1, vae.config.z_dim, 1, 1, 1
459
  ).to(latents.device, latents.dtype)
460
  latents = latents / latents_std + latents_mean
461
- video = vae.decode(latents, return_dict=False)[0]
 
462
  video = video_processor.postprocess_video(video, output_type="np")[0]
463
  return video
464
 
@@ -468,7 +469,7 @@ def decode_video(pred_latent):
468
  # ------------------------------------------------------------------ #
469
 
470
 
471
- @spaces.GPU(duration=120)
472
  def generate(
473
  top_img: "np.ndarray",
474
  wrist_img: "np.ndarray",
 
458
  1, vae.config.z_dim, 1, 1, 1
459
  ).to(latents.device, latents.dtype)
460
  latents = latents / latents_std + latents_mean
461
+ with torch.no_grad():
462
+ video = vae.decode(latents, return_dict=False)[0]
463
  video = video_processor.postprocess_video(video, output_type="np")[0]
464
  return video
465
 
 
469
  # ------------------------------------------------------------------ #
470
 
471
 
472
+ @spaces.GPU(duration=120, size="xlarge")
473
  def generate(
474
  top_img: "np.ndarray",
475
  wrist_img: "np.ndarray",