From 2b33e8cc8cd9c75945fc3cbe8afbd2603bf32a2d Mon Sep 17 00:00:00 2001 From: shadowcz007 Date: Sat, 6 Jul 2024 13:56:15 +0800 Subject: [PATCH] Update live_portrait_pipeline.py --- nodes/LivePortrait/src/live_portrait_pipeline.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/nodes/LivePortrait/src/live_portrait_pipeline.py b/nodes/LivePortrait/src/live_portrait_pipeline.py index f79b4b4..ef3e69f 100644 --- a/nodes/LivePortrait/src/live_portrait_pipeline.py +++ b/nodes/LivePortrait/src/live_portrait_pipeline.py @@ -190,17 +190,19 @@ class LivePortraitPipeline(object): if not os.path.exists(directory): mkdir(directory) wfp_concat = args.output_path_concat + video_fps = cv2.VideoCapture(args.driving_info).get(cv2.CAP_PROP_FPS) if is_video(args.driving_info): frames_concatenated = concat_frames(I_p_lst, driving_rgb_lst, img_crop_256x256) # save (driving frames, source image, drived frames) result # wfp_concat = osp.join(directory, f'{basename(args.source_image)}--{basename(args.driving_info)}_concat.mp4') - images2video(frames_concatenated, wfp=wfp_concat) + # images2video(frames_concatenated, wfp=wfp_concat) + images2video(frames_concatenated, wfp=wfp_concat, fps=video_fps) # save drived result wfp = args.output_path if inference_cfg.flag_pasteback: - images2video(I_p_paste_lst, wfp=wfp) + images2video(I_p_paste_lst, wfp=wfp, fps=video_fps) else: - images2video(I_p_lst, wfp=wfp) + images2video(I_p_lst, wfp=wfp, fps=video_fps) return wfp, wfp_concat