{"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/layoutgpt-compositional-visual-planning-and","title":"LayoutGPT: Compositional Visual Planning and Generation with Large Language Models","arxiv_id":"2305.15393","date":"2023-05-24","proceeding":"NeurIPS 2023 11","authors":["Weixi Feng","Wanrong Zhu","Tsu-Jui Fu","Varun Jampani","Arjun Akula","Xuehai He","Sugato Basu","Xin Eric Wang","William Yang Wang"],"abstract":"Attaining a high degree of user controllability in visual generation often requires intricate, fine-grained inputs like layouts. However, such inputs impose a substantial burden on users when compared to simple text inputs. To address the issue, we study how Large Language Models (LLMs) can serve as visual planners by generating layouts from text conditions, and thus collaborate with visual generative models. We propose LayoutGPT, a method to compose in-context visual demonstrations in style sheet language to enhance the visual planning skills of LLMs. LayoutGPT can generate plausible layouts in multiple domains, ranging from 2D images to 3D indoor scenes. LayoutGPT also shows superior performance in converting challenging language concepts like numerical and spatial relations to layout arrangements for faithful text-to-image generation. When combined with a downstream image generation model, LayoutGPT outperforms text-to-image models/systems by 20-40% and achieves comparable performance as human users in designing visual layouts for numerical and spatial correctness. Lastly, LayoutGPT achieves comparable performance to supervised methods in 3D indoor scene synthesis, demonstrating its effectiveness and potential in multiple visual domains.","url_abs":"https://arxiv.org/abs/2305.15393v2","url_pdf":"https://arxiv.org/pdf/2305.15393v2.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":"layoutgpt-compositional-visual-planning-and","repo_url":"https://github.com/weixi-feng/layoutgpt","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"indoor-scene-synthesis","task_name":"Indoor Scene Synthesis"},{"task_slug":"text-to-image-generation-1","task_name":"Text to Image Generation"},{"task_slug":"text-to-image-generation","task_name":"Text-to-Image Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2305.15393","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.15393"}},"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/weixi-feng/layoutgpt","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":1,"ran_draft_wrong":1,"ran":1,"unverified":16},"by_repo_kind":{"official":{"samples":19,"ran":3,"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":"b3e1f7172e4955ae","entry":"alpha_generator","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"gligen/gligen_inference.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/gligen/gligen_inference.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"b3e1f7172e4955ae"}},{"code_sha256_prefix":"e49923c3510ee0bc","entry":"project","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"gligen/gligen_inference.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/gligen/gligen_inference.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e49923c3510ee0bc"}},{"code_sha256_prefix":"3f0a1105ef251d78","entry":"reduce_sum","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"gligen/distributed.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/gligen/distributed.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3f0a1105ef251d78"}},{"code_sha256_prefix":"ed03ba54397adbe4","entry":"all_gather","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"gligen/distributed.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/gligen/distributed.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":"ed03ba54397adbe4"}},{"code_sha256_prefix":"0bf7957edd5ec68b","entry":"bb_relative_position","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"utils.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/utils.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":"0bf7957edd5ec68b"}},{"code_sha256_prefix":"79259da2a67a2e86","entry":"create_exemplar_prompt","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"run_layoutgpt_2d.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/run_layoutgpt_2d.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":"79259da2a67a2e86"}},{"code_sha256_prefix":"578380ce31db339e","entry":"eval_image","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"eval_models/GLIP/eval_spatial.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/eval_models/GLIP/eval_spatial.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":"578380ce31db339e"}},{"code_sha256_prefix":"3855ecf0a0c564a2","entry":"eval_spatial_relation","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"utils.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/utils.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":"3855ecf0a0c564a2"}},{"code_sha256_prefix":"09501d1255cf3995","entry":"list_grid","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"eval_models/GLIP/eval_counting.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/eval_models/GLIP/eval_counting.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":"09501d1255cf3995"}},{"code_sha256_prefix":"6920fbdb489405ed","entry":"load","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"eval_models/GLIP/eval_counting.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/eval_models/GLIP/eval_counting.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":"6920fbdb489405ed"}},{"code_sha256_prefix":"c0b66d7eb2f18c94","entry":"load_features","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"run_layoutgpt_2d.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/run_layoutgpt_2d.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":"c0b66d7eb2f18c94"}},{"code_sha256_prefix":"3af0b42145b07f7f","entry":"load_features","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"run_layoutgpt_3d.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/run_layoutgpt_3d.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":"3af0b42145b07f7f"}},{"code_sha256_prefix":"a0d7fd544bf9313b","entry":"load_json","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"utils.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/utils.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":"a0d7fd544bf9313b"}},{"code_sha256_prefix":"5785462f2abe4ca4","entry":"load_room_boxes","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"run_layoutgpt_3d.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/run_layoutgpt_3d.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":"5785462f2abe4ca4"}},{"code_sha256_prefix":"d7f3fdf20a8bcf2e","entry":"load_room_boxes","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"eval_scene_layout.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/eval_scene_layout.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":"d7f3fdf20a8bcf2e"}},{"code_sha256_prefix":"32f48bb8094ef7c8","entry":"load_set","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"run_layoutgpt_3d.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/run_layoutgpt_3d.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":"32f48bb8094ef7c8"}},{"code_sha256_prefix":"45aff54102d0117c","entry":"parse_3D_layout","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"parse_llm_output.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/parse_llm_output.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":"45aff54102d0117c"}},{"code_sha256_prefix":"5144ad456049f8ce","entry":"reduce_loss_dict","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"gligen/distributed.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/gligen/distributed.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":"5144ad456049f8ce"}},{"code_sha256_prefix":"dae708ee6dab2577","entry":"roty","repo":"weixi-feng/layoutgpt","repo_kind":"official","path":"eval_scene_layout.py","file_url":"https://github.com/weixi-feng/layoutgpt/blob/HEAD/eval_scene_layout.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":"dae708ee6dab2577"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}