Character consistency remains a significant hurdle in text-to-video (T2V) generation. While existing methods often focus on facial identity, they frequently fail to preserve a character's broader "context"—including specific clothing textures, accessories, and silhouettes. ContextAnyone addresses this "identity drift" through a novel framework that jointly reconstructs a reference image while generating video frames, ensuring high-fidelity consistency across diverse scenes.
The Challenge of Identity Drift
In cinematic storytelling, a character is defined by more than just a face; their outfit, hairstyle, and body shape are crucial for continuity. Current T2V models often treat reference images as loose suggestions, leading to fine details vanishing or changing between frames. This is primarily due to information underutilization in standard cross-attention mechanisms and a lack of training objectives that enforce strict context preservation.
Methodology
ContextAnyone introduces several architectural innovations to a Diffusion Transformer (DiT) backbone to anchor character identity:
- Joint Reconstruction & Generation: The model is trained to simultaneously reconstruct the original reference image and generate new video frames. This dual objective forces the model to internalize a comprehensive representation of the character's appearance.
- Dual-Encoder Design: High-level semantic identity is captured via a CLIP Image Encoder, while fine-grained spatial details (like fabric textures) are extracted using a Video VAE Encoder.
- Emphasize-Attention Module: A secondary fusion stage re-injects reference features into the noisy video latents, serving as a persistent "reminder" of the reference details during denoising.
- Gap-RoPE: To prevent "temporal collapse" between the static reference and dynamic video tokens, a temporal shift ($\beta$) is introduced in the Rotary Position Embeddings (RoPE), separating their positional spaces.
- Unidirectional Information Flow: Masked self-attention ensures that reference tokens influence video generation without being "polluted" by noisy video latents.
Data Generation Pipeline
To train the model effectively, the authors created a challenging dataset of ~18,000 pairs. Starting with 50,000 videos from OpenVid-HD, they used Vision-Language Models (VLMs) and image-editing tools (Flux.1) to modify the first frame's environment or action while maintaining character identity. This forces the model to learn context rather than simply copying pixels.
Experimental Results
ContextAnyone demonstrates superior performance against state-of-the-art models like Phantom and VACE at the 1.3B parameter scale. Quantitatively, it leads in ArcFace (facial identity) and DINO-I (context consistency) metrics. Notably, on a VLM-based appearance metric, ContextAnyone achieved a score of 0.9457, significantly outperforming Phantom (0.8490).
Qualitatively, as shown in Figure 1, ContextAnyone maintains complex elements—such as the specific folds of a chef's hat or the plaid pattern of an apron—even as the character moves from a garden market to a balcony setting.
Conclusion and Future Work
ContextAnyone represents a significant step toward character-consistent video generation by treating the reference image as a structural anchor. Future work will explore multi-character scenes and the use of multiple reference angles to better capture 3D character structures.
Summary updated