AB
AiBoss
project

MAGREF - A multi-subject video generation framework launched by ByteDance

MAGREF (Masked Guidance for Any-Reference Video Generation) is a multi-agent video generation framework launched by ByteDance. MAGREF requires only a single reference image and text prompts to generate high-quality, subject-specific video...

What is MAGREF?

MAGREF (Masked Guidance for Any-Reference Video Generation) is a multi-subject video generation framework launched by ByteDance. MAGREF requires only a single reference image and text prompts to generate high-quality videos with consistent subjects, supporting single-person, multi-person, and complex interaction scenarios involving people, objects, and backgrounds. Based on region-aware dynamic masking and pixel-level channel stitching mechanisms, MAGREF can accurately replicate identity features, maintaining the coordination and consistency of people, objects, and backgrounds in the video. It is suitable for various scenarios such as content creation and advertising production, demonstrating extremely strong generation capabilities and controllability.

MAGREF's main functions

  • Multi-subject video generationSupports single-person and multi-person interaction, as well as the generation of complex scenes involving people, objects, and backgrounds, maintaining a high degree of consistency in identity characteristics, and preventing face mixing when multiple people are in the same frame.
  • High consistency and controllabilityBased on a reference image and text prompts, it generates videos with stable identities, natural movements, and harmonious backgrounds, supporting precise control over character movements, expressions, environment, and lighting effects.
  • Complex scene processingIt supports interaction between people and objects (such as interaction between people and pets, and people manipulating objects) and people placed in complex backgrounds (such as city street scenes, natural environments, etc.), generating videos with clear semantics and consistent style.
  • Efficiency and versatilityNo need to design separate models for different tasks; based on minimal architectural changes and a unified training process, it adapts to multiple reference graph configurations.

MAGREF's technical principles

  • Region-aware dynamic masking mechanismIn the generation space, a blank canvas is constructed, and input reference images (such as faces, objects, backgrounds, etc.) are randomly arranged within it. A spatial region mask is generated for each reference image, indicating the semantic location of the image on the canvas. Based on the mask, the model understands "who controls which part of the image," maintaining structural consistency, clear identities, and distinct relationships even when the number and order of reference images differ.
  • Pixel-level channel stitching mechanismAll reference images are aligned and stitched pixel-by-pixel along the feature dimension, avoiding image blurring or information aliasing issues that may occur with traditional token stitching. This enhances visual consistency and maintains accurate reproduction of details such as pose, clothing, and background in the generated result.
  • Three-stage data processing flow:
    • Filtering and subtitle generationThe algorithm segments semantically consistent segments from the original video, filters out low-quality samples, and generates structured text for each segment.
    • Subject extraction and mask annotationBased on label extraction and semantic segmentation, key objects (such as animals, clothing, props, etc.) in the video are identified, and accurate masking is obtained through post-processing.
    • Facial recognition and identity modelingThe system detects and assigns identities to individuals in videos, selects high-quality facial images for reference image construction, and ensures identity consistency during training.
  • Unified model based on DiT architectureMAGREF is built on top of the Diffusion Transformer (DiT) architecture, introducing mask guidance and channel concatenation mechanisms to achieve a unified model that can adapt to a variety of complex video generation tasks. It eliminates the need to design separate models for different tasks, achieving a balance between strong generalization and high controllability through minimal architectural changes and a unified training process.

MAGREF's project address

MAGREF application scenarios

  • Content creation and entertainmentIt can be used in personal short video creation, creative video production, virtual character generation, as well as film and television special effects and game development to stimulate creativity and reduce production costs.
  • EducationIt helps students understand knowledge more intuitively through historical reenactments, scientific demonstrations, and language learning videos, thereby enhancing teaching effectiveness.
  • Advertising and MarketingQuickly generate high-quality ad videos, brand promotion content, and e-commerce live streaming materials to enhance appeal and interactivity.
  • Virtual Reality and Augmented RealityEnhance the realism of virtual reality content and integrate virtual elements into real-world scenarios to improve user experience.
  • Social media and enterprise applicationsGenerate personalized videos, interactive videos, corporate promotional videos, and training videos to meet individual sharing and corporate promotion needs.