{"about":{"site":"https://codewithpapers.app","non_affiliation":"Code with Papers and Syntology are not affiliated with, endorsed by, or sponsored by Papers with Code, Meta, or the pwc-archive mirror.","licence":"CC BY-SA 4.0","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","attribution":"https://codewithpapers.app/attribution","modified":"archive material modified by Syntology; see the attribution page"},"url":"/paper/towards-aligned-layout-generation-via","title":"Towards Aligned Layout Generation via Diffusion Model with Aesthetic Constraints","arxiv_id":"2402.04754","date":"2024-02-07","proceeding":null,"authors":["Jian Chen","Ruiyi Zhang","Yufan Zhou","Rajiv Jain","Zhiqiang Xu","Ryan Rossi","Changyou Chen"],"abstract":"Controllable layout generation refers to the process of creating a plausible visual arrangement of elements within a graphic design (e.g., document and web designs) with constraints representing design intentions. Although recent diffusion-based models have achieved state-of-the-art FID scores, they tend to exhibit more pronounced misalignment compared to earlier transformer-based models. In this work, we propose the $\\textbf{LA}$yout $\\textbf{C}$onstraint diffusion mod$\\textbf{E}$l (LACE), a unified model to handle a broad range of layout generation tasks, such as arranging elements with specified attributes and refining or completing a coarse layout design. The model is based on continuous diffusion models. Compared with existing methods that use discrete diffusion models, continuous state-space design can enable the incorporation of differentiable aesthetic constraint functions in training. For conditional generation, we introduce conditions via masked input. Extensive experiment results show that LACE produces high-quality layouts and outperforms existing state-of-the-art baselines.","url_abs":"https://arxiv.org/abs/2402.04754v2","url_pdf":"https://arxiv.org/pdf/2402.04754v2.pdf","source":{"archive":"pwc-archive (Hugging Face), CC BY-SA 4.0","snapshot":"2025-07-28","licence_url":"https://creativecommons.org/licenses/by-sa/4.0/legalcode","row_kind":"abstracts"},"code_links":[{"paper_slug":"towards-aligned-layout-generation-via","repo_url":"https://github.com/puar-playground/lace","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"layout-design","task_name":"Layout Design"},{"task_slug":"layout-generation","task_name":"Layout Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2402.04754","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2402.04754"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-24T18:15:14+00:00","read_at_is":"when the build read Syntology's graph, not when any sample ran","claim":"Per-sample execution status on synthesized fixtures; not a correctness claim about the paper. Samples come from repositories linked to the paper, official or community; repo_kind says which.","repos":[{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/puar-playground/lace","reach":null}],"summary":{"ran":5,"ran_draft_wrong":3,"ran_honours":1,"ran_fixture":2,"ran_violates":1,"unverified":2},"by_repo_kind":{"official":{"samples":14,"ran":12,"repositories":1}},"repo_kind_vocabulary":{"official":"The archive marks this repository official for the paper","named_in_paper":"The archive records that the paper mentions this repository; it is not marked official","listed":"In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper","found_in_text":"Syntology found this repository in the paper's own text; whether it is the authors' implementation is not asserted","community":"Not in the archive's code links for this paper; a community repository Syntology harvested"},"n_pointer_only_for_licence":0,"samples":[{"code_sha256_prefix":"4d2e3dfcf5e514df","entry":"AdaInsNorm","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4d2e3dfcf5e514df"}},{"code_sha256_prefix":"d61620216d1e0e43","entry":"AdaLayerNorm","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d61620216d1e0e43"}},{"code_sha256_prefix":"33602d665cafbd1a","entry":"Block","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"33602d665cafbd1a"}},{"code_sha256_prefix":"1f73949b4bda3c10","entry":"SinusoidalPosEmb","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1f73949b4bda3c10"}},{"code_sha256_prefix":"513ddb55864178fe","entry":"_AdaNorm","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"513ddb55864178fe"}},{"code_sha256_prefix":"ce23ad2f08007447","entry":"_gelu2","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ce23ad2f08007447"}},{"code_sha256_prefix":"1f6ff9fa607114db","entry":"_get_activation_fn","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"1f6ff9fa607114db"}},{"code_sha256_prefix":"ae472f22d0f7c642","entry":"color_extend","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"ae472f22d0f7c642"}},{"code_sha256_prefix":"9ab277ea712083c7","entry":"convert_layout_to_image","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9ab277ea712083c7"}},{"code_sha256_prefix":"d95d45ece970cfa1","entry":"convert_xywh_to_ltrb","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d95d45ece970cfa1"}},{"code_sha256_prefix":"c1795e572a421c31","entry":"save_image","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c1795e572a421c31"}},{"code_sha256_prefix":"a9e89a5d98bea94d","entry":"torch_to_numpy_image","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"a9e89a5d98bea94d"}},{"code_sha256_prefix":"efd5ffb686bfb773","entry":"Diffusion","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"efd5ffb686bfb773"}},{"code_sha256_prefix":"6331fa2f5c6d4fbe","entry":"TransformerEncoder","repo":"puar-playground/lace","repo_kind":"official","path":"model_diffusion.py","file_url":"https://github.com/puar-playground/lace/blob/HEAD/model_diffusion.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6331fa2f5c6d4fbe"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}