Views
No views yet
1from transformers import VideoMAEImageProcessor, AutoModel, AutoConfig
2import numpy as np
3import torch
4
5
6config = AutoConfig.from_pretrained("revliter/internvideo_next_large_p14_res224_f16", trust_remote_code=True)
7processor = VideoMAEImageProcessor.from_pretrained("revliter/internvideo_next_large_p14_res224_f16")
8model = AutoModel.from_pretrained('revliter/internvideo_next_large_p14_res224_f16', config=config, trust_remote_code=True)
9
10model = model.cuda().half()
11video = list(np.random.rand(16, 3, 224, 224))
12
13# B, T, C, H, W -> B, C, T, H, W
14inputs = processor(video, return_tensors="pt")
15inputs['pixel_values'] = inputs['pixel_values'].permute(0, 2, 1, 3, 4).half().cuda()
16output_embedding = model.extract_features(**inputs)
17
18print(output_embedding.shape) # [1, 4096, 1024]@article{wang2025internvideonext,
title={InternVideo-Next: Towards General Video Foundation Models without Video-Text Supervision},
author={Chenting Wang and Yuhan Zhu and Yicheng Xu and Jiange Yang and Ziang Yan and Yali Wang and Yi Wang and Limin Wang},
year={2025},
journal={arXiv preprint arXiv:2512.01342},
}