fix: weights_only=False for SelVA checkpoints (PyTorch 2.6 compat)

PyTorch 2.6 changed the default to weights_only=True. SelVA checkpoints
contain non-tensor types (numpy scalars etc.) that fail strict unpickling.
All weights come from trusted sources (jnwnlee/selva HF repo).

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-04-04 16:38:31 +02:00
parent 40388ba6de
commit 614a2e02aa
4 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -57,7 +57,7 @@ class FeaturesUtils(nn.Module):
self.synchformer = Synchformer(video=True, audio=False)
self.synchformer.load_state_dict(
torch.load(synchformer_ckpt, weights_only=True, map_location='cpu'))
torch.load(synchformer_ckpt, weights_only=False, map_location='cpu'))
self.text_encoder_t5 = T5EncoderModel.from_pretrained('google/flan-t5-base')
self.tokenizer_t5 = T5TokenizerFast.from_pretrained('google/flan-t5-base')