SuperAPI AI Directory

Mogao - ByteDance Seed Team's Unified Architecture for Multimodal Understanding and Generation

Author: AI小集 · Original source: AI工具集

What is Mogao

Mogao is a full foundation model for interleaved multimodal generation launched by the ByteDance Seed team. Architecturally, it adopts a dual visual encoder, combining a variational autoencoder (VAE) and a vision transformer (ViT), which enables better visual understanding and improves context alignment for image generation. Mogao introduces interleaved rotary position embedding (IL-RoPE) to capture the two-dimensional spatial position information of images and the temporal position relationships of multimodal data, and further improves generation quality and consistency through multimodal classifier-free guidance technology.

Mogao

Main Features of Mogao

  • Multimodal understanding and generation: Mogao can process interleaved sequences of text and images, achieving high-quality multimodal understanding and generation. It can generate high-quality images given text descriptions, and can generate related text content given images. In multimodal understanding tasks, text tokens attend to vision transformer (ViT) tokens and text tokens in the historical sequence, enabling better understanding of image content.
  • Zero-shot image editing and compositional generation: Mogao demonstrates strong zero-shot image editing capabilities, able to edit and modify images without additional training. It has compositional generation capabilities, able to combine different elements to generate new images, with strong consistency and coherence.
  • High-quality image generation: Mogao performs excellently in image generation, with outstanding performance across multiple style categories including realism, graphic design, anime, and illustration. It supports image generation at up to 2K resolution, and can generate images with high detail and high quality.
  • Text rendering capability: Mogao has significantly improved text rendering, with a text usability rate of up to 94%, effectively solving the previous difficulty of Chinese text rendering in image generation.

Technical Principles of Mogao

  • Dual visual encoder: Mogao uses a variational autoencoder (VAE) and a vision transformer (ViT) as visual encoders. When an image is input as a condition, the visual features of both the VAE and ViT are extracted simultaneously and appended to the historical sequence. For multimodal understanding tasks, text tokens attend only to ViT tokens and text tokens; for multimodal generation tasks, noisy VAE tokens attend to all tokens in the historical sequence.
  • Deep fusion architecture: Based on a pre-trained large language model (LLM), Mogao uses a unified self-attention layer to process visual and text sequences simultaneously, and uses different multilayer perceptrons (MLPs) in the feedforward network (FFN) to process the visual and text modalities separately.
  • Interleaved rotary position embedding (IL-RoPE): Used to capture the two-dimensional spatial position information of images and the temporal position relationships of multimodal data, enabling the model to better process interleaved text and image sequences.
  • Mixed-resolution training: Pre-training and fine-tuning are performed on images of different aspect ratios and resolutions, from low resolution (such as 256²) to high resolution (such as 2048²), and size embeddings are introduced to enable the model to perceive the target resolution.
  • Cross-modal RoPE: Treats text tokens as two-dimensional tokens and applies two-dimensional RoPE, further enhancing the alignment between visual and text tokens.
  • Post-training stage: Includes continual training (CT), supervised fine-tuning (SFT), reinforcement learning from human feedback (RLHF), and prompt engineering (PE), improving the model's performance and controllability.
  • Defect-aware training paradigm: Introduce a defect detector to precisely locate defect regions, and effectively expand the training dataset through mask latent space optimization.
  • Hyper-SD and RayFlow: Optimize the generation path, guide each data point to the target distribution of a specific instance, reduce path collisions, and improve generation stability and sample diversity.
  • Importance sampling mechanism: Learn to focus on the most critical time steps during training, supporting efficient few-step sampling without affecting generation quality.

Mogao's project address

Mogao's application scenarios

  • Content creation: Mogao can generate high-quality images based on text descriptions, and can also generate relevant text descriptions based on images.
  • Intelligent assistant: Mogao can combine multiple modalities such as speech, images, and text to achieve more natural and intelligent human-computer interaction.
  • Mutual retrieval of images and text: Users can search for relevant images by entering text descriptions, or obtain relevant text descriptions by uploading images.
  • Virtual reality and augmented reality: Mogao can be used to generate virtual environments and interactive elements, enhancing the user experience of virtual reality and augmented reality.
  • Medical imaging analysis: Mogao can combine different modalities of medical imaging (such as MRI, CT, ultrasound, etc.) with text descriptions to improve the accuracy of disease diagnosis and early detection capability.