YinuoGuo27 commited on
Commit
db11799
·
verified ·
1 Parent(s): 72488ac

Update difpoint/inference.py

Browse files
Files changed (1) hide show
  1. difpoint/inference.py +3 -2
difpoint/inference.py CHANGED
@@ -169,8 +169,8 @@ class Inferencer(object):
169
  self.point_diffusion.eval()
170
  self.point_diffusion.to(self.device)
171
 
172
- lm_croper_checkpoint = './downloaded_repo/ckpts/shape_predictor_68_face_landmarks.dat'
173
- self.croper = Croper(lm_croper_checkpoint)
174
 
175
  self.norm_info = dict(np.load(r'difpoint/datasets/norm_info_d6.5_c8.5_vox1_train.npz'))
176
 
@@ -274,6 +274,7 @@ class Inferencer(object):
274
  # 2024.06.26
275
  @torch.no_grad()
276
  def generate_with_audio_img(self, upload_audio_path, tts_audio_path, audio_type, image_path, smoothed_pitch, smoothed_yaw, smoothed_roll, smoothed_t, save_path='results'):
 
277
  self.live_portrait_pipeline.init()
278
  if audio_type == 'upload':
279
  audio_path = upload_audio_path
 
169
  self.point_diffusion.eval()
170
  self.point_diffusion.to(self.device)
171
 
172
+ self.lm_croper_checkpoint = './downloaded_repo/ckpts/shape_predictor_68_face_landmarks.dat'
173
+ #self.croper = Croper(lm_croper_checkpoint)
174
 
175
  self.norm_info = dict(np.load(r'difpoint/datasets/norm_info_d6.5_c8.5_vox1_train.npz'))
176
 
 
274
  # 2024.06.26
275
  @torch.no_grad()
276
  def generate_with_audio_img(self, upload_audio_path, tts_audio_path, audio_type, image_path, smoothed_pitch, smoothed_yaw, smoothed_roll, smoothed_t, save_path='results'):
277
+ self.croper = Croper(self.lm_croper_checkpoint)
278
  self.live_portrait_pipeline.init()
279
  if audio_type == 'upload':
280
  audio_path = upload_audio_path