quantumos commited on
Commit
000aefe
·
verified ·
1 Parent(s): e45e6e0

Update inference.py

Browse files
Files changed (1) hide show
  1. inference.py +1 -3
inference.py CHANGED
@@ -271,8 +271,7 @@ class InferenceEngine(object):
271
  ).video_latents
272
 
273
  return video_latents
274
-
275
- #@torch.cuda.amp.autocast()
276
  def get_video_tensor(self, video_latents):
277
  video_tensor = self.pipeline.decode_latents(video_latents)
278
  if isinstance(video_tensor, np.ndarray):
@@ -304,7 +303,6 @@ class InferenceEngine(object):
304
  """
305
 
306
  def infer(self, reference_image_path, audio_path, kps_path, output_path, retarget_strategy, reference_attention_weight, audio_attention_weight):
307
- with torch.cuda.amp.autocast():
308
  reference_image, reference_image_for_kps, reference_kps = self.get_reference_image_for_kps(reference_image_path)
309
  audio_waveform, video_length = self.get_waveform_video_length(audio_path)
310
  kps_sequence = self.get_kps_sequence(kps_path, reference_kps, video_length, retarget_strategy)
 
271
  ).video_latents
272
 
273
  return video_latents
274
+
 
275
  def get_video_tensor(self, video_latents):
276
  video_tensor = self.pipeline.decode_latents(video_latents)
277
  if isinstance(video_tensor, np.ndarray):
 
303
  """
304
 
305
  def infer(self, reference_image_path, audio_path, kps_path, output_path, retarget_strategy, reference_attention_weight, audio_attention_weight):
 
306
  reference_image, reference_image_for_kps, reference_kps = self.get_reference_image_for_kps(reference_image_path)
307
  audio_waveform, video_length = self.get_waveform_video_length(audio_path)
308
  kps_sequence = self.get_kps_sequence(kps_path, reference_kps, video_length, retarget_strategy)