Build-A-Scene: Interactive 3D Layout Control for Diffusion-Based Image Generation

Abdelrahman Eldesokey, Peter Wonka

Text-to-image (T2I) diffusion models have revolutionized image generation, but they remain notoriously bad at spatial reasoning. Prompting a model for a complex scene—such as "a cat on the left of a dog, with a vase on a table in the background"—often results in merged concepts, forgotten objects, or incorrect placements.

To address this, researchers have introduced layout control, allowing users to provide 2D bounding boxes or segmentation maps alongside text prompts. However, existing layout controls suffer from major limitations:

  1. They are strictly 2D: Users cannot control depth, camera angles, or 3D perspective.
  2. They are static: The entire layout must be provided upfront.
  3. They lack consistency: If a user generates an image and then decides to shift a bounding box slightly to the left, the model will typically generate a completely different object and alter the entire background.

Build-A-Scene tackles these issues by introducing a training-free, interactive 3D-aware generation pipeline. It allows users to iteratively build and adjust scenes object-by-object in 3D space without destroying previously generated elements.

The multi-stage generation process of Build-A-Scene, allowing users to iteratively add, move, and replace objects in 3D space.

The Build-A-Scene Approach

Build-A-Scene is a plug-and-play method built on top of Stable Diffusion v1.5 and LooseControl (an existing depth-conditioned model). Instead of attempting to generate a complex image all at once, it treats generation as a multi-stage process:

  • Stage 0 (The Environment): The user defines an empty 3D room or environment along with camera parameters. The model generates the foundational background.
  • Stage $i > 0$ (Adding Objects via Dynamic Self-Attention): The user adds a 3D box and a prompt (e.g., "white sofa"). To seamlessly insert the new object without altering the existing room, the authors introduce Dynamic Self-Attention (DSA). During diffusion, DSA forces the model to query attention keys from the previous stage for the background, while allowing it to use the current stage's keys inside the new 3D box. This perfectly preserves the background while rendering the new object with accurate lighting and shadows.
  • Consistent 3D Translation: If the user wants to move an existing object, the model automatically segments it using cross-attention maps and the Segment Anything Model (SAM). It then uses ray-traced 3D Cartesian coordinates to warp the segmented object to its new location, ensuring it scales correctly according to 3D perspective. Finally, DDIM inversion and latent blending seamlessly stitch the moved object back into the diffusion process.

Key Insights

  • Iterative generation solves the "crowded prompt" problem: By breaking scene generation down into stages, the model avoids the confusion of rendering multiple complex objects simultaneously. This drastically improves the success rate of generating all requested items.
  • Attention manipulation beats manual inpainting: Traditionally, adding an object to an existing image requires drawing a manual inpainting mask. DSA achieves this automatically by routing the self-attention mechanism, resulting in superior blending—such as accurate reflections and shadows—without user friction.
  • True 3D translation requires perspective awareness: Simply copying and pasting a 2D patch of pixels to simulate moving an object in 3D results in flat, incorrectly sized elements. By warping the object using 3D Cartesian coordinate maps before re-injecting it into the diffusion model, Build-A-Scene ensures objects obey the laws of perspective as they move closer to or further from the camera.

Evaluation and Results

Because Build-A-Scene is a training-free method, no new training datasets were required. For evaluation, the authors created a novel benchmark for 3D layout control, selecting 16 objects from the MS COCO dataset, defining their realistic 3D aspect ratios, and pairing them with 10 diverse scene prompts. They generated 100 random layouts, testing each with 5 different random seeds.

The authors compared Build-A-Scene against LooseControl (a 3D-aware baseline) and Layout-Guidance (a state-of-the-art 2D layout method):

  • Object Accuracy: Build-A-Scene successfully generated requested objects 53.5% of the time, outperforming LooseControl by more than 2x (24.3%) and beating the 2D Layout-Guidance method (48.2%).
  • Layout Adherence: It achieved a mean Intersection over Union (mIoU) of 0.772, vastly outperforming Layout-Guidance (0.425) and LooseControl (0.633). Objects reliably stayed inside their assigned 3D boxes.
  • Object Consistency: When moving or scaling objects, Build-A-Scene preserved the original object's identity with an SSIM of 0.463 and PSNR of 29.3, crushing Layout-Guidance (0.189 SSIM), which tends to completely redraw the object.
  • Speed: Despite the multi-stage approach, generation takes only ~2 seconds per stage. A 5-object scene takes about 10 seconds, which is highly competitive with single-pass 2D layout methods.

Limitations and Future Work

While highly effective, Build-A-Scene has a few limitations. The model is sensitive to the dimensions of the user-provided 3D box; if a box is drawn much wider than the requested object, the model might hallucinate duplicate instances to fill the space. Additionally, if a large object intersects the scene boundaries, the out-of-bounds portions can become distorted. Finally, the 3D translation feature relies heavily on SAM successfully segmenting the object; if automatic segmentation fails, the object cannot be cleanly moved.

In future work, the authors suggest exploring automated layout generation using Large Language Models (LLMs) to eliminate the need for manual box placement. They also plan to support in-plane rotations while preserving object identity, further expanding the creative control offered by the system.

Summary updated

BibTeX
@inproceedings{eldesokey2025build,
  author = {Abdelrahman Eldesokey and Peter Wonka},
  title = {{Build-A-Scene: Interactive 3D Layout Control for Diffusion-Based Image Generation}},
  booktitle = {International Conference on Learning Representations},
  year = {2025},
  url = {https://openreview.net/forum?id=gg6dPtdC1C},
}
Figure