Skip to main content
QUICK REVIEW

[Paper Review] BoxDiff: Text-to-Image Synthesis with Training-Free Box-Constrained Diffusion

Jinheng Xie, Yuexiang Li|arXiv (Cornell University)|Jul 20, 2023
Generative Adversarial Networks and Image SynthesisComputer Science3 citations
TL;DR

BoxDiff proposes a training-free method for text-to-image synthesis that controls object location and scale using simple spatial constraints—such as bounding boxes or scribbles—by integrating Inner-Box, Outer-Box, and Corner Constraints directly into the denoising process of pre-trained diffusion models. The approach achieves high-fidelity, diverse image generation without additional training or paired layout data, significantly outperforming fully-supervised baselines in YOLO score and T2I-Sim.

ABSTRACT

Recent text-to-image diffusion models have demonstrated an astonishing capacity to generate high-quality images. However, researchers mainly studied the way of synthesizing images with only text prompts. While some works have explored using other modalities as conditions, considerable paired data, e.g., box/mask-image pairs, and fine-tuning time are required for nurturing models. As such paired data is time-consuming and labor-intensive to acquire and restricted to a closed set, this potentially becomes the bottleneck for applications in an open world. This paper focuses on the simplest form of user-provided conditions, e.g., box or scribble. To mitigate the aforementioned problem, we propose a training-free method to control objects and contexts in the synthesized images adhering to the given spatial conditions. Specifically, three spatial constraints, i.e., Inner-Box, Outer-Box, and Corner Constraints, are designed and seamlessly integrated into the denoising step of diffusion models, requiring no additional training and massive annotated layout data. Extensive experimental results demonstrate that the proposed constraints can control what and where to present in the images while retaining the ability of Diffusion models to synthesize with high fidelity and diverse concept coverage. The code is publicly available at https://github.com/showlab/BoxDiff.

Motivation & Objective

  • To enable fine-grained spatial control in text-to-image diffusion models without requiring additional training or large-scale annotated layout data.
  • To address the bottleneck of data efficiency in layout-to-image synthesis by replacing supervised data dependency with minimal user-provided spatial conditions.
  • To maintain the strong zero-shot generalization and high-fidelity generation capabilities of pre-trained diffusion models like Stable Diffusion.
  • To provide a plug-and-play solution for improving existing conditional generation models through spatial constraints.

Proposed method

  • Integrates three spatial constraints—Inner-Box, Outer-Box, and Corner Constraints—into the cross-attention maps of the denoising U-Net at each denoising step.
  • Applies constraints only to cross-attention features at a 16×16 spatial resolution to balance precision and computational cost.
  • Uses representative sampling to mitigate over-constraining effects that could degrade image quality during denoising.
  • Leverages existing cross-attention mechanisms in Stable Diffusion to guide the denoising process toward user-specified spatial conditions.
  • Operates entirely in inference time, requiring no model fine-tuning or retraining.
  • Treats user-provided boxes or scribbles as implicit spatial guidance to steer the generation process without modifying the model weights.

Experimental results

Research questions

  • RQ1Can spatial control in text-to-image generation be achieved without fine-tuning or large-scale paired layout data?
  • RQ2How can simple user-provided conditions like bounding boxes be effectively used to guide object placement and scale in diffusion-based image synthesis?
  • RQ3To what extent can spatial constraints be integrated into the denoising process without degrading image quality or semantic fidelity?
  • RQ4Can the proposed method generalize to novel object categories beyond closed-set training distributions?
  • RQ5How does the method compare quantitatively to fully-supervised layout-to-image models in terms of object detection and semantic alignment metrics?

Key findings

  • BoxDiff achieves a YOLO score of 22.3 when used with Stable Diffusion, significantly outperforming fully-supervised methods like LostGAN (5.3), LAMA (10.2), and TwFA (10.6).
  • The method improves the T2I-Sim score to 0.3513, indicating superior semantic alignment between generated images and text prompts.
  • When integrated with GLIGEN, BoxDiff boosts the YOLO score from 40.2 to 46.2 and T2I-Sim from 0.3511 to 0.3513, demonstrating its effectiveness as a plug-and-play component.
  • The method successfully controls object scale: castles grow from small to large as the conditional box expands, while other content remains fixed.
  • The approach enables multi-level variations, such as changing both content (e.g., grasslands, sunflowers, marsh) and scale simultaneously within the same conditional box.
  • Visual results confirm that object locations shift precisely according to the provided box, even when text prompts contain positional cues like 'in the middle of'.

Read this paper

Open the full text in the Nubint reader and ask about any passage as you read.

Read this paper on Nubint

This review was generated by AI from the original paper. Please check the paper before citing it.