From 86e91a6e9d53d3e4b5b314a2516b9300a030b3bd Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Tue, 9 Jul 2024 22:06:56 +0300 Subject: [PATCH] better error for retargeting --- liveportrait/live_portrait_pipeline.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/liveportrait/live_portrait_pipeline.py b/liveportrait/live_portrait_pipeline.py index b875963..0791a48 100644 --- a/liveportrait/live_portrait_pipeline.py +++ b/liveportrait/live_portrait_pipeline.py @@ -72,7 +72,10 @@ class LivePortraitPipeline(object): pbar = comfy.utils.ProgressBar(total_frames) if inference_cfg.flag_eye_retargeting or inference_cfg.flag_lip_retargeting: - driving_landmark_list = crop_info["driving_landmark_list"] + if 'driving_landmark_list' in crop_info.keys(): + driving_landmark_list = crop_info["driving_landmark_list"] + else: + raise ValueError("Missing driving_landmark_list in crop_info, get it from opt_driving_images in the Cropper node") for i in tqdm(range(total_frames), desc='Animating...', total=total_frames): source_frame_rgb = self._get_source_frame(