{"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/cones-2-customizable-image-synthesis-with","title":"Cones 2: Customizable Image Synthesis with Multiple Subjects","arxiv_id":"2305.19327","date":"2023-05-30","proceeding":null,"authors":["Zhiheng Liu","Yifei Zhang","Yujun Shen","Kecheng Zheng","Kai Zhu","Ruili Feng","Yu Liu","Deli Zhao","Jingren Zhou","Yang Cao"],"abstract":"Synthesizing images with user-specified subjects has received growing attention due to its practical applications. Despite the recent success in single subject customization, existing algorithms suffer from high training cost and low success rate along with increased number of subjects. Towards controllable image synthesis with multiple subjects as the constraints, this work studies how to efficiently represent a particular subject as well as how to appropriately compose different subjects. We find that the text embedding regarding the subject token already serves as a simple yet effective representation that supports arbitrary combinations without any model tuning. Through learning a residual on top of the base embedding, we manage to robustly shift the raw subject to the customized subject given various text conditions. We then propose to employ layout, a very abstract and easy-to-obtain prior, as the spatial guidance for subject arrangement. By rectifying the activations in the cross-attention map, the layout appoints and separates the location of different subjects in the image, significantly alleviating the interference across them. Both qualitative and quantitative experimental results demonstrate our superiority over state-of-the-art alternatives under a variety of settings for multi-subject customization.","url_abs":"https://arxiv.org/abs/2305.19327v1","url_pdf":"https://arxiv.org/pdf/2305.19327v1.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":"cones-2-customizable-image-synthesis-with","repo_url":"https://github.com/ali-vilab/cones-v2","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"base","method_name":"BASE"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2305.19327","atlas_url":"https://app.syntology.ai/?focus=2305.19327","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.19327"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/ali-vilab/cones-v2","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":1,"ran":3,"unverified":2},"by_repo_kind":{"listed":{"samples":6,"ran":4,"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":"abb46f51790a26a8","entry":"collate_fn","repo":"ali-vilab/cones-v2","repo_kind":"listed","path":"train_cones2.py","file_url":"https://github.com/ali-vilab/cones-v2/blob/HEAD/train_cones2.py","link_basis":"harvester_set","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":"abb46f51790a26a8"}},{"code_sha256_prefix":"2745abf40636bfd8","entry":"downsampling","repo":"ali-vilab/cones-v2","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/ali-vilab/cones-v2/blob/HEAD/utils.py","link_basis":"harvester_set","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":"2745abf40636bfd8"}},{"code_sha256_prefix":"7c1982eae7c0e2d9","entry":"image_grid","repo":"ali-vilab/cones-v2","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/ali-vilab/cones-v2/blob/HEAD/utils.py","link_basis":"harvester_set","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":"7c1982eae7c0e2d9"}},{"code_sha256_prefix":"9d31edafee1de047","entry":"latents_to_images","repo":"ali-vilab/cones-v2","repo_kind":"listed","path":"utils.py","file_url":"https://github.com/ali-vilab/cones-v2/blob/HEAD/utils.py","link_basis":"harvester_set","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":"9d31edafee1de047"}},{"code_sha256_prefix":"0eb3e94e8635150e","entry":"import_model_class_from_model_name_or_path","repo":"ali-vilab/cones-v2","repo_kind":"listed","path":"train_cones2.py","file_url":"https://github.com/ali-vilab/cones-v2/blob/HEAD/train_cones2.py","link_basis":"harvester_set","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":"0eb3e94e8635150e"}},{"code_sha256_prefix":"bd6d532381e6253d","entry":"parse_args","repo":"ali-vilab/cones-v2","repo_kind":"listed","path":"train_cones2.py","file_url":"https://github.com/ali-vilab/cones-v2/blob/HEAD/train_cones2.py","link_basis":"harvester_set","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":"bd6d532381e6253d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}