align_img函数中存在一个ValueError,指示在设置数组元素时出现问题。

Author: cnbaowenCreated Nov 8, 2023Updated Feb 10, 2025

Traceback (most recent call last): File "D:\ProgramData\anaconda3\envs\video-retalking\lib\site-packages\gradio\queueing.py", line 407, in call_prediction output = await route_utils.call_process_api( File "D:\ProgramData\anaconda3\envs\video-retalking\lib\site-packages\gradio\route_utils.py", line 226, in call_process_api output = await app.get_blocks().process_api( File "D:\ProgramData\anaconda3\envs\video-retalking\lib\site-packages\gradio\blocks.py", line 1550, in process_api result = await self.call_function( File "D:\ProgramData\anaconda3\envs\video-retalking\lib\site-packages\gradio\blocks.py", line 1185, in call_function prediction = await anyio.to_thread.run_sync( File "D:\ProgramData\anaconda3\envs\video-retalking\lib\site-packages\anyio\to_thread.py", line 33, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "D:\ProgramData\anaconda3\envs\video-retalking\lib\site-packages\anyio_backends_asyncio.py", line 877, in run_sync_in_worker_thread return await future File "D:\ProgramData\anaconda3\envs\video-retalking\lib\site-packages\anyio_backends_asyncio.py", line 807, in run result = context.run(func, *args) File "D:\ProgramData\anaconda3\envs\video-retalking\lib\site-packages\gradio\\utils.py", line 661, in wrapper response = f(*args, **kwargs) File "F:\video-retalking\webUI.py", line 285, in inference trans_params, im_idx, lm_idx, _ = align_img(frame, lm_idx, lm3d_std) File "F:\video-retalking\third_part\face3d\\util\preprocess.py", line 196, in align_img trans_params = np.array([w0, h0, s, t[0], t[1]]) ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (5,) + inhomogeneous part.

Source: OpenTalker/video-retalking