SadTalker icon indicating copy to clipboard operation
SadTalker copied to clipboard

Getting "IndexError: index 0 is out of bounds for axis 0 with size 0" everytime I run it in auto1111 now

Open zono50 opened this issue 2 years ago • 4 comments

This program seemed to work fine for about 10 minutes, i was able to try out every option. Now anytime I try an audio file, even ones that worked before, I get the following error.

Startup time: 16.3s (import torch: 1.9s, import gradio: 0.5s, import ldm: 0.5s, other imports: 0.5s, load scripts: 1.3s, load SD checkpoint: 2.0s, create ui: 9.4s, gradio launch: 0.1s). /home/zono50/stable-diffusion-webui/extensions/SadTalker/checkpoints/auido2pose_00140-model.pth /home/zono50/stable-diffusion-webui/extensions/SadTalker/checkpoints/shape_predictor_68_face_landmarks.dat /home/zono50/stable-diffusion-webui/extensions/SadTalker/checkpoints/facevid2vid_00189-model.pth.tar /tmp/tmp4_w8w_ul.png landmark Det:: 0%| | 0/1 [00:00<?, ?it/s] Traceback (most recent call last): File "/home/zono50/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/routes.py", line 394, in run_predict output = await app.get_blocks().process_api( File "/home/zono50/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 1075, in process_api result = await self.call_function( File "/home/zono50/stable-diffusion-webui/venv/lib/python3.10/site-packages/gradio/blocks.py", line 884, in call_function prediction = await anyio.to_thread.run_sync( File "/home/zono50/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/to_thread.py", line 31, in run_sync return await get_asynclib().run_sync_in_worker_thread( File "/home/zono50/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 937, in run_sync_in_worker_thread return await future File "/home/zono50/stable-diffusion-webui/venv/lib/python3.10/site-packages/anyio/_backends/_asyncio.py", line 867, in run result = context.run(func, *args) File "/home/zono50/stable-diffusion-webui/modules/call_queue.py", line 15, in f res = func(*args, **kwargs) File "/home/zono50/stable-diffusion-webui/extensions/SadTalker/src/gradio_demo.py", line 111, in test first_coeff_path, crop_pic_path, crop_info = self.preprocess_model.generate(pic_path, first_frame_dir, preprocess) File "/home/zono50/stable-diffusion-webui/extensions/SadTalker/src/utils/preprocess.py", line 119, in generate lm = self.kp_extractor.extract_keypoint(frames_pil, landmarks_path) File "/home/zono50/stable-diffusion-webui/extensions/SadTalker/src/face3d/extract_kp_videos_safe.py", line 46, in extract_keypoint current_kp = self.extract_keypoint(image) File "/home/zono50/stable-diffusion-webui/extensions/SadTalker/src/face3d/extract_kp_videos_safe.py", line 64, in extract_keypoint bboxes = bboxes[0]

Tried rebooting to free up vram in case that was the issue, and same thing happened again.

zono50 avatar Apr 12 '23 19:04 zono50

I've noticed the same error running in auto1111 but I'm able to get square sized photos working (512x512) but the error triggers on portrait sizes (512x768).

moneycoat avatar Apr 13 '23 01:04 moneycoat

Same error here

YKefasu avatar Apr 13 '23 18:04 YKefasu

Same error here

siddharthahiremath avatar Dec 31 '23 21:12 siddharthahiremath

is there a fix for this?

oisilener1982 avatar Feb 23 '24 08:02 oisilener1982