Abstract: While current LLM chatbots like GPT-4V bridge the gap between human instructions and visual representations to enable text-image generations, they still lack efficient alignment methods for high-fidelity performance on multiple downstream tasks. In this paper, we propose $M^{2}Chat$, a novel unified multimodal LLM framework for generating interleaved text-image conversation across various scenarios. Specifically, we propose an $M^{3}Adapter$ that efficiently integrates granular low-level visual information and high-level semantic features from multi-modality prompts. Upon the well-aligned fused feature, $M^{3}Adapter$ tailors a learnable gating strategy to balance the model creativity and consistency across various tasks adaptively. Moreover, to further enhance the effectiveness of $M^{3}Adapter$ while preserving the coherence of semantic context comprehension, we introduce a two-stage $M^{3}FT$ fine-tuning strategy. This strategy optimizes disjoint groups of parameters for image-text alignment and visual-instruction respectively. Extensive experiments demonstrate our $M^{2}Chat$ surpasses state-of-the-art counterparts across diverse benchmarks, showcasing its prowess in interleaving generation, storytelling, and multimodal dialogue systems.
Introduction
While models like GPT-4V have mastered the art of understanding images, the "reverse" task—generating interleaved text and images that are both contextually consistent and visually high-fidelity—remains a significant challenge. Existing Vision-Language Models (VLMs) often struggle with alignment gaps, where mapping complex semantic features into image generation spaces (like Stable Diffusion) leads to a loss of detail. Furthermore, maintaining consistency across multi-turn dialogues or image-editing tasks often requires massive computational resources, often resulting in "stiff" outputs that fail to capture human nuance.
The M2Chat Framework
To address these challenges, we propose M2Chat, a unified framework bridging a VLM (LLaMA-AdapterV2) with a high-quality diffusion model (SDXL). The core of this framework is the M3Adapter (Multimodal Multi-level Adapter). Unlike traditional approaches that only pass high-level text embeddings, the M3Adapter integrates granular, low-level visual primitives with high-level semantics.
To solve the "creativity vs. consistency" trade-off, we implemented a Learnable Gating Strategy. This adaptive gate uses cosine similarity between "answer" tokens and "caption" tokens to dynamically adjust the model's reliance on existing visual context versus new semantic instructions.
Two-Stage Fine-Tuning (M3FT)
The effectiveness of the M3Adapter is further enhanced by a two-stage fine-tuning strategy:
- Stage 1 (Alignment): Focuses on aligning the VLM’s feature space with SDXL’s input space using a dual-loss objective that combines standard diffusion loss with a feature-matching alignment loss.
- Stage 2 (Consistency): Tunes the model on interleaved dialogue and instruction data to ensure it can handle complex, multi-round interactions without losing the narrative thread.
Key Results and Insights
M2Chat achieves state-of-the-art (SOTA) results with remarkable efficiency, requiring only 100 A100 hours for training. On the MS-COCO dataset, M2Chat achieved a CLIP score of 29.87, surpassing larger models like Emu2-Gen and NExT-GPT. On CC3M, it reached an FID of 26.15, showing significantly better image quality than MiniGPT5.
In MMDialog tests, M2Chat showed a 5.52 point increase in the InterRel score—a metric we introduced to quantify how well a generated image relates to the entire preceding dialogue history. This demonstrates the model's superior ability to "stay on topic" visually during a conversation. Additionally, the M3Adapter is highly efficient, adding only 299M parameters, making it a versatile "plug-and-play" module for existing LLMs.
Conclusion
M2Chat represents a significant step forward in efficient, high-fidelity interleaved generation. By utilizing smart architectural bridges rather than raw scaling, it achieves SOTA performance in storytelling and multimodal dialogue. Future work will explore tighter integration with video generation and expanding the framework to handle additional modalities like audio.
Summary updated