[Model][Bugfix] Fix MiDashengLM audio encoder mask by removing incorrect logical_not (#25925)

Signed-off-by: zhoukz <me@zhoukz.com>
This commit is contained in:
Zhou Jiahao 2025-09-30 16:15:23 +08:00 committed by GitHub
parent e47433b3c1
commit 2e1b8bc2b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -426,8 +426,7 @@ class DashengAudioTransformer(nn.Module):
assert x_length.ndim == 1, "Lengths are of size (B,)" assert x_length.ndim == 1, "Lengths are of size (B,)"
scaled_lengths = (x_length / (self.hop_length * 4)).long() scaled_lengths = (x_length / (self.hop_length * 4)).long()
mask = self._to_mask(max_length=t, lengths=scaled_lengths) mask = self._to_mask(max_length=t, lengths=scaled_lengths)
split_masks = mask.logical_not().split(target_length_in_patches, split_masks = mask.split(target_length_in_patches, dim=-1)
dim=-1)
else: else:
mask = None mask = None
split_masks = [None] * len(input_splits) split_masks = [None] * len(input_splits)