Source-linked AI summary
ContextMaster: Interactive Multi-Shot Video Creation via Fixed-Budget Sparse Context Routing
Xu Guo, Zhengxuan Wei, Xinghui Li, Hanzhuo Huang, Xinyu Liu, Xiangyang Luo, Min Wei, Yiran Zhu, Qiulin Wang, Yulong Xu, Xintao Wang, Pengfei Wan, Qi Fan, Xiangwang Hou
TL;DR
Existing video systems often treat generation, reference conditioning, and editing as separate fixed-input operations, while interactive creation requires composing them over evolving history. ContextMaster unifies these operations with role-aware context, fixed-budget sparse routing, and privileged context distillation; across primitive and compositional tasks, it improves task fulfillment and cross-shot consistency while reaching 16 FPS on one GPU.
Problem
Interactive multi-shot creation requires composing generation, reference conditioning, and editing over evolving history, while existing systems treat them as separate fixed-input operations and dense history reads grow with session length.
Source: §1 · pp. 1–2Method
ContextMaster unifies the tasks with role-aware context representations, reusable clean states, fixed-budget sparse routing, ConstraintSink, and two-stage privileged context distillation.
Source: §1 · p. 3Results
Across three primitive tasks and compositional trajectories, ContextMaster improves task fulfillment and cross-shot consistency over task-specific baselines, reaching 16 FPS on a single GPU.
Source: §1 · p. 3, §5 · p. 10Takeaways & Limitations
The paper formalizes multi-shot creation as a stateful workflow spanning generation, reference conditioning, editing, and continuation over persistent visual history.
Source: §5 · p. 10Fixed-budget routing bounds repeated reads, but full-history bidirectional prefill makes throughput decline by approximately 0.4 FPS per additional shot.
Source: E Limitations · p. 16
Abstract
from arXiv · showhide
Recent video models increasingly support generation, reference conditioning, and editing within a single model, yet typically expose them as separate operations over fixed inputs. Practical creation unfolds across multiple shots, requiring one model to generate from text, follow a reference, or edit source footage while maintaining shared history. We formalize this setting as interactive multi-shot video creation (IMVC) and introduce ContextMaster, a unified model with a role-aware context representation for these operations. An interactive model must retain access to an expanding history without allowing the context read cost at each denoising step to grow. ContextMaster combines reusable clean context states with fixed budget sparse context routing and uses ConstraintSink to keep task constraints visible. To address the dual challenges of sparse context access and inference with few denoising steps, we propose a two-stage privileged context distillation framework, which transfers full context behavior from a dense teacher through consistency distillation and then refines deployment rollouts with distribution matching. Experiments on the three primitive tasks demonstrate improved task fulfillment and consistency across shots over specialized baselines. User studies further validate flexibly composed workflows, while the model reaches 16 FPS on a single GPU.
1 Introduction
ContextMaster frames multi-shot video creation as stateful composition over shared visual history, with role-aware context, fixed-budget reads, and two-stage distillation supporting varied operations and efficient inference.
- Across T2MV, R2MV, V2MV, and compositional X2MV, ContextMaster improves task fulfillment and cross-shot consistency over task-specific baselines, reaching 16 FPS on a single GPU.Source: Figure 1 · p. 2, §1 · p. 3
- IMVC formalizes stateful multi-turn generation, reference incorporation, and editing over evolving shared visual history, using role-aware rotary coordinates to distinguish heterogeneous context streams and preserve shot alignment.Source: §1 · pp. 1–3
- Cacheable clean-context states and query-dependent block-sparse reads bound denoising access as history grows; ConstraintSink reserves explicit references and aligned sources while remaining capacity retrieves relevant history.Source: §1 · pp. 2–3
- Privileged context distillation transfers dense full-context behavior to a sparse few-step student through consistency distillation, then refines deployment-matched rollouts with distribution matching.The refinement recovers perceptual detail and reduces errors accumulated in generated history.Source: §1 · pp. 2–3
2 Related Work
Prior work addresses multi-shot sequencing, unified video operations, heterogeneous context, and efficient diffusion through separate paradigms. ContextMaster frames these needs as stateful, composable operations over growing history, using role-aware fixed-budget context access and two-stage distillation.
Unified and interactive video creation
- Holistic methods plan multi-shot sequences, streaming methods generate from historical memory, and unified editors generally separate generation, reference conditioning, and editing; IMVC composes them statefully.The cited holistic, streaming, and unified approaches are described in the passage.Source: §2 · p. 3
Heterogeneous and growing visual context
- Prior work distinguishes shot identities and manages growing history with sampling, windows, sinks, retrieval, or memory; ContextMaster shares a fixed read budget across mandatory and dynamic context.Role-aware coordinates cover reference, history, source, and target streams; clean context is cached across denoising steps and history is retained as routing candidates.Source: §2 · p. 3, Figure 2 · p. 4
Sparse and few-step video diffusion
- Unlike sparse-attention and few-step diffusion methods, ContextMaster distills from a teacher reading complete clean context, then distribution-matches fixed-budget sparse rollouts.The two stages transfer teacher denoising behavior through consistency distillation and refine sparse few-step rollouts through distribution matching.Source: §2 · p. 3
3 Methodology
ContextMaster supports interactive multi-shot generation and editing through a shared interface. It combines role-aware context, cacheable fixed-budget reads, and privileged context distillation for a sparse few-step student.
3.1 IMVC Formulation and Role-Aware Context
- The role-aware interface separates finalized shot history from request-local references and sources, while encoding each visual role with distinct temporal semantics.Accepted outputs enter history and are re-encoded next round; rejected candidates can instead serve as sources for further editing. Role and frame coordinates distinguish inputs, with source and target frames aligned during editing.Source: §3.1 · pp. 4–5
3.2 Cacheable Fixed-Budget Context
- Routing splits residual capacity between source and history, preventing strong local source similarity from suppressing long-range history without cross-role score calibration.When a role is absent or has too few candidates, unused capacity transfers to the other role; mandatory and routed blocks share the same budget.Source: §3.2 · pp. 5–6
- Each target query reads at most B context blocks, with reference and aligned source blocks kept visible before adaptive retrieval.Clean context states are cached once per interaction round and reused during sampling, making latency-critical context reads independent of history length.Source: §3.2 · pp. 5–6
3.3 Privileged Context Distillation
- Privileged consistency distillation trains the sparse student to match clean predictions across adjacent noise levels after a full-context teacher transition.The frozen dense teacher uses classifier-free guidance, while the student evaluations are conditional, absorbing guidance without an unconditional inference pass.Source: §3.3 · p. 6
- Distribution matching refinement restores fine appearance and editing detail using full-context real scores and budgeted fake scores on student samples.Training samples deployment exit steps and autoregressively generated histories, so refinement accounts for few-step errors and errors accumulated in the student’s own history.Source: §3.3 · pp. 6–7
3.4 Interactive Inference
- An optional external Director plans shots, retrieves references, and localizes source segments, then executes the specifications through the same video model.Its planning and tool calls do not alter the model’s latency-critical denoising path.Source: §3.4 · p. 7
4 Experiments
Experiments evaluate ContextMaster across three multi-shot task benchmarks and interactive workflows, using a deployed student with a fixed sparse-context budget. The comparison reports task metrics and five-shot inference speed.
4.1 Setup
- Evaluation covers 100 T2MV prompts, 50 five-shot R2MV cases, 50 V2MV editing cases, and 20 X2MV interactive trajectories assessed in a user study.All methods receive the same shot-level instructions and required reference or source inputs.Source: §4.1 · p. 7
- Table 1 compares T2MV, R2MV, and V2MV on text alignment, aesthetic quality, motion smoothness, dynamic degree, and task fulfillment; reported speed is 16.74 FPS.Task fulfillment is rated by Gemini 2.5 Pro on a 1–5 scale; speed averages five-shot runs across the three tasks.Source: Table 1 · p. 8
- The deployed student starts from Wan2.1-T2V-1.3B, generates 832 × 480 clips with 81 frames per shot, and uses four denoising steps and a 6 FE active-read budget.Accepted shots are uniformly sampled at 1 FPS to build append clean-context memory; the same sparse operator and context budget are used for distillation, refinement, and inference.Source: Implementation details · p. 8
- Inference uses block-wise zeroth-order Taylor routed sparse attention in TileLang, and training uses an internal dataset of 1M multi-shot videos plus public reference and editing datasets.Training and data-construction details are provided in the supplementary material.Source: Implementation details · p. 8
Implementation details.
The section evaluates ContextMaster on three primitive video tasks, mixed creation workflows, and architectural and training ablations, alongside video-quality and efficiency measures.
Implementation details.
- Evaluation measures video quality with TA, AQ, MS, and DD; consistency with DINO-based subject similarity, CLIP-based background similarity, and Inter-Shot; task fulfillment with Gemini 2.5 Pro; and efficiency on a single H200 GPU under matched resolution and frame count.Inter-Shot groups shots containing the same character and compares their ViCLIP features; task fulfillment is rated on a 1–5 scale.Source: Implementation details · p. 8
4.2 Comparison
- On R2MV, ContextMaster’s largest gains over Phantom are in Inter-Shot and TF, and it reaches 16.74 FPS; Phantom retains higher DD and slightly higher intra-shot subject consistency.The qualitative example shows more stable reference appearance across close-up and wider views, preserving the elderly potter through the described vessel-making progression.Source: §4.2 · pp. 8–9
- On V2MV, ContextMaster leads or ties on eight of nine reported metrics, while VideoCoF retains a small AQ advantage.It applies the requested appearance edit across full-body, close-up, and wide shots while preserving source scene structure.Source: §4.2 · p. 9
4.3 User Study
- In the user study, the model obtains the highest IF and CC scores against the strongest baseline across the three primitive tasks; on X2MV, scores remain favorable across mixed creation trajectories.Participants rated VQ, IF, TC, and CC on a 1–5 scale; Table 2 reports mean ratings.Source: §4.3 · p. 9, Table 2 · p. 9
4.4 Ablation Studies
- With the 6-FE budget fixed, role separation benefits all task modes, while mandatory reference or aligned-source routing is especially important for reference-guided generation and editing.Without ConstraintSink, similarity-based Top-k routing leaves visible source remnants; the full model removes the subject and reconstructs the chair and background.Source: Table 3 · p. 9, §4.4 · p. 10, Figure 4 · p. 10
- On T2MV, PCD primarily improves Inter-Shot and TF, DMD contributes more to appearance quality, and their sequential combination performs best on every metric.The qualitative ablation shows PCD followed by DMD preserving recurring identity while retaining sharper visual detail.Source: Table 3 · p. 9, §4.4 · p. 10, Figure 4 · p. 10
5 Conclusion … B Implementation Details
ContextMaster supports stateful multi-shot video creation by combining role-aware context, fixed-budget sparse routing, and privileged context distillation. The Interactive Director turns concise requests into multi-shot operations and uses accepted outputs to update shared visual history.
5 Conclusion
- ContextMaster formalizes interactive multi-shot creation as stateful composition of generation, reference conditioning, editing, and continuation over persistent visual history.Role-aware rotary coordinates distinguish heterogeneous visual roles.Source: §5 · p. 10
- 16 FPS; ContextMaster improves task fulfillment and cross-shot consistency across three primitive tasks and compositional trajectories.The conclusion reports these gains alongside the model’s inference speed.Source: §5 · p. 10
- Asymmetric clean-context prefill and fixed-budget sparse routing bound each target query’s active reads, while ConstraintSink preserves reference and source correspondences within that budget.These mechanisms keep relevant constraints visible without increasing the active read budget.Source: §5 · p. 10
- Privileged context distillation transfers full-context teacher behavior through consistency distillation, then refines deployment-matched rollouts with distribution matching.The two stages train the sparse few-step model.Source: §5 · p. 10
A Interactive Director
- Given a concise request, the Interactive Director expands it into an ordered multi-shot script and prepares conditions for each operation.It is a tool-augmented VLM agent inspired by Aurora (Yu et al., 2026).Source: A Interactive Director · p. 14
- The Director can retrieve missing reference images through the Serper API, identify editing requests, and invoke OmniShotCut (Wang et al., 2026a) to segment source video and localize shots for modification.These tools prepare references and source segments for ContextMaster operations.Source: A Interactive Director · p. 14
- The Director dispatches instructions, references, and source segments through ContextMaster’s generation, reference, and editing interfaces, then commits accepted outputs to shared visual history for subsequent planning.The updated project state supports the Director’s next operations.Source: A Interactive Director · p. 14
B.1 Training Configuration · B.2 Training Data
Training uses a dense teacher followed by privileged consistency distillation and distribution matching distillation, with deployment-matched sparse-context training. The data pipeline combines public single-shot datasets with an internal multi-shot video collection for T2MV, R2MV, and V2MV.
B.1 Training Configuration
- The dense full-context teacher uses AdamW at 1 × 10−5 with 200 warmup steps, 0.01 weight decay, mixed precision, and initializes both PCD student and EMA target.Source: §B.1 · p. 14
- PCD uses a 2 × 10−6 learning rate, 0.99 EMA decay, 50-level teacher-noise discretization, and the deployment four-step schedule.The teacher uses classifier-free guidance scale 6.0, which is absorbed into the student for single-branch inference.Source: §B.1 · p. 14
- DMD initializes its generator from the PCD student; its frozen real-score model reads dense full context with classifier-free guidance, while the trainable fake-score model shares the generator’s fixed-budget context.Source: §B.1 · p. 14
- DMD uses five fake-score updates per generator update, and all experiments are conducted on 64 NVIDIA H200 GPUs.Source: §B.1 · p. 14
B.2 Training Data
- Teacher training starts with public HuMo (Chen et al., 2025), Kiwi-Edit (Lin et al., 2026), and Ditto-1M (Bai et al., 2025) data for single-shot reference-conditioned generation and video editing.Source: §B.2 · p. 15
- An internal collection of approximately one million multi-shot videos supplies T2MV, R2MV, and V2MV examples; R2MV uses ID-similar identity-matched references, while V2MV uses OmniShotCut (Wang et al., 2026a) segmentation and Kling 3.0-generated edit targets.Joint training samples T2MV, R2MV, and V2MV at a 4:3:3 ratio; V2MV targets cover addition, removal, and replacement.Source: §B.2 · p. 15
C Additional Ablation Studies · D Evaluation Details · D.1 User Study
The ablation selects a 6-FE active context budget as the quality–efficiency operating point, while the user-study evaluation used an interface for collecting ratings across four criteria.
C Additional Ablation Studies
- 6 FE is selected as the quality–efficiency operating point: increasing the budget from 2 to 6 FE substantially improves AQ, Inter-Shot consistency, and TF, while 8 FE yields only marginal gains and reduces throughput by 0.56 FPS.All configurations use the same checkpoint and evaluation protocol on five-shot T2MV sequences.Source: C Additional Ablation Studies · p. 15
D.1 User Study
- Figure 6 shows the interface used to collect human ratings across four evaluation criteria.Source: §D.1 · p. 15
D.2 Gemini Task-Fulfillment Evaluation
This section documents the task-specific prompts used by Gemini 2.5 Pro to evaluate task fulfillment.
D.2 Gemini Task-Fulfillment Evaluation
- Figure 7 provides the task-specific prompts used by Gemini 2.5 Pro to evaluate task fulfillment.Source: §D.2 · p. 16
E Limitations
Fixed-budget routing bounds repeated target-to-context reads, but throughput still declines as accumulated shot history grows because the context branch prefills that history bidirectionally.
E Limitations
- Approximately 0.4 FPS per additional shot is lost because the context branch performs bidirectional prefill over the full accumulated history to construct its KV cache.Future work will explore persistent per-shot caches and compact shot summaries.Source: E Limitations · p. 16
F Additional Qualitative Results
Figures 8–10 present additional qualitative results for ContextMaster across T2MV, V2MV, R2MV, and X2MV.
- Figure 8 presents additional qualitative results of ContextMaster on T2MV.Source: F Additional Qualitative Results · p. 16, Figure 8 · p. 18
- Figure 9 presents additional qualitative results of ContextMaster on V2MV.Source: F Additional Qualitative Results · p. 16, Figure 9 · p. 19
- Figure 10 presents additional qualitative results of ContextMaster on R2MV and X2MV.Source: F Additional Qualitative Results · p. 16, Figure 10 · p. 20
Related papers
This paper cites
- Learning Transferable Visual Models From Natural Language Supervision2021
- Gemini: A Family of Highly Capable Multimodal Models2023
- RoFormer: Enhanced Transformer with Rotary Position Embedding2021
- Classifier-Free Diffusion Guidance2022
- LiveEdit: Towards Real-Time Diffusion-Based Streaming Video Editing2026
- DreamVideo-Omni: Omni-Motion Controlled Multi-Subject Video Customization with Latent Identity Reinforcement Learning2026