YaohuiW commited on
Commit
2d73c25
·
verified ·
1 Parent(s): 0c18b67

Update gradio_tabs/animation.py

Browse files
Files changed (1) hide show
  1. gradio_tabs/animation.py +2 -2
gradio_tabs/animation.py CHANGED
@@ -113,7 +113,7 @@ def vid_postprocessing(video, fps, output_path=output_dir + "/output_vid.mp4"):
113
  return output_path
114
 
115
 
116
- def animation(gen, device):
117
 
118
  @torch.no_grad()
119
  def edit_media(image, *selected_s):
@@ -136,7 +136,7 @@ def animation(gen, device):
136
  image_tensor = image_tensor.to(device)
137
  video_target_tensor = vid_target_tensor.to(device)
138
 
139
- animated_video = gen.animate(image_tensor, video_target_tensor, labels_v, selected_s)
140
 
141
  # postprocessing
142
  animated_video = vid_postprocessing(animated_video, fps)
 
113
  return output_path
114
 
115
 
116
+ def animation(gen, chunk_size, device):
117
 
118
  @torch.no_grad()
119
  def edit_media(image, *selected_s):
 
136
  image_tensor = image_tensor.to(device)
137
  video_target_tensor = vid_target_tensor.to(device)
138
 
139
+ animated_video = gen.animate_batch(image_tensor, video_target_tensor, labels_v, selected_s, chunk_size)
140
 
141
  # postprocessing
142
  animated_video = vid_postprocessing(animated_video, fps)