fix: cast tensors to float32 before numpy() in feature save

T5-Gemma outputs BFloat16 which numpy does not support.
Cast all feature tensors with .float() before .numpy().

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-03-27 20:56:52 +01:00
parent 93120eb6b9
commit 20fb766ad2
+5 -5
View File
@@ -123,11 +123,11 @@ def main():
print(f"[extract] Saving features to {args.output} ...", flush=True) print(f"[extract] Saving features to {args.output} ...", flush=True)
np.savez( np.savez(
args.output, args.output,
video_features=video_features.cpu().numpy(), video_features=video_features.cpu().float().numpy(),
global_video_features=global_video_features.cpu().numpy(), global_video_features=global_video_features.cpu().float().numpy(),
text_features=text_features.cpu().numpy(), text_features=text_features.cpu().float().numpy(),
global_text_features=global_text_features.cpu().numpy(), global_text_features=global_text_features.cpu().float().numpy(),
sync_features=sync_features.cpu().numpy(), sync_features=sync_features.cpu().float().numpy(),
caption_cot=args.cot_text, caption_cot=args.cot_text,
duration=duration, duration=duration,
) )