YinuoGuo27 commited on
Commit
305c702
·
verified ·
1 Parent(s): 7bf4d23

Update difpoint/inference.py

Browse files
Files changed (1) hide show
  1. difpoint/inference.py +3 -3
difpoint/inference.py CHANGED
@@ -8,7 +8,7 @@ import glob
8
 
9
  import os
10
  os.environ['HYDRA_FULL_ERROR']='1'
11
- os.environ['CUDA_VISIBLE_DEVICES'] = '2'
12
 
13
  import os
14
  import time
@@ -183,7 +183,7 @@ class Inferencer(object):
183
  self.inf_cfg = OmegaConf.load("difpoint/configs/onnx_mp_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,7 +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 = FasterLivePortraitPipeline(cfg=self.inf_cfg, is_animal=False)
278
  if audio_type == 'upload':
279
  audio_path = upload_audio_path
280
  elif audio_type == 'tts':
 
8
 
9
  import os
10
  os.environ['HYDRA_FULL_ERROR']='1'
11
+
12
 
13
  import os
14
  import time
 
183
  self.inf_cfg = OmegaConf.load("difpoint/configs/onnx_mp_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
  if audio_type == 'upload':
279
  audio_path = upload_audio_path
280
  elif audio_type == 'tts':