Abstract
Generating visual layouts is an essential ingredient of graphic design. The ability to condition layout generation on a partial subset of component attributes is critical to real-world applications that involve user interaction. Recently, diffusion models have demonstrated high-quality generative performances in various domains. However, it is unclear how to apply diffusion models to the natural representation of layouts which consists of a mix of discrete (class) and continuous (location, size) attributes. To address the conditioning layout generation problem, we introduce DLT, a joint discrete-continuous diffusion model. DLT is a transformer-based model which has a flexible conditioning mechanism that allows for conditioning on any given subset of all the layout component classes, locations, and sizes. Our method outperforms state-of-the-art generative models on various layout generation datasets with respect to different metrics and conditioning settings. Additionally, we validate the effectiveness of our proposed conditioning mechanism and the joint continuous-diffusion process.
Introduction
Creating a visual layout—whether for a mobile app, a magazine, or a scientific paper—is a complex balancing act. Designers must manage discrete elements (e.g., "Title", "Button", "Figure") alongside continuous geometric properties such as position and size. Existing generative models often struggle with this "mixed-mode" data. Some approaches discretize coordinates into "buckets," which sacrifices precision. Others fail to provide flexible conditioning, making it difficult for users to fix certain elements (like a title) while generating the rest of the layout.
Methodology: Joint Discrete-Continuous Diffusion
The core innovation of DLT is the treatment of graphic design as a joint discrete-continuous diffusion process. Unlike models that handle classes and coordinates separately, DLT applies diffusion to both simultaneously.
For continuous attributes (position and size), the model adds Gaussian noise during the forward process. For discrete attributes (component class), it utilizes a "Mask" absorbing state, effectively "blurring" the category until it becomes an unknown mask. The model is then trained to reverse both processes in tandem, reconstructing the original layout from noise.
Architecture and Conditioning
DLT utilizes a Transformer-encoder backbone to process these mixed inputs. A key feature is the explicit conditioning mechanism. During training, the model is presented with layouts where a random subset of attributes is "fixed."
A binary condition embedding layer informs the Transformer which parts are user-provided constraints and which parts require denoising. This explicit training for constraints allows DLT to avoid the ambiguity and misalignment common in models that only introduce constraints during inference.
Experiments and Results
The researchers evaluated DLT on three diverse benchmarks: PubLayNet (scientific documents), RICO (mobile UI), and Magazine (stylistic layouts). DLT consistently outperformed state-of-the-art baselines like LayoutTransformer and BLT across multiple metrics:
- Realism (FID): On the PubLayNet "Category + Size" task, DLT achieved an FID of 11.4, significantly better than BLT's 14.2.
- Alignment & Overlap: DLT produced layouts with fewer overlapping elements and superior internal alignment, markers of professional-grade design.
- DocSim: In terms of similarity to original conditioned layouts, DLT showed marked improvement (e.g., 24.3 vs 20.7 for BLT on PubLayNet).
- Efficiency: DLT is approximately 1.65x faster than baselines on the Magazine dataset, maintaining competitive inference speeds despite its iterative nature.
Conclusion and Future Work
DLT demonstrates that joint diffusion on continuous and discrete attributes provides a powerful framework for high-resolution, well-aligned layout generation. However, a current limitation is "Content Blindness"—the model lacks awareness of the actual visual or textual content within the layout boxes. Future work could involve incorporating content embeddings (e.g., via CLIP) to enable more context-aware design decisions, where the specific image or text length directly influences the generated layout.
Summary updated