You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
using safetensor as default
{'checkpoint': 'checkpoints/SadTalker_V0.0.2_256.safetensors', 'dir_of_BFM_fitting': 'src/config', 'audio2pose_yaml_path': 'src/config/auido2pose.yaml', 'audio2exp_yaml_path': 'src/config/auido2exp.yaml', 'use_safetensor': True, 'mappingnet_checkpoint': 'checkpoints/mapping_00229-model.pth.tar', 'facerender_yaml': 'src/config/facerender.yaml'}
/tmp/gradio/6410032a78b420aa486a26de7f21e7d6285745ebb00e9484f599aa63cf5e7313/a15acedbbfe86dfc67cb301ba18d5565.png
Traceback (most recent call last):
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/queueing.py", line 536, in process_events
response = await route_utils.call_process_api(
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/blocks.py", line 1935, in process_api
result = await self.call_function(
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/blocks.py", line 1520, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 2364, in run_sync_in_worker_thread
return await future
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 864, in run
result = context.run(func, *args)
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/utils.py", line 826, in wrapper
response = f(*args, **kwargs)
File "/root/SadTalker/src/gradio_demo.py", line 96, in test
first_coeff_path, crop_pic_path, crop_info = self.preprocess_model.generate(pic_path, first_frame_dir, preprocess, True, size)
File "/root/SadTalker/src/utils/preprocess.py", line 113, in generate
frames_pil = [Image.fromarray(cv2.resize(frame,(pic_size, pic_size))) for frame in x_full_frames]
File "/root/SadTalker/src/utils/preprocess.py", line 113, in
frames_pil = [Image.fromarray(cv2.resize(frame,(pic_size, pic_size))) for frame in x_full_frames]
cv2.error: OpenCV(4.10.0) 👎 error: (-5:Bad argument) in function 'resize'
Overload resolution failed:
Can't parse 'dsize'. Sequence item with index 0 has a wrong type
Can't parse 'dsize'. Sequence item with index 0 has a wrong type
using safetensor as default
{'checkpoint': 'checkpoints/SadTalker_V0.0.2_256.safetensors', 'dir_of_BFM_fitting': 'src/config', 'audio2pose_yaml_path': 'src/config/auido2pose.yaml', 'audio2exp_yaml_path': 'src/config/auido2exp.yaml', 'use_safetensor': True, 'mappingnet_checkpoint': 'checkpoints/mapping_00229-model.pth.tar', 'facerender_yaml': 'src/config/facerender.yaml'}
/tmp/gradio/6410032a78b420aa486a26de7f21e7d6285745ebb00e9484f599aa63cf5e7313/a15acedbbfe86dfc67cb301ba18d5565.png
Traceback (most recent call last):
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/queueing.py", line 536, in process_events
response = await route_utils.call_process_api(
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/route_utils.py", line 322, in call_process_api
output = await app.get_blocks().process_api(
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/blocks.py", line 1935, in process_api
result = await self.call_function(
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/blocks.py", line 1520, in call_function
prediction = await anyio.to_thread.run_sync( # type: ignore
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/anyio/to_thread.py", line 56, in run_sync
return await get_async_backend().run_sync_in_worker_thread(
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 2364, in run_sync_in_worker_thread
return await future
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/anyio/_backends/_asyncio.py", line 864, in run
result = context.run(func, *args)
File "/root/miniconda3/envs/sadtalker/lib/python3.8/site-packages/gradio/utils.py", line 826, in wrapper
response = f(*args, **kwargs)
File "/root/SadTalker/src/gradio_demo.py", line 96, in test
first_coeff_path, crop_pic_path, crop_info = self.preprocess_model.generate(pic_path, first_frame_dir, preprocess, True, size)
File "/root/SadTalker/src/utils/preprocess.py", line 113, in generate
frames_pil = [Image.fromarray(cv2.resize(frame,(pic_size, pic_size))) for frame in x_full_frames]
File "/root/SadTalker/src/utils/preprocess.py", line 113, in
frames_pil = [Image.fromarray(cv2.resize(frame,(pic_size, pic_size))) for frame in x_full_frames]
cv2.error: OpenCV(4.10.0) 👎 error: (-5:Bad argument) in function 'resize'
这是调用接口代码
client = Client("http://xxxxxx:80/")
result = client.predict(
source_image=handle_file('https://xxx.com/image/a15acedbbfe86dfc67cb301ba18d5565.png'),
driven_audio=handle_file('https://xxx.com/file/voice.mp3'),
preprocess="crop",
still_mode=False,
use_enhancer=False,
batch_size=2,
size="256",
pose_style=0,
api_name="/test"
)
print(result)
The text was updated successfully, but these errors were encountered: