{"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/partcraft-crafting-creative-objects-by-parts","title":"PartCraft: Crafting Creative Objects by Parts","arxiv_id":"2407.04604","date":"2024-07-05","proceeding":null,"authors":["Kam Woh Ng","Xiatian Zhu","Yi-Zhe Song","Tao Xiang"],"abstract":"This paper propels creative control in generative visual AI by allowing users to \"select\". Departing from traditional text or sketch-based methods, we for the first time allow users to choose visual concepts by parts for their creative endeavors. The outcome is fine-grained generation that precisely captures selected visual concepts, ensuring a holistically faithful and plausible result. To achieve this, we first parse objects into parts through unsupervised feature clustering. Then, we encode parts into text tokens and introduce an entropy-based normalized attention loss that operates on them. This loss design enables our model to learn generic prior topology knowledge about object's part composition, and further generalize to novel part compositions to ensure the generation looks holistically faithful. Lastly, we employ a bottleneck encoder to project the part tokens. This not only enhances fidelity but also accelerates learning, by leveraging shared knowledge and facilitating information exchange among instances. Visual results in the paper and supplementary material showcase the compelling power of PartCraft in crafting highly customized, innovative creations, exemplified by the \"charming\" and creative birds. Code is released at https://github.com/kamwoh/partcraft.","url_abs":"https://arxiv.org/abs/2407.04604v2","url_pdf":"https://arxiv.org/pdf/2407.04604v2.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":"partcraft-crafting-creative-objects-by-parts","repo_url":"https://github.com/kamwoh/partcraft","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[],"methods":[{"method_slug":"attention","method_name":"Attention"},{"method_slug":"softmax","method_name":"Softmax"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2407.04604","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.04604"}},"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":"deterministic:regex_extraction","url":"https://github.com/kamwoh/partcraft","reach":{"status":"ok"}}],"summary":{"ran":3,"ran_fixture":1,"unverified":5},"by_repo_kind":{"official":{"samples":9,"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":9,"samples":[{"code_sha256_prefix":"2db46060722b83ce","entry":"add_tokens","repo":"kamwoh/partcraft","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/kamwoh/partcraft/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"2db46060722b83ce"}},{"code_sha256_prefix":"d98d785a4c61f7a3","entry":"create_args","repo":"kamwoh/partcraft","repo_kind":"official","path":"src/dreamcreature/pipeline.py","file_url":"https://github.com/kamwoh/partcraft/blob/HEAD/src/dreamcreature/pipeline.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"d98d785a4c61f7a3"}},{"code_sha256_prefix":"4ed40bc152475f67","entry":"text_encoder_lora_state_dict","repo":"kamwoh/partcraft","repo_kind":"official","path":"src/train_dreamcreature_sdxl.py","file_url":"https://github.com/kamwoh/partcraft/blob/HEAD/src/train_dreamcreature_sdxl.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4ed40bc152475f67"}},{"code_sha256_prefix":"1e3b3a8ae01caf34","entry":"tokenize_prompt","repo":"kamwoh/partcraft","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/kamwoh/partcraft/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1e3b3a8ae01caf34"}},{"code_sha256_prefix":"88967c01311083ce","entry":"convert_prompt","repo":"kamwoh/partcraft","repo_kind":"official","path":"src/dreamcreature/pipeline.py","file_url":"https://github.com/kamwoh/partcraft/blob/HEAD/src/dreamcreature/pipeline.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"88967c01311083ce"}},{"code_sha256_prefix":"ea2d549c78983e6e","entry":"convert_prompt_re","repo":"kamwoh/partcraft","repo_kind":"official","path":"src/dreamcreature/pipeline.py","file_url":"https://github.com/kamwoh/partcraft/blob/HEAD/src/dreamcreature/pipeline.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ea2d549c78983e6e"}},{"code_sha256_prefix":"67973fc9bcdfecae","entry":"get_processor","repo":"kamwoh/partcraft","repo_kind":"official","path":"src/utils.py","file_url":"https://github.com/kamwoh/partcraft/blob/HEAD/src/utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"67973fc9bcdfecae"}},{"code_sha256_prefix":"3e5820bc7b0d94ff","entry":"import_model_class_from_model_name_or_path","repo":"kamwoh/partcraft","repo_kind":"official","path":"src/train_dreamcreature_sdxl.py","file_url":"https://github.com/kamwoh/partcraft/blob/HEAD/src/train_dreamcreature_sdxl.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3e5820bc7b0d94ff"}},{"code_sha256_prefix":"17a42e007009df8b","entry":"parse_args","repo":"kamwoh/partcraft","repo_kind":"official","path":"src/train_dreamcreature_sdxl.py","file_url":"https://github.com/kamwoh/partcraft/blob/HEAD/src/train_dreamcreature_sdxl.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"17a42e007009df8b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}