Introduction
The landscape of image generation has historically been characterized by specialized, fragmented models. While Large Language Models (LLMs) like GPT-4 have achieved a "unified" state where a single model handles diverse linguistic tasks, image generation typically requires a "Frankenstein's monster" of components—base diffusion models, task-specific adapters like ControlNet, and external encoders like CLIP. This fragmentation introduces complexity, potential information loss during cross-modal encoding, and limited generalization to novel tasks.
OmniGen, proposed by researchers at the Beijing Academy of Artificial Intelligence (BAAI), addresses these challenges by introducing a unified diffusion model. OmniGen treats all image-related tasks—generation, editing, and computer vision—as a singular "anything-to-image" problem, enabling end-to-end execution through natural language instructions without the need for external plugins.
Methodology
OmniGen simplifies the generative architecture into two primary components: a Variational Autoencoder (VAE) and a Transformer backbone.
Unified Input and Architecture
Unlike traditional models that rely on separate text encoders, OmniGen processes interleaved text and images directly. Images are converted into visual tokens and treated as part of the sequence alongside text tokens. The model utilizes a transformer initialized from Phi-3, leveraging its inherent reasoning and instruction-following capabilities.
Training Objectives
The model employs Rectified Flow, which simplifies the diffusion process by learning a straight-line path between noise and data. To balance spatial understanding with sequential generation, a hybrid attention mechanism is used: bidirectional attention within image tokens ensures local coherence, while causal attention across the sequence maintains the relationship between instructions and generated output.
Dataset Construction: The X2I Framework
To achieve generalist capabilities, the authors developed the X2I (Anything-to-Image) dataset, comprising approximately 100 million images. This dataset standardizes diverse tasks into a unified format:
- Text-to-Image: High-quality pairs from Recap-DataComp and JourneyDB.
- Image Editing: Instruction-based editing data from MagicBrush and InstructPix2Pix.
- Subject-Driven Generation: A curated "Web Images" dataset designed to maintain identity across various contexts.
- Computer Vision Tasks: Data for depth mapping, edge detection, and segmentation to instill spatial awareness.
Experimental Results
Despite its relatively small size of 3.8 billion parameters, OmniGen demonstrates superior performance compared to significantly larger models.
Benchmarking and Fidelity
On the GenEval benchmark, OmniGen achieved a score of 0.70, outperforming Stable Diffusion 3 (0.68) and DALL-E 3 (0.67). In subject-driven generation tasks, the model maintains high fidelity to reference identities without requiring the fine-tuning steps typical of models like DreamBooth.
In-Context Learning
A notable emergent property of OmniGen is its ability to perform in-context learning. By providing a few "input-output" image pairs in the prompt, users can teach the model new tasks on the fly, mirroring the few-shot capabilities of LLMs.
Conclusion and Future Work
OmniGen represents a significant step toward a universal foundation model for vision. By unifying diverse tasks into a single transformer framework, it reduces pipeline complexity and improves instruction following. While challenges remain—specifically in complex text rendering and fine anatomical details—the model's open-source release provides a robust foundation for future research in unified multi-modal generation.
Summary updated