Diagnostic Benchmark and Iterative Inpainting for Layout-Guided Image Generation
Jaemin Cho, Linjie Li, Zhengyuan Yang, Zhe Gan, Lijuan Wang, Mohit Bansal
TL;DR
This work targets robust, layout-guided image generation under out-of-distribution configurations. It introduces LayoutBench, a CLEVR-based benchmark that isolates four spatial-control skills (number, position, size, shape) and evaluates layout accuracy via DETR-based AP, revealing strong ID–OOD gaps in existing methods. To address this, it proposes IterInpaint, an iterative inpainting approach built on Stable Diffusion that updates foreground and background region-by-region, achieving substantially better OOD generalization with competitive ID performance. Comprehensive experiments, ablations, and zero-shot evaluations on LayoutBench-COCO demonstrate that IterInpaint consistently outperforms state-of-the-art baselines across all four skills, underscoring the value of iterative, region-centric generation for reliable spatial control. The work provides a practical framework for diagnosing and improving spatial controllability in diffusion-based image generation.
Abstract
Spatial control is a core capability in controllable image generation. Advancements in layout-guided image generation have shown promising results on in-distribution (ID) datasets with similar spatial configurations. However, it is unclear how these models perform when facing out-of-distribution (OOD) samples with arbitrary, unseen layouts. In this paper, we propose LayoutBench, a diagnostic benchmark for layout-guided image generation that examines four categories of spatial control skills: number, position, size, and shape. We benchmark two recent representative layout-guided image generation methods and observe that the good ID layout control may not generalize well to arbitrary layouts in the wild (e.g., objects at the boundary). Next, we propose IterInpaint, a new baseline that generates foreground and background regions step-by-step via inpainting, demonstrating stronger generalizability than existing models on OOD layouts in LayoutBench. We perform quantitative and qualitative evaluation and fine-grained analysis on the four LayoutBench skills to pinpoint the weaknesses of existing models. We show comprehensive ablation studies on IterInpaint, including training task ratio, crop&paste vs. repaint, and generation order. Lastly, we evaluate the zero-shot performance of different pretrained layout-guided image generation models on LayoutBench-COCO, our new benchmark for OOD layouts with real objects, where our IterInpaint consistently outperforms SOTA baselines in all four splits. Project website: https://layoutbench.github.io
