BadToBest / EchoMimic

Lifelike Audio-Driven Portrait Animations through Editable Landmark Conditioning
https://badtobest.github.io/echomimic.html
Apache License 2.0
2.26k stars 263 forks source link

NameError: name 'zero_locator_tensor' is not defined #61

Closed kev123456 closed 1 month ago

kev123456 commented 1 month ago

Error occered when runing python -u infer_audio2vid_pose.py

Traceback (most recent call last): File "infer_audio2vid_pose.py", line 231, in main() File "infer_audio2vid_pose.py", line 197, in main video = pipe( File "/mnt/data/kev/miniconda3/envs/echomimic/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context return func(*args, **kwargs) File "/mnt/data/kev/project/EchoMimic/src/pipelines/pipeline_echo_mimic_pose.py", line 543, in call zero_pose_latents = torch.cat([zero_locator_tensor[:, :, c] for c in new_context]).to(device) File "/mnt/data/kev/project/EchoMimic/src/pipelines/pipeline_echo_mimic_pose.py", line 543, in zero_pose_latents = torch.cat([zero_locator_tensor[:, :, c] for c in new_context]).to(device) NameError: name 'zero_locator_tensor' is not defined

ArvinC commented 1 month ago

遇到了同样的问题

oisilener1982 commented 1 month ago

Just follow the tutorial here and you should be fine. https://www.youtube.com/watch?v=WtHdvSSQlWo

Dont follow the official guide. I got lots and lots of error until i got tired. Luckily i found the video above

zhangdanfeng888 commented 1 month ago

+1,请问这个问题解决了吗?感觉像是少了段代码

why-26 commented 1 month ago

Hello, after analyzing the project code, I conducted a successful attempt. I added the following line in the pipeline_echo_mimic_pose.py file: zero_locator_tensor = torch.zeros_like(face_locator_tensor). Here is the position where it was added, as shown in the figure. Then, I was able to successfully run the infer_audio2vid_pose.py file and obtained the inference result video. I hope this method works for everyone.

github_echomimic_q1
municef1 commented 1 month ago

Hello, after analyzing the project code, I conducted a successful attempt. I added the following line in the pipeline_echo_mimic_pose.py file: zero_locator_tensor = torch.zeros_like(face_locator_tensor). Here is the position where it was added, as shown in the figure. Then, I was able to successfully run the infer_audio2vid_pose.py file and obtained the inference result video. I hope this method works for everyone. github_echomimic_q1

Thanks for your tips!

In pipeline_echo_mimic_pose.py, I removed zero_pose latents, and edited pose_latents, pose_latents = torch.cat([torch.zeros_like(pose_latents_cond), pose_latents_cond], 0)

so I didn't have to make zero_locator_tensor and zero_pose_latents

JoeFannie commented 1 month ago

It is a bug. We have fixed it in the latest version.