Skip to content
AI-generated research idea🟠Medium💡Moderate InnovationRelated work found

Within-Shot Memory Re-Injection for Immediate Attribute Updates

A method that dynamically re-injects updated memory states mid-shot once a prompt arrives, ensuring instant reflection of newly stated persistent changes rather than waiting for subsequent shots.

Time

several weeks

Compute level

Multiple GPUs

Resources

Standard GPU cluster with the released model codebase

What the paper used

Six H100 GPUs for the full real-time system (DiT 1, auxiliary 2, agent 3) running Wan2.2-TI2V-5B in BF16.

Prerequisites

transformer architectures, diffusion models, KV-cache manipulation

Scope

modify existing code

The Gap

The memory is built and prefilled before the prompt of the current shot arrives due to real-time constraints (C1), which means a persistent change stated for the first time in the current prompt cannot be rendered into the memory images until the following shot.

“A persistent change that the current prompt states for the first time, such as a character shaving, is not yet in the memory images of that shot, which can keep the earlier look until the agent has drawn the change for the following shots.”
From the paper, Section H, page 27. Matched against the PDF text.

Limitation

Because memory images are generated prior to the prompt arrival, newly introduced persistent changes (such as a character starting to shave or changing clothes) are missing in the current shot's memory sink, causing a one-shot lag in visual state representation.

Proposed Solution

Design an auxiliary real-time adapter or fast in-context key-value patching mechanism that injects updated entity cards or partial visual edits into the active generation stream immediately after prompt parsing, bypassing full pre-generation pipelines.

The paper’s authors list this direction as future work, so they may already be pursuing it.

Why This Matters

This is expected to eliminate temporal state lag for sudden plot twists and actions, raising fine-grained narrative consistency.

How to Get Started

How to test it: Test whether dynamic prompt-time KV updates reduce state error rates on sudden attribute changes in LongStory-Hard compared to the pre-baked memory baseline, measuring state accuracy via the VLM judge.

  1. Clone the released codebase and reproduce baseline metrics on LongStory-Online.
  2. Implement a script that intercepts prompt tokens upon arrival to identify newly declared entity changes.
  3. Construct a fast, lightweight attention-sink patching function to append text/visual tokens mid-generation.
  4. Benchmark the latency overhead against the strict real-time budget limits.

Code linked to this paper on Hugging Face: github.com/NVlabs/LongLive

Suggested by AI. Adapt it to your setup.

Has This Been Done?

Related work found

Works like Models Take Notes at Prefill: KV Cache Can Be Editable and Composable and Matrix-Game 3.5: Enhancing Real-Time Streaming Interactive World Models with Patch Memory explore editable KV caches and patch memories for real-time generation streams. However, they do not specifically target immediate attribute updates via auxiliary real-time adapters or fast in-context key-value patching for entity cards as proposed.

We searched OpenAlex and arXiv for “real-time KV cache patching diffusion model memory injection” and “Within-Shot Memory Re-Injection for Immediate Attribute Updates” and an AI compared the idea with the top 10 results. A small search can miss relevant work.

Source Paper

Agentic LongLive: Asynchronous Agentic Memory for Long Video Generation

Shaoteng Liu, Shuai Yang, Wei Huang +3 more · 2026

The paper introduces Agentic LongLive, an asynchronous agentic memory framework that enables real-time autoregressive video generators to maintain long-term consistency across people, objects, and places without slowing down generation. It employs a separate memory agent running on dedicated GPUs to process revealed prompts ahead of time, committing text states and evolving entity images that are prefilled as attention sinks into the frozen generator. Evaluated on a new benchmark called LongStory-Online, the system significantly improves persistent state accuracy, protagonist identity, and location consistency while streaming faster than real time.

Related Ideas

Is this a good idea?

Share onXLinkedIn