L-MAGIC: Language Model Assisted Generation of Images with Coherence

Zhipeng Cai, Matthias Mueller, Reiner Birkl, Diana Wofk, Shao-Yen Tseng, JunDa Cheng, Gabriela Ben-Melech Stan, Vasudev Lal, Michael Paulitsch

Here is a blog-style summary of the paper L-MAGIC: Language Model Assisted Generation of Images with Coherence.

TL;DR

L-MAGIC is a novel, zero-shot framework that leverages the global reasoning capabilities of Large Language Models (LLMs) to guide diffusion models in generating coherent 360° panoramic scenes from a single perspective image. By using LLMs to orchestrate a global layout plan and enforce object uniqueness across multiple views, it eliminates the common problem of duplicated objects (like multiple beds in a single bedroom) found in existing multi-view inpainting methods.

What Problem Does This Paper Address?

Generating a complete 360° panoramic scene from a single perspective image is a major challenge in computer vision, with applications ranging from virtual reality to architectural design. Because large-scale, diverse datasets of 360° panoramas are scarce, standard approaches break the panorama down into multiple perspective views and use pre-trained diffusion models to inpaint the missing regions iteratively.

However, these models lack a global understanding of the scene layout. If you ask a standard diffusion model to extend a view of a bedroom, it relies on its internal dataset bias—where "bedroom" almost always implies "contains a bed." As a result, independent multi-view inpainting often generates duplicate salient objects across the different camera angles, leading to an incoherent final panorama (e.g., a room with three distinct beds).

Methods

L-MAGIC solves this layout incoherence without any model fine-tuning by introducing an LLM-guided, iterative warping-and-inpainting pipeline.

The L-MAGIC pipeline architecture, showing how conditional diffusion, warping, and LLM guidance combine to create coherent 360° scenes.

The process unfolds in three main stages:

  1. Language Model Guidance: First, a vision-language model (BLIP-2) generates a detailed description of the initial input image. This description is passed to ChatGPT, which acts as a global director. ChatGPT "imagines" a coherent 360° layout split across six distinct rotated views, explicitly ensuring that unique foreground objects are not repeated. It also strips out object-level details to create a generic scene-level style prompt (e.g., transforming "a bedroom with a wooden bed" into just "a bedroom") to maintain stylistic consistency across views.
  2. Iterative Warping and Inpainting: The system projects the current view onto a unit sphere and warps it to the next camera pose. To fill the unviewed regions, it constructs an inpainting prompt combining the scene-level style and the specific view description. Crucially, L-MAGIC uses LLM-generated negative prompts (e.g., "any type of bed") to forbid the diffusion model from duplicating unique objects.
  3. Visual Quality Assurance Loop: To counter the stubborn dataset biases of diffusion models, L-MAGIC implements a validation loop. A VQA model checks the newly inpainted view; if a forbidden duplicate object is detected, the framework rejects the image and re-runs the inpainting step.
  4. Resolution Enhancement: To prevent the blurriness caused by repeated geometric interpolations during warping, L-MAGIC applies a super-resolution step (scaling up to $2048 \times 2048$) before warping back to a lower resolution for the next step. Final views are blended using a distance-weighted average to ensure seamless transitions.

Datasets

To evaluate zero-shot, in-the-wild performance, the authors curated test sets that did not overlap with the training data of any baseline models:

  • Image-to-Panorama: 20 indoor and 20 outdoor images sourced from the Tanks and Temples and RealEstate10K datasets.
  • Text-to-Panorama: 20 random, diverse scene descriptions generated by ChatGPT (10 indoor, 10 outdoor), such as "Minimalist Scandinavian bedroom" and "Underwater coral reef scene."

Key Insights and Ideas

  • LLMs as Spatial Directors: The paper demonstrates that text-based LLMs possess sufficient world knowledge to act as zero-shot spatial layout planners, effectively bridging the gap between local image generation and global scene coherence.
  • The Inception Score Bias: The authors discovered a fascinating limitation in automated metrics: standard quantitative metrics like the Inception Score (IS) can favor lower-quality, incoherent images. If a model generates chaotic, adversarial patches that look like diverse objects, the IS increases, even if the scene makes no sense to a human. This underscores the indispensable value of human evaluation in generative scene tasks.
  • Negative Prompting as a Constraint Mechanism: Instead of modifying the weights of diffusion models to enforce constraints, simply instructing the model what not to generate via LLM-orchestrated negative prompts is remarkably effective.

Key Results

L-MAGIC significantly outperformed state-of-the-art baselines (including Stable Diffusion v2, Text2room, and MVDiffusion) in both quantitative and qualitative benchmarks.

Quantitative comparison showing human preference scores and algorithmic Inception Scores against various baselines.
  • Human Evaluation: In side-by-side user studies evaluating scene structure and rendering quality, human voters preferred L-MAGIC over competing methods by a margin of >70%.
  • Algorithmic Evaluation: L-MAGIC achieved the highest Inception Score (IS) among coherent methods (e.g., 2.66 vs. Text2room's 2.11 in image-to-panorama).
  • Downstream Versatility: Because L-MAGIC outputs a clean set of perspective images rather than a single warped equirectangular image, it easily integrates with off-the-shelf monocular depth estimation models (like Metric3D) to generate high-quality 3D point clouds and fluid camera fly-through videos.
Qualitative results comparing L-MAGIC against baselines for text-to-panorama generation.

Limitations and Future Work

While L-MAGIC successfully orchestrates macro-level scene layouts, it currently relies entirely on text prompts to enforce consistency. This text-only bottleneck means it cannot guarantee fine-grained, pixel-level structural coherence between adjacent views. The authors note that developing a more granular, geometry-aware layout encoding mechanism that maintains this zero-shot flexibility is a promising direction for future research.

Summary updated

Abstract

In the current era of generative AI breakthroughs, generating panoramic scenes from a single input image remains a key challenge. Most existing methods use diffusion-based iterative or simultaneous multi-view inpainting. However, the lack of global scene layout priors leads to subpar outputs with duplicated objects (e.g., multiple beds in a bedroom) or requires time-consuming human text inputs for each view. We propose L-MAGIC, a novel method leveraging large language models for guidance while diffusing multiple coherent views of 360 degree panoramic scenes. L-MAGIC harnesses pre-trained diffusion and language models without fine-tuning, ensuring zero-shot performance. The output quality is further enhanced by super-resolution and multi-view fusion techniques. Extensive experiments demonstrate that the resulting panoramic scenes feature better scene layouts and perspective view rendering quality compared to related works, with >70% preference in human evaluations. Combined with conditional diffusion models, L-MAGIC can accept various input modalities, including but not limited to text, depth maps, sketches, and colored scripts. Applying depth estimation further enables 3D point cloud generation and dynamic scene exploration with fluid camera motion. Code is available at https://github.com/IntelLabs/MMPano. The video presentation is available at https://youtu.be/XDMNEzH4-Ec?list=PLG9Zyvu7iBa0-a7ccNLO8LjcVRAoMn57s.
BibTeX
@inproceedings{cai2024l,
  author = {Zhipeng Cai and Matthias Mueller and Reiner Birkl and Diana Wofk and Shao-Yen Tseng and JunDa Cheng and Gabriela Ben-Melech Stan and Vasudev Lal and Michael Paulitsch},
  title = {{L-MAGIC: Language Model Assisted Generation of Images with Coherence}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2024},
  url = {https://openreview.net/forum?id=ZRj4aXAE5d},
}
Figure