Views
No views yet

1# git clone https://github.com/TIGER-AI-Lab/Vamba
2# cd Vamba
3# export PYTHONPATH=.
4from tools.vamba_chat import Vamba
5model = Vamba(model_path="TIGER-Lab/Vamba-Qwen2-VL-7B", device="cuda")
6test_input = [
7 {
8 "type": "video",
9 "content": "assets/magic.mp4",
10 "metadata": {
11 "video_num_frames": 128,
12 "video_sample_type": "middle",
13 "img_longest_edge": 640,
14 "img_shortest_edge": 256,
15 }
16 },
17 {
18 "type": "text",
19 "content": "<video> Describe the magic trick."
20 }
21]
22print(model(test_input))
23
24test_input = [
25 {
26 "type": "image",
27 "content": "assets/old_man.png",
28 "metadata": {}
29 },
30 {
31 "type": "text",
32 "content": "<image> Describe this image."
33 }
34]
35print(model(test_input))@misc{ren2025vambaunderstandinghourlongvideos,
title={Vamba: Understanding Hour-Long Videos with Hybrid Mamba-Transformers},
author={Weiming Ren and Wentao Ma and Huan Yang and Cong Wei and Ge Zhang and Wenhu Chen},
year={2025},
eprint={2503.11579},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/abs/2503.11579},
}