NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

LayoutDiffuse: Adapting Foundational Diffusion Models for Layout-to-Image Generation

Jiaxin Cheng, Xiao Liang, Xingjian Shi, Tong He, Tianjun Xiao, Mu LiarXiv 2023 · DOI

Abstract

LayoutDiffuse is a novel framework that transforms large-scale, pretrained "foundational" diffusion models into highly controllable layout-to-image generators. By injecting a lightweight neural adaptor—consisting of instance-aware layout attention and task-adaptive prompts—the researchers achieved state-of-the-art image quality and layout alignment while reducing training time from weeks to just a few hours.

Introduction

Generating photo-realistic images from semantic layouts, such as bounding boxes or segmentation masks, is a cornerstone of computer-assisted content creation. While Generative Adversarial Networks (GANs) were previously the standard, they often struggle with complex layouts, producing "mushy" or unrealistic results.

Diffusion Models (DMs) have emerged as a superior alternative due to their high synthesis quality, yet they remain difficult to control precisely. Existing methods for adding layout control often involve tokenizing layouts into "pseudo-text" or retraining models from scratch—both of which are computationally intensive and fail to fully leverage the rich priors in pretrained models like Stable Diffusion. LayoutDiffuse overcomes these hurdles by efficiently adapting foundational models for precise layout-to-image generation.

Methodology

The core of LayoutDiffuse is the "implantation" of layout control into a pretrained Latent Diffusion Model (LDM) via a lightweight adaptor. This approach avoids the need for full model retraining while preserving the model's generative capabilities.

The LayoutDiffuse architecture integrates layout and text conditions into a pretrained U-Net using task-adaptive prompts and layout-aware attention modules.

The framework relies on two primary components:

  1. Layout Attention: This module introduces "instance-awareness" by adding learnable instance prompts (class-specific embeddings) to image features within defined bounding boxes. A masking strategy ensures that tokens within an object primarily attend to each other, enhancing local context and spatial accuracy.
  2. Task-Adaptive Prompts (TAP): These tunable vectors are added to attention layers to act as a "switch," signaling the foundational model to transition from general generation to specific layout-conditioned generation.

A critical technical detail is the use of a "zero-init" trick for the residual blocks' output layers. By initializing these layers to zero, the model starts fine-tuning as an identity mapping of the original foundational model, preventing the "catastrophic forgetting" of pretrained features and ensuring a stable training start.

Experimental Setup

The researchers evaluated LayoutDiffuse across three major benchmarks to test its versatility:

  • COCO Stuff: A standard dataset for bounding box layout-to-image tasks with 112k training samples.
  • Visual Genome (VG): A complex dataset featuring up to 30 objects per image, testing the model's ability to handle high-density layouts.
  • CelebA-Mask: Used for mask-to-image generation, containing 30,000 facial images with 19 attribute classes.

Results and Discussion

LayoutDiffuse significantly outperforms both GAN-based and diffusion-based baselines across quantitative and qualitative metrics.

Qualitative comparison showing LayoutDiffuse's superior ability to generate complex scenes with high layout fidelity compared to existing methods.

Quantitative Performance

On the COCO Stuff dataset, LayoutDiffuse achieved an FID of 20.27, substantially better than the standard LDM (24.60) and various GAN baselines (typically >30). Furthermore, it reached a Classification Accuracy Score (CAS) of 50.02, indicating that generated objects are highly recognizable by external classifiers.

Efficiency and Data Requirements

One of the most striking advantages of LayoutDiffuse is its efficiency. On the CelebA-Mask dataset, it reached superior performance in just 30 epochs, whereas competing diffusion methods required between 200 and 500 epochs. It also demonstrates remarkable data efficiency, producing high-quality results on face generation tasks with as few as 128 training images—a feat nearly impossible for traditional GAN architectures.

User Preference

Human evaluations confirmed these findings, with users preferring LayoutDiffuse over 60% of the time for both overall image quality and adherence to the input layout.

Conclusion and Future Work

LayoutDiffuse demonstrates that foundational diffusion models can be precisely controlled with minimal additional parameters (increasing U-Net count by only 1.7% to 5.5%). By treating layout signals as residuals and utilizing task-adaptive prompts, the model maintains high-quality synthesis while gaining fine-grained spatial control.

Future research may address the challenge of identity preservation during image editing. Currently, moving an object within a scene can alter its specific appearance. Combining LayoutDiffuse with techniques like "textual inversion" could allow for consistent object identities across multiple edits, further enhancing its utility for creative workflows.

Summary updated

BibTeX
@misc{cheng2023layoutdiffuse,
  author = {Jiaxin Cheng and Xiao Liang and Xingjian Shi and Tong He and Tianjun Xiao and Mu Li},
  title = {{LayoutDiffuse: Adapting Foundational Diffusion Models for Layout-to-Image Generation}},
  year = {2023},
  eprint = {2302.08908},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2302.08908},
}
Figure