Introduction
The field of Artificial Intelligence Generated Content (AIGC) has seen a surge in specialized models capable of high-fidelity generation within specific modalities. However, most existing Multimodal Generative Models (MGMs) operate as "specialists," struggling with tasks that require cross-modal reasoning, zero-shot control, or multi-round interaction. Current systems often fail to handle interleaved inputs—where text, images, and audio are mixed—and typically require task-specific fine-tuning for sophisticated editing.
CoDi-2 is introduced as a versatile Multimodal Large Language Model (MLLM) designed to overcome these hurdles. By treating all modalities as a unified language space, CoDi-2 functions as a generalist foundation model capable of "any-to-any" generation. It can process and produce any combination of text, image, and audio, enabling complex in-context learning and interactive editing for the first time.
System Architecture
CoDi-2 utilizes an "LLM-as-the-brain" architecture, centered around Llama-2-7b-chat as the core reasoning engine. To bridge the gap between different modalities, the researchers employed ImageBind encoders to map visual and auditory features into the same embedding space as text tokens.
Unlike models that generate raw pixels or waveforms directly, CoDi-2's LLM predicts continuous features within this aligned space. These features are then decoded by synchronized diffusion models—Stable Diffusion for images and AudioLDM2 for audio—to synthesize the final high-fidelity output. This approach preserves the nuance and detail necessary for quality generation while leveraging the LLM's inherent logical reasoning capabilities.
Training and Datasets
To achieve such versatility, CoDi-2 was trained on a massive, diverse collection of data:
- MIMIC-IT: 2.8 million instruction-response pairs for multimodal reasoning.
- Paired Datasets: Large-scale datasets like LAION-400M, AudioSet, and WebVid were used to establish basic cross-modal relationships.
- Editing Datasets: The model was trained on InstructPix2Pix for image manipulation and a custom-built audio editing dataset derived from AudioSet.
- Synthetic Interleaved Data: To compensate for the scarcity of real-world interleaved data, the authors repurposed text-only datasets (e.g., Alpaca) by replacing text tokens with multimodal feature embeddings, teaching the model to handle mixed-modality sequences.
Multimodal In-Context Learning and Interaction
A key innovation of CoDi-2 is its ability to perform "Exemplar Learning" and "Multimodal Editing." By mapping all inputs to the LLM's feature space, the model inherits the few-shot capabilities of the base language model. This allows it to infer transformations from examples (e.g., seeing an edit on one image and applying the same logic to another) or follow instructions that combine different modalities, such as editing an image to match the "vibe" of an audio clip.
Experimental Results
CoDi-2 demonstrates state-of-the-art performance across various benchmarks:
- Subject-Driven Generation: On DreamBench, CoDi-2 outperformed other tuning-free models like KoSMOS-G in maintaining subject identity across different scenes.
- Zero-Shot Image Editing: The model achieved a CLIPSIM score of 0.147 on MS-COCO, surpassing many specialized diffusion-only models.
- Audio Editing: CoDi-2 consistently achieved superior scores in Log Spectral Distance (LSD) and KL divergence for tasks involving adding, removing, or replacing sounds.
Conclusion
CoDi-2 represents a significant step toward a unified generalist model for multimodal generation. While the system is currently limited by the fidelity of its underlying diffusion models and the scarcity of specialized reasoning data, its ability to perform zero-shot, interactive, and interleaved any-to-any generation sets a new standard for MLLMs. Future work will focus on expanding to additional modalities and refining the interleaved training process for even more seamless cross-modal interaction.
Summary updated