Spaces:
Runtime error
Runtime error
chore: remove gr.Info
Browse filesFiles changed (2)
- app.py+1-2
- src/gradio_pipeline.py+3-3
11 unmodified lines1213141516171819202111 unmodified linesfrom src.config.crop_config import CropConfigfrom src.config.argument_config import ArgumentConfigfrom src.config.inference_config import InferenceConfigimport gdownimport osimport spaces# folder_url = f"https://drive.google.com/drive/folders/1UtKgzKjFAOmZkhNK-OYT0caJ_w2XAnib"# gdown.download_folder(url=folder_url, output="pretrained_weights", quiet=False)11 unmodified lines12131415161718192011 unmodified linesfrom src.config.crop_config import CropConfigfrom src.config.argument_config import ArgumentConfigfrom src.config.inference_config import InferenceConfigimport spaces# import gdown# folder_url = f"https://drive.google.com/drive/folders/1UtKgzKjFAOmZkhNK-OYT0caJ_w2XAnib"# gdown.download_folder(url=folder_url, output="pretrained_weights", quiet=False)
60 unmodified lines6162636465666728 unmodified lines969798991001011021 unmodified line10410510610710810911060 unmodified linesself.cropper.update_config(self.args.__dict__)# video driven animationvideo_path, video_path_concat = self.execute(self.args)gr.Info("Run successfully!", duration=2)return video_path, video_path_concat,else:raise gr.Error("The input source portrait or driving video hasn't been prepared yet 💥!", duration=5)28 unmodified linesout = self.live_portrait_wrapper.warp_decode(self.f_s_user, self.x_s_user, x_d_new)out = self.live_portrait_wrapper.parse_output(out['out'])[0]out_to_ori_blend = paste_back(out, self.crop_M_c2o, self.img_rgb, self.mask_ori)gr.Info("Run successfully!", duration=2)return out, out_to_ori_blend1 unmodified line""" for single image retargeting"""if input_image_path is not None:gr.Info("Upload successfully!", duration=2)self.start_prepare = Trueinference_cfg = self.live_portrait_wrapper.cfg######## process source portrait ########60 unmodified lines6162636465666728 unmodified lines969798991001011021 unmodified line10410510610710810911060 unmodified linesself.cropper.update_config(self.args.__dict__)# video driven animationvideo_path, video_path_concat = self.execute(self.args)# gr.Info("Run successfully!", duration=2)return video_path, video_path_concat,else:raise gr.Error("The input source portrait or driving video hasn't been prepared yet 💥!", duration=5)28 unmodified linesout = self.live_portrait_wrapper.warp_decode(self.f_s_user, self.x_s_user, x_d_new)out = self.live_portrait_wrapper.parse_output(out['out'])[0]out_to_ori_blend = paste_back(out, self.crop_M_c2o, self.img_rgb, self.mask_ori)# gr.Info("Run successfully!", duration=2)return out, out_to_ori_blend1 unmodified line""" for single image retargeting"""if input_image_path is not None:# gr.Info("Upload successfully!", duration=2)self.start_prepare = Trueinference_cfg = self.live_portrait_wrapper.cfg######## process source portrait ########
app.py+1-2
src/gradio_pipeline.py+3-3