[Bugfix][Models] Register sleep-managed runtime buffers (#53507)

Signed-off-by: Ronald1995 <ronaldautomobile@163.com>
Signed-off-by: aoshen02 <aoshen@inferact.ai>
Co-authored-by: aoshen02 <aoshen@inferact.ai>
This commit is contained in:
Ronald
2026-08-29 10:32:24 +08:00
committed by GitHub
co-authored by aoshen02
parent 7fd9cc036e
commit 16d6c376bc
6 changed files with 427 additions and 19 deletions
+5 -1
View File
@@ -765,7 +765,11 @@ class VoxtralEncoderModel(nn.Module):
max_frequency=8000.0,
sampling_rate=self.config.sampling_rate,
)
self.mel_filters = torch.tensor(mel_filters, dtype=torch.float32)
self.register_buffer(
"mel_filters",
torch.tensor(mel_filters, dtype=torch.float32),
persistent=False,
)
def compute_whisper_melspec(
self,