From 1fcd256e4c0d355a7c4e895be2ed65b6efbe3bdf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20BREDIN?= Date: Fri, 12 Sep 2025 13:53:13 +0200 Subject: [PATCH] fix: fix cluster re-numbering in VBx (#1918) --- src/pyannote/audio/pipelines/clustering.py | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/pyannote/audio/pipelines/clustering.py b/src/pyannote/audio/pipelines/clustering.py index f3f90802..fa86eaee 100644 --- a/src/pyannote/audio/pipelines/clustering.py +++ b/src/pyannote/audio/pipelines/clustering.py @@ -664,10 +664,8 @@ class VBxClustering(BaseClustering): else: hard_clusters = np.argmax(soft_clusters, axis=2) - # re-number clusters from 0 to num_large_clusters - _, hard_clusters = np.unique(hard_clusters, return_inverse=True) hard_clusters = hard_clusters.reshape(num_chunks, num_speakers) - + return hard_clusters, soft_clusters, centroids