SWIFT: Prompt-Adaptive Memory for Efficient Interactive Long Video Generation

Shanwen Tan, Hao Li, Jingtao Zhang, Xiaosong Jia, Xue Yang, Shaofeng Zhang, Yanyong ZhangarXiv 2026

TL;DR

SWIFT (Semantic Windowing and Injection for Flexible Transitions) is a training-free, inference-time framework that enables smooth, efficient multi-prompt long video generation. By updating historical memory via motion-orthogonal semantic injection and dynamically resizing the temporal attention window based on prompt phases, SWIFT eliminates the need to rebuild key-value (KV) caches from scratch. This allows it to achieve state-of-the-art semantic alignment and a generation speed of 22.6 FPS on a single H100 GPU.

What Problem Does This Paper Address?

Generating long, continuous videos from a sequence of text prompts (multi-prompt video generation) is a major hurdle for streaming text-to-video models. The core challenge lies in handling semantic switching at prompt boundaries while maintaining visual and temporal coherence.

Existing autoregressive video diffusion models rely heavily on a key-value (KV) cache to remember past frames. When a new prompt is introduced, there is a fundamental mismatch between the cached video history (which preserves visual continuity) and the new prompt instructions (which demand rapid semantic adaptation). Current state-of-the-art methods typically handle this by completely rebuilding the cache at prompt boundaries or enforcing rigid, fixed memory budgets. This leads to massive computational redundancy, jarring visual transitions, or a loss of long-range context.

Figure 1: Streaming interactive T2V models, e.g., LongLive [33], face unstable prompt transitions and recaching overhead. SWIFT addresses both with Semantic Injection Cache and Adaptive Dynamic Window, improving transition smoothness, long-range consistency, and inference efficiency.

Methods

SWIFT introduces a training-free framework consisting of two primary components designed to manage memory adaptively during inference:

1. Semantic Injection Cache (SIC)

Instead of wiping and reconstructing the KV cache at prompt boundaries, SWIFT computes a prompt transition signature—the difference vector between the new and old prompt embeddings. To prevent this new semantic signal from disrupting ongoing physical motion, the vector is projected onto a motion-orthogonal subspace derived from recent frame cache tangents.

Furthermore, because different attention heads capture different aspects of a video (e.g., local motion vs. global context), SWIFT performs head-wise semantic injection. It uses clipped cosine similarity to dynamically gate how much semantic update each attention head receives based on its alignment with the current video state.

Figure 2: Illustration of Semantic Injection Cache. Instead of rebuilding the full video cache at every prompt boundary, SWIFT constructs a lightweight semantic bridge from the prompt transition signal. The transition is first projected onto a motion-orthogonal subspace to avoid interfering with local temporal dynamics, and is then injected into memory through head-wise alignment with recent and sink summaries. The injected bridge is read together with continuous video memory, providing efficient semantic switching while preserving motion continuity.

2. Adaptive Dynamic Window (ADW)

Not all phases of video generation require the same amount of historical context. SWIFT schedules the temporal attention window dynamically based on the "prompt phase":

  • Near transitions: The window expands to its maximum size ($W_{max}$) to ensure a stable semantic handover.
  • Stable segments: The window shrinks to a minimum size ($W_{min}$) to minimize computational overhead and accelerate inference.

To compensate for the compressed local context during stable segments, SWIFT introduces Segment-Level Semantic Anchors. These anchors compress the prompt-conditioned history of completed segments into compact memory tokens, preserving long-range consistency without the heavy compute cost of dense attention.

Figure 3: Illustration of Adaptive Dynamic Window. SWIFT allocates temporal memory according to prompt phase rather than using a fixed local attention span throughout generation. The effective window expands around prompt transitions for stable semantic handover and shrinks inside stable intervals for efficient rollout. Segment-level semantic anchors compensate for the reduced local context by preserving compact prompt-conditioned summaries of previous segments, thereby lowering average attention cost without sacrificing long-range coherence.

Datasets

The authors evaluated SWIFT using a switched-prompt dataset generated via Qwen2-72B-Instruct.

  • Structure: The dataset contains 100 video scripts. Each script consists of 6 consecutive 10-second prompt segments, resulting in 60-second videos.
  • Evaluation Benchmarks: Visual quality, subject consistency, and temporal stability were comprehensively evaluated using VBench-Long. Text-video semantic alignment was measured using segment-wise CLIP scores.

Key Insights and Ideas

  • Motion-Orthogonal Projection is Key: The "aha moment" of the paper is realizing that prompt updates can be injected directly into existing historical memory if they are mathematically isolated from the local motion dynamics. This preserves physical continuity while instantly shifting the semantic context.
  • Attention Heads are Heterogeneous: Uniformly applying a prompt update across all attention channels degrades performance. Gating the injection head-wise ensures that heads tracking local dynamics aren't forced to abruptly change, while heads tracking global semantics adapt quickly.
  • Context Needs are Phase-Dependent: Compute budgets shouldn't be static. Expanding context only when a transition is imminent or freshly passed yields massive efficiency gains without sacrificing long-term video structure.

Key Results

  • Inference Speed: SWIFT achieved a throughput of 22.6 FPS on a single NVIDIA H100 GPU, outperforming the previous state-of-the-art method, LongLive (20.7 FPS), and significantly beating other baselines like MemFlow and FramePack.
  • Semantic Alignment: SWIFT achieved the highest CLIP scores across 5 out of 6 prompt intervals, demonstrating superior responsiveness to prompt changes over time.
  • Visual Quality: According to VBench-Long metrics, SWIFT achieved top-tier performance in aesthetic quality (60.23), imaging quality (72.32), and motion smoothness (99.19), proving that its efficiency gains do not come at the cost of video fidelity.

Limitations and Future Work

Because SWIFT is a training-free, inference-time framework, its performance is fundamentally bounded by the capabilities of its underlying base model (instantiated on Wan2.1-T2V-1.3B in this paper). It cannot introduce entirely new visual concepts or correct intrinsic failure modes of the base generator.

The authors note that in highly complex scenarios—such as those involving rare objects, fine-grained physical interactions, crowded scenes, or sudden large camera movements—fine-grained facial structures and identity consistency can still degrade. Future work will explore combining SWIFT with supervised transition data, stronger base video models, and learned memory scheduling mechanisms to improve robustness.

Summary updated

BibTeX
@misc{tan2026swift,
  author = {Shanwen Tan and Hao Li and Jingtao Zhang and Xiaosong Jia and Xue Yang and Shaofeng Zhang and Yanyong Zhang},
  title = {{SWIFT: Prompt-Adaptive Memory for Efficient Interactive Long Video Generation}},
  year = {2026},
  eprint = {2605.09442},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2605.09442},
}
Figure