KwaiVGI / LivePortrait

Bring portraits to life!
https://liveportrait.github.io
Other
11.44k stars 1.17k forks source link

run app.py errot:'GradioPipeline' object has no attribute 'execute' #158

Closed lonngxiang closed 1 month ago

lonngxiang commented 1 month ago

src/gradio_pipeline.py", line 63, in execute_video video_path, video_path_concat = self.execute(self.args) AttributeError: 'GradioPipeline' object has no attribute 'execute'

zzzweakman commented 1 month ago

src/gradio_pipeline.py", line 63, in execute_video video_path, video_path_concat = self.execute(self.args) AttributeError: 'GradioPipeline' object has no attribute 'execute'

Thank you for your attention. Could you please provide more details on how you triggered this error?

lonngxiang commented 1 month ago

python app.py --server_name "0.0.0.0"

Load appearance_feature_extractor done. live_portrait_wrapper.py:29 Load motion_extractor done. live_portrait_wrapper.py:32 [05:10:58] Load warping_module done. live_portrait_wrapper.py:35 Load spade_generator done. live_portrait_wrapper.py:38 Load stitching_retargeting_module done. live_portrait_wrapper.py:42 /home/anaconda3/envs/aigc/lib/python3.10/site-packages/onnxruntime/capi/onnxruntime_inference_collection.py:69: UserWarning: Specified provider 'CUDAExecutionProvider' is not in available provider names.Available providers: 'AzureExecutionProvider, CPUExecutionProvider' warnings.warn( LandmarkRunner warmup time: 0.026s landmark_runner.py:89 FaceAnalysisDIY warmup time: 0.041s face_analysis_diy.py:79 Running on local URL: http://0.0.0.0:8890

Could not create share link. Missing file: /home/anaconda3/envs/aigc/lib/python3.10/site-packages/gradio/frpc_linux_amd64_v0.2.

Please check your internet connection. This can happen if your antivirus software blocks the download of this file. You can install manually by following these steps:

  1. Download this file: https://cdn-media.huggingface.co/frpc-gradio-0.2/frpc_linux_amd64
  2. Rename the downloaded file to: frpc_linux_amd64_v0.2
  3. Move the file to this location: /home/anaconda3/envs/aigc/lib/python3.10/site-packages/gradio [05:11:45] Load source image from gradio_pipeline.py:112 /tmp/gradio/04a5523d1f8b3a6482d6f46614cffbf8f08194d8/s5.jpeg.
    Traceback (most recent call last): File "/home/anaconda3/envs/aigc/lib/python3.10/site-packages/gradio/queueing.py", line 536, in process_events response = await route_utils.call_process_api( File "/home/anaconda3/envs/aigc/lib/python3.10/site-packages/gradio/route_utils.py", line 276, in call_process_api output = await app.get_blocks().process_api( File "/home/anaconda3/envs/aigc/lib/python3.10/site-packages/gradio/blocks.py", line 1897, in process_api result = await self.call_function( File "/home/anaconda3/envs/aigc/lib/python3.10/site-packages/gradio/blocks.py", line 1483, in call_function prediction = await anyio.to_thread.run_sync( File "/home/anaconda3/envs/aigc/lib/python3.10/site-packages/anyio/to_thread.py", line 56, in run_sync return await get_async_backend().run_sync_in_worker_thread( File "/home/anaconda3/envs/aigc/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 2177, in run_sync_in_worker_thread return await future File "/home/anaconda3/envs/aigc/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 859, in run result = context.run(func, args) File "/home/anaconda3/envs/aigc/lib/python3.10/site-packages/gradio/utils.py", line 816, in wrapper response = f(args, **kwargs) File "/ai/Webcam_Live_Portrait/src/gradio_pipeline.py", line 63, in execute_video video_path, video_path_concat = self.execute(self.args) AttributeError: 'GradioPipeline' object has no attribute 'execute' ^CKeyboard interruption in main thread... closing server.
zzzweakman commented 1 month ago

Thank you for providing more details! The execute function in GradioPipeline is inherited from the LivePortraitPipeline. It appears that the line numbers in your code differ from those in the main branch. Have you made any modifications? Please pull the latest changes from the main branch to update your code and try again. @lonngxiang