PlanGen: Towards Unified Layout Planning and Image Generation in Auto-Regressive Vision Language Models

Runze He, Bo Cheng, Yuhang Ma, Qingxiang Jia, Shanyuan Liu, Ao Ma, Xiaoyu Wu, Liebucha Wu, Dawei Leng, Yuhui Yin

Abstract

In this paper, we propose a unified layout planning and image generation model, PlanGen, which can pre-plan spatial layout conditions before generating images. Unlike previous diffusion-based models that treat layout planning and layout-to-image as two separate models, PlanGen jointly models the two tasks into one autoregressive transformer using only next-token prediction. PlanGen integrates layout conditions into the model as context without requiring specialized encoding of local captions and bounding box coordinates, which provides significant advantages over the previous embed-and-pool operations on layout conditions, particularly when dealing with complex layouts. Unified prompting allows PlanGen to perform multitasking training related to layout, including layout planning, layout-to-image generation, image layout understanding, etc. In addition, PlanGen can be seamlessly expanded to layout-guided image manipulation thanks to the well-designed modeling, with teacher-forcing content manipulation policy and negative layout guidance. Extensive experiments verify the effectiveness of our PlanGen in multiple layout-related tasks, showing its great potential.

TL;DR

PlanGen is a unified autoregressive vision-language model that integrates layout planning and image generation into a single framework. Unlike traditional two-stage diffusion pipelines, PlanGen uses next-token prediction to "think" about spatial arrangements before "drawing" pixels, enabling superior multitasking across layout planning, image generation, understanding, and manipulation.

What Problem Does This Paper Address?

Controllable image generation—where a user specifies exactly where objects should be—has traditionally been dominated by diffusion models. However, these systems face two major hurdles:

  1. Model Fragmentation: They typically require two separate models—one to plan the layout (where things go) and another to generate the image based on that layout.
  2. Information Bottlenecks: Most existing methods use "embed-and-pool" operations to compress local object descriptions into fixed-size vectors. This often loses the fine-grained details needed for complex scenes.

The authors of PlanGen argue that by treating layout coordinates and local captions as just another sequence of text tokens, they can leverage the long-context capabilities of Transformers to create a more cohesive and detailed "spatial-to-visual" mapping.

Methods

PlanGen is built on the Janus-Pro architecture, an autoregressive transformer. The core innovation lies in its Unified Prompting strategy. Instead of specialized encoders, the model treats everything as a sequence:

  • Input: A global text prompt.
  • Planning Phase: The model generates tokens between <grounding> tags, including local descriptions (wrapped in <ref>) and bounding box coordinates (standardized 0-1000 integers wrapped in <box>).
  • Generation Phase: Once the plan is complete, an <image_start> token triggers the generation of discrete visual tokens.
Overview of PlanGen's multitasking capabilities, including layout-to-image generation, image layout understanding, and layout-guided image manipulation.

For Image Manipulation (e.g., deleting an object), the authors introduce Teacher-Forcing Content Manipulation. The model simply "copies" the original image tokens for areas that shouldn't change and only performs autoregressive sampling for the tokens within the edited bounding box. They also propose Negative Layout Guidance, which uses classifier-free guidance on the layout tokens themselves to help the model "forget" deleted objects and avoid visual artifacts.

Key Insights and Ideas

  • Layout as Language: The most significant "aha moment" is that specialized coordinate encoders are unnecessary. Treating [x1, y1, x2, y2] as plain text allows the Transformer to attend to the spatial relationships just as it would to grammar or logic in a sentence.
  • The Power of Context: Because it's a single model, the "understanding" task (predicting a layout from an image) directly reinforces the "generation" task. The model develops a deeper internal representation of how a "blue scarf" looks when it's located at specific coordinates.
  • Autoregressive Editing: While diffusion models struggle to keep unedited parts of an image perfectly stable without complex "inversion" processes, PlanGen achieves this naturally through token replacement. If a token isn't in the "edit zone," the model is forced to use the original token, ensuring pixel-perfect stability for the background.

Key Results

  • Layout Planning: PlanGen outperformed powerful LLMs like Llama-3.1-8B and Qwen2.5-7B in generating reasonable layouts from complex captions, achieving higher PickScore (21.42) and CLIPScore (31.93).
  • Image Quality: In layout-to-image tasks, PlanGen achieved a state-of-the-art FID of 13.91 on the LayoutSAM-Eval benchmark, significantly lower (better) than diffusion-based competitors like GLIGEN (21.92) and CreatiLayout (19.10).
  • Object Removal: With Negative Layout Guidance, the model reached an 86.5% success rate in removing objects, far surpassing Instruct-Pix2Pix (40.0%).

Limitations and Future Work

The authors acknowledge a few key hurdles:

  • Resolution: Due to compute constraints, the model is currently limited to 384x384 resolution.
  • Anatomy Issues: Like many early-stage generative models, PlanGen sometimes struggles with human body proportions and "hallucinating" extra objects when multiple identical items are requested.
  • Future Directions: The team plans to explore more advanced autoregressive paradigms, such as Masked Generative Transformers (MaskGIT) or Next-Scale Prediction (VAR), to improve generation speed and high-resolution details.

Summary updated

Abstract

In this paper, we propose a unified layout planning and image generation model, PlanGen, which can pre-plan spatial layout conditions before generating images. Unlike previous diffusion-based models that treat layout planning and layout-to-image as two separate models, PlanGen jointly models the two tasks into one autoregressive transformer using only next-token prediction. PlanGen integrates layout conditions into the model as context without requiring specialized encoding of local captions and bounding box coordinates, which provides significant advantages over the previous embed-and-pool operations on layout conditions, particularly when dealing with complex layouts. Unified prompting allows PlanGen to perform multitasking training related to layout, including layout planning, layout-to-image generation, image layout understanding, etc. In addition, PlanGen can be seamlessly expanded to layout-guided image manipulation thanks to the well-designed modeling, with teacher-forcing content manipulation policy and negative layout guidance. Extensive experiments verify the effectiveness of our PlanGen in multiple layoutrelated tasks, showing its great potential. Code is available at: https://360cvgroup.github.io/PlanGen.
BibTeX
@inproceedings{he2025plangen,
  author = {Runze He and Bo Cheng and Yuhang Ma and Qingxiang Jia and Shanyuan Liu and Ao Ma and Xiaoyu Wu and Liebucha Wu and Dawei Leng and Yuhui Yin},
  title = {{PlanGen: Towards Unified Layout Planning and Image Generation in Auto-Regressive Vision Language Models}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure