冰箱里的大象:面向长视频理解的恒定内存帧打包

·

研究论文 · 2026/10/14

长视频、流式视频和电影级内容正使视觉语言模型(VLM)不堪重负:将每一帧编码为视觉token的标准做法会产生随视频长度线性增长的序列,导致内存消耗和推理延迟过高。现有方法如token缩减和关键帧选择虽能缩短token序列,但仍保持O(n)的扩展性,未能解决根本瓶颈。我们提出FramePack-U,一个极其简单、无需训练的帧打包框架,以恒定内存成本将任意长视频压缩为固定大小的视觉表示。FramePack-U无需微调或架构修改,可在推理时直接接入现成的VLM。受生成领域FramePack的启发,我们提出一种在固定token预算下用于视觉理解的内容感知压缩策略。具体而言,FramePack-U(1)根据每帧与文本提示的语义相似度进行评分,并以多样性驱动的方式对帧进行排序;(2)将选中的帧以不同分辨率打包进固定长度的上下文窗口。这将内存预算集中在既与指令相关又视觉多样的帧上。虽然FramePack-U理论上可将任意多帧打包进固定预算,但我们确定了一个能在各种设置下稳健泛化的经验实例。在LongVideoBench、MLVU和Video-MME上的大量实验表明,FramePack-U在不同模型家族、参数规模和帧预算下,始终优于全分辨率基线以及先前的token缩减和关键帧选择方法。值得注意的是,在Qwen3.5-35B-A3B上使用128帧预算时,FramePack-U在三个基准上分别比官方模型提升+12.9%、+10.6%和+9.7%。

该工作直面长视频理解中视觉token随长度线性增长导致内存和延迟瓶颈的根本问题,提出无需训练、即插即用的恒定内存帧打包方案,并在多个主流基准和模型上取得一致且显著的提升,对实际部署长视频VLM具有重要价值。

Hour-long videos, streaming feeds, and movie-length content are pushing vision-language models (VLMs) past their breaking point -- the standard recipe of encoding each frame into visual tokens yields sequences that grow linearly with video length, causing prohibitive memory consumption and inference latency. Existing approaches, such as token reduction and keyframe selection, shorten the token sequence but leave the O(n) scaling intact, failing to resolve the fundamental bottleneck. We propose FramePack-U, a strikingly simple, training-free frame packing framework that compresses arbitrarily long videos into a fixed size visual representation at constant memory cost. FramePack-U requires no fine-tuning or architectural modification -- it plugs directly into off-the-shelf VLMs at inference time. Inspired by FramePack from the generation literature, we propose a content-aware compression strategy for visual understanding under a fixed token budget. Specifically, FramePack-U (1) scores each frame by its semantic similarity to the text prompt and ranks frames in a diversity-driven manner, and (2) packs the selected frames at varying resolutions into a fixed-length context window. This concentrates the memory budget on frames that are both instruction-relevant and visually diverse. While FramePack-U can in theory pack arbitrarily many frames into the fixed budget, we identify an empirical instantiation that generalizes robustly across settings. Extensive experiments on LongVideoBench, MLVU, and Video-MME show that FramePack-U consistently outperforms full-resolution baselines and prior token reduction and keyframe selection methods across diverse model families, parameter scales, and frame budgets. Notably, on Qwen3.5-35B-A3B with a 128-frame budget, FramePack-U yields gains of +12.9\%, +10.6\%, and +9.7\% over the official model on the three benchmarks, respectively.

阅读原文

参与讨论