TL;DR
MemRoPE is a training-free framework that enables autoregressive video diffusion models to generate infinitely long, coherent videos—even up to an hour in length. By replacing static caches with "evolving" memory tokens and decoupling positional encoding from stored data, it prevents the common pitfalls of long-form generation like identity drift and motion stagnation without requiring any additional fine-tuning.
What Problem Does This Paper Address?
Generating long videos (minutes to hours) is a massive challenge for current AI. Most models generate video "chunks" autoregressively, meaning they look at previous frames to decide what the next ones should look like. However, because of memory limits, they use a "sliding window" cache—they remember the last few frames and throw away the rest.
This leads to three major problems over long durations:
- Identity Drift: The main character slowly transforms into someone else because the model "forgot" what they looked like at the start.
- Motion Stagnation: The video becomes a static image because the model loses the temporal context of movement.
- Fidelity Degradation: The visual quality collapses as errors accumulate.
Existing solutions either keep a "static" anchor of the first few frames (which doesn't help when the scene changes) or use complex selection methods that cause "jittery" visual jumps when the cache updates.
Methods
The authors introduce two co-designed components that allow the model to "remember" better without using more memory:
1. Memory Tokens (The "What")
Instead of simply deleting old frames when the cache is full, MemRoPE compresses them into Memory Tokens using Exponential Moving Averages (EMA). It maintains two parallel streams:
- Long-term Memory: Uses a slow decay rate to preserve global identity and scene structure.
- Short-term Memory: Uses a faster decay rate to track recent dynamics and motion. This dual-stream approach ensures the model knows both "who the character is" and "what they were doing a moment ago."
2. Online RoPE Indexing (The "How")
This is the technical "secret sauce." Most models use Rotary Positional Embeddings (RoPE) to tell the model where a token is in time. Usually, RoPE is baked into the data before it's stored in the cache. However, you cannot mathematically "average" two tokens if they have different RoPE rotations—it creates a garbled mess.
MemRoPE implements Position-free caching: it stores the "raw" content of the frames and only applies the positional "rotation" at the very last second during the attention step. This makes the EMA aggregation mathematically sound and allows the model to generate infinitely without ever exceeding its trained "positional range."
Datasets
The researchers evaluated MemRoPE using:
- Wan2.1-T2V (1.3B): The base architecture used for implementation.
- MovieGenBench: A set of high-quality text prompts used to generate the test videos.
- VBench-Long: A comprehensive benchmark specifically designed to measure the quality of long-form video generation across dimensions like aesthetic quality, subject consistency, and motion smoothness.
Key Insights and Ideas
- Decoupling is Key: The most significant "aha" moment is that temporal aggregation (averaging frames) and positional encoding (RoPE) are fundamentally at odds if handled traditionally. By decoupling them, the authors unlocked the ability to use EMA—a staple of signal processing—within a Transformer's KV cache.
- Memory vs. Retention: The paper suggests that the secret to long-horizon coherence isn't necessarily retaining more frames, but remembering them more efficiently. A compressed, evolving summary is more useful than a few scattered, static "sink" frames.
- Training-Free Portability: Because it modifies the inference logic rather than the model weights, MemRoPE can be "plugged in" to almost any existing autoregressive video model (like Wan2.1 or CogVideoX) to immediately improve its long-form capabilities.
Key Results
- The One-Hour Milestone: The authors successfully demonstrated a continuous one-hour video generation (at 16 fps) that maintained subject identity and visual fidelity throughout—a feat nearly impossible for standard sliding-window methods.
- Quantitative Superiority: On the VBench-Long benchmark at 240 seconds, MemRoPE achieved a +1.85 point improvement in average score over the baseline, significantly outperforming other state-of-the-art training-free methods like Deep Forcing and $\infty$-RoPE.
- User Preference: In a "blind" user study, participants preferred MemRoPE videos over the baseline 98.3% of the time for 120-second generations.
- Efficiency: Despite the added complexity of the memory streams, MemRoPE actually increased inference speed in some configurations (e.g., from 3.6 to 5.1 FPS on an A6000 GPU) because it allows for a more compact, efficient cache.
Limitations and Future Work
- Base Model Ceiling: As a training-free method, MemRoPE cannot improve the per-frame quality beyond what the original model is capable of; it only prevents that quality from degrading over time.
- Lossy Compression: EMA is a "lossy" form of compression. While it's great for identity, it might struggle to recall very specific, fine-grained details from a scene that happened 30 minutes ago.
- Future Directions: The authors suggest that replacing the simple EMA with a "learned" memory compression module (which would require training) could further improve the precision of distant recall.
Summary updated