Merge b4c9e37c8e7e15ef14546b3f38debb8b3dfa6933 into 34fc1fdf0d8ff520e2bb18267d046ca207c78ef9

This commit is contained in:
jianyou 2025-07-24 11:54:59 +08:00 committed by GitHub
commit 2642b187b2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -429,7 +429,7 @@ class HubertModel(nn.Module):
# padding_mask: (B, T), bool
# mask_indices: (B, T), bool
x = x.transpose(0, 1)
x, x_lens = self.encoder(x, (~padding_mask).sum(dim=-1))
x, x_lens = self.encoder(x, (~padding_mask).sum(dim=-1) if padding_mask is not None else None)
x = x.transpose(0, 1)
if features_only: