TL;DR
GILL (Generating Images with Large Language Models) is a novel framework that bridges frozen, text-only large language models (LLMs) with frozen image encoders and decoders. It is the first model capable of processing arbitrarily interleaved image-and-text inputs to produce coherent multimodal outputs, including generated text, retrieved images, and entirely new generated images.
The Multimodal Disconnect
While LLMs are masters of text and models like Stable Diffusion are experts at generating images, combining them effectively remains a significant challenge. Most existing multimodal LLMs are "read-only" for images—they can process visual input but only output text. Conversely, standard text-to-image (T2I) models are often "one-shot" tools. They excel at generating an image from a single prompt but struggle with long-range context, complex instructions, or the nuances of a back-and-forth dialogue.
The authors address this gap by creating a truly interleaved multimodal agent: one that can maintain a conversation, understand previous visual context, and intelligently decide whether to show you an existing photo or dream up a new one.
Methods: Efficiency Through Modularity
The core philosophy of GILL is efficiency through modularity. Instead of training a massive multimodal model from scratch, the authors "glue" together three powerful, pre-trained, and frozen components:
- The Brain: A frozen OPT-6.7B LLM.
- The Eyes: A frozen CLIP ViT-L visual encoder.
- The Hands: A frozen Stable Diffusion v1.5 image decoder.
To make these distinct components communicate, the researchers introduced a few key innovations:
- GILLMapper: A lightweight, 4-layer Transformer that acts as a translator. It maps the LLM’s hidden representations into the embedding space of Stable Diffusion’s text encoder. This allows the LLM to "prompt" the image generator using its sophisticated internal understanding of context.
- Special
[IMG]Tokens: The authors added new tokens to the LLM's vocabulary. When the LLM predicts these tokens, it signals that an image should be produced. - Decision Module: A linear classifier that looks at the LLM's state and decides if the model should retrieve a real image from a dataset or generate a novel one.
Because it only optimizes the small mapping layers (about 50M parameters) while keeping the 8B parameters of the base models frozen, training is highly computationally efficient, requiring only 2 GPUs for 2 days.
Key Insights and Capabilities
LLMs are Better Prompt Engineers
The paper finds that the hidden states of a massive LLM are more expressive than the standard text encoders (like CLIP-text) used in typical T2I models. This allows GILL to handle much longer and more complex descriptions, translating nuanced text into rich visual outputs.
Multimodal Context Matters
One of the most striking findings is that providing previous images as context significantly improves the relevance of the next generated image. GILL can "see" what has been discussed or shown before to ensure visual consistency throughout a conversation.
The "Retrieve vs. Generate" Tradeoff
The authors realized that for common objects, retrieving an existing image is often better and more realistic. However, for unique or complex scenes (e.g., "a pencil drawing of a beaver"), generation is necessary. Their learned decision module allows the model to switch between these modes dynamically.
Key Results
- Superior Context Handling: On the Visual Storytelling (VIST) dataset, GILL outperformed Stable Diffusion in image relevance (measured by CLIP Similarity) when given 5 captions and 4 images as context (0.641 vs. 0.598).
- Dialogue Success: In Visual Dialogue (VisDial) tasks, GILL’s performance improved steadily as the conversation got longer. In contrast, Stable Diffusion’s performance plateaued or actively struggled with the increasing text length.
- Efficiency: GILL achieves state-of-the-art multimodal capabilities with significantly fewer trainable parameters and less data than "from-scratch" models like Flamingo or CM3.
- Qualitative Excellence: GILL successfully follows instructions like "This but in green" or "From an aerial view," leveraging the LLM's reasoning to modify visual concepts seamlessly.
Limitations and Future Work
While GILL represents a major step forward, it shares some limitations common to its foundational models:
- Hallucinations: Like all LLMs, GILL can occasionally generate text or images that are factually incorrect or irrelevant to the prompt.
- Visual Compression: Currently, each input image is compressed into just 4 visual tokens. This might not capture enough fine-grained detail for highly complex visual tasks.
- Dataset Scale: The model was trained on CC3M (3.3M pairs), which is relatively small and noisy. Training on larger, cleaner datasets (like LAION) would likely yield even better image-text alignment.
- Inference Speed: While text generation is fast, image generation is bottlenecked by the Stable Diffusion backbone, taking about 3.5 seconds per image.
Summary updated