Skip to content

Fix for crash in alignment when called with no tokens #1081

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

balooii
Copy link

@balooii balooii commented Mar 20, 2025

Fixes #1048

There are probably better ways to do this but this change restores previous behavior which worked before changes from 65b2332
-> when called with empty list of tokens return empty tensor

@ZodiacFRA
Copy link

ZodiacFRA commented Apr 18, 2025

Worked for me, thanks

EDIT: I was using version 3.3.1

@SoftwareAndOutsourcing
Copy link

I haven't had this issue since upgrading to v3.3.2. Is it still necessary to address it?

@ZodiacFRA
Copy link

ZodiacFRA commented Apr 20, 2025

Hi @SoftwareAndOutsourcing

I was using version 3.3.1, I did not try with 3.3.2.

However in alignment.py, get_wildcard_emission() is the same in both versions so it might be worth it to add this fix (unless the bug has been fixed in another part of the code)

Thank you for your work anyway :)
Have a nice day

bjollans added a commit to bjollans/whisperX that referenced this pull request Jun 7, 2025
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

Successfully merging this pull request may close these issues.

tensors used as indices must be long, int, byte or bool tensors
3 participants