Skip to content

Bypass the inferences of full zero mask chunks - #1982

Open
danhayoun wants to merge 2 commits into
pyannote:mainfrom
danhayoun:main
Open

Bypass the inferences of full zero mask chunks#1982
danhayoun wants to merge 2 commits into
pyannote:mainfrom
danhayoun:main

Conversation

@danhayoun

@danhayoun danhayoun commented Feb 9, 2026

Copy link
Copy Markdown

Problem :

There is a lot of full zero masks infered by the embedding model. Because the number of speakers searched for by chunk is fixed, many times there won't be as many speakers inside as the number we search. This creates those empty masks. They take unnecessary time to pass through inference of the embedding model. For example, I counted the number of empty masks I got on an audio of around ~10 min with 2 speakers on it. 60% of the masks generated where fully at zero.

Suggestion :

They take quite a time to infer with no real necessity, as they are at the end always assigned to 'NaN'. That's why I suggest to detect the empty masks and directly map them to NaN and not pass them through inference.

Numerics :

For an audio of 10 min, 2 speakers, without my add-on it takes around 10.2s to run the full diarization pipeline, average on 10 tries.

For the same audio, with my add-on it takes around 7.5s, average on 10 tries.

Note :

Although the diarization initally serves to audios with many speakers, because it was integrated in many more projects (mostly due to being added on WhisperX), many audios actually passing by the diarization may contain just one speaker, increasing the number of full-zero masks.

@stale

stale Bot commented Aug 8, 2026

Copy link
Copy Markdown

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@stale stale Bot added the wontfix label Aug 8, 2026
@stale stale Bot closed this Sep 8, 2026
@hbredin hbredin reopened this Sep 9, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants