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

Update difpoint/inference.py

Browse files
Files changed (1) hide show
  1. difpoint/inference.py +2 -1
difpoint/inference.py CHANGED
@@ -183,7 +183,7 @@ class Inferencer(object):
183
  self.inf_cfg = OmegaConf.load("difpoint/configs/onnx_infer.yaml")
184
  self.inf_cfg.infer_params.flag_pasteback = False
185
 
186
- self.live_portrait_pipeline = FasterLivePortraitPipeline(cfg=self.inf_cfg, is_animal=False)
187
  #ret = self.live_portrait_pipeline.prepare_source(source_image)
188
 
189
  print('#'*25+f'End initialization, cost time {time.time()-st}'+'#'*25)
@@ -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.croper = Croper(self.lm_croper_checkpoint)
278
  self.live_portrait_pipeline.init()
279
  if audio_type == 'upload':
 
183
  self.inf_cfg = OmegaConf.load("difpoint/configs/onnx_infer.yaml")
184
  self.inf_cfg.infer_params.flag_pasteback = False
185
 
186
+ #self.live_portrait_pipeline = FasterLivePortraitPipeline(cfg=self.inf_cfg, is_animal=False)
187
  #ret = self.live_portrait_pipeline.prepare_source(source_image)
188
 
189
  print('#'*25+f'End initialization, cost time {time.time()-st}'+'#'*25)
 
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 = FasterLivePortraitPipeline(cfg=self.inf_cfg, is_animal=False)
278
  self.croper = Croper(self.lm_croper_checkpoint)
279
  self.live_portrait_pipeline.init()
280
  if audio_type == 'upload':