jhj0517 commited on
Commit
4b4d1f9
·
1 Parent(s): 692a471

Remove unnecessary process

Browse files
modules/live_portrait/live_portrait_inferencer.py CHANGED
@@ -243,8 +243,7 @@ class LivePortraitInferencer:
243
  out_img_path = save_image(numpy_array=out, output_path=out_img_path)
244
 
245
  if enable_image_restoration:
246
- cropped_out_img_path = self.resrgan_inferencer.restore_image(cropped_out_img_path)
247
- out_img_path = self.resrgan_inferencer.restore_image(out_img_path)
248
 
249
  return out
250
  except Exception as e:
@@ -336,7 +335,11 @@ class LivePortraitInferencer:
336
 
337
  progress(i/total_length, desc=f"Generating frames {i}/{total_length} ..")
338
 
339
- video_path = create_video_from_frames(TEMP_VIDEO_OUT_FRAMES_DIR, frame_rate=vid_info.frame_rate, output_dir=os.path.join(self.output_dir, "videos"))
 
 
 
 
340
 
341
  return video_path
342
  except Exception as e:
 
243
  out_img_path = save_image(numpy_array=out, output_path=out_img_path)
244
 
245
  if enable_image_restoration:
246
+ out = self.resrgan_inferencer.restore_image(out_img_path)
 
247
 
248
  return out
249
  except Exception as e:
 
335
 
336
  progress(i/total_length, desc=f"Generating frames {i}/{total_length} ..")
337
 
338
+ video_path = create_video_from_frames(
339
+ TEMP_VIDEO_OUT_FRAMES_DIR,
340
+ frame_rate=vid_info.frame_rate,
341
+ output_dir=os.path.join(self.output_dir, "videos")
342
+ )
343
 
344
  return video_path
345
  except Exception as e: