Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

failed when generating long video: 'numpy.ndarray' object has no attribute 'unsqueeze' #23

Open
yoebet opened this issue Jan 16, 2024 · 0 comments

Comments

@yoebet
Copy link

yoebet commented Jan 16, 2024

I generated a little longer video(3 or 4 minutes), it reports 'numpy.ndarray' object has no attribute 'unsqueeze'

I spotted hear https://github.com/ali-vilab/dreamtalk/blob/main/inference_for_demo_video.py#L118

if len(pose) >= len(gen_exp):
    selected_pose = pose[: len(gen_exp)]
else:
    selected_pose = pose[-1].unsqueeze(0).repeat(len(gen_exp), 1)
    selected_pose[: len(pose)] = pose

the pose is of np type(not a torch Tensor), and the second argument ofrepeat (dimension) may be 0, so I changed as such:

selected_pose = pose[-1][np.newaxis, ...].repeat(len(gen_exp), 0)

It works.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant