{"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/uni-controlnet-all-in-one-control-to-text-to-1","title":"Uni-ControlNet: All-in-One Control to Text-to-Image Diffusion Models","arxiv_id":"2305.16322","date":"2023-05-25","proceeding":"NeurIPS 2023 11","authors":["Shihao Zhao","Dongdong Chen","Yen-Chun Chen","Jianmin Bao","Shaozhe Hao","Lu Yuan","Kwan-Yee K. Wong"],"abstract":"Text-to-Image diffusion models have made tremendous progress over the past two years, enabling the generation of highly realistic images based on open-domain text descriptions. However, despite their success, text descriptions often struggle to adequately convey detailed controls, even when composed of long and complex texts. Moreover, recent studies have also shown that these models face challenges in understanding such complex texts and generating the corresponding images. Therefore, there is a growing need to enable more control modes beyond text description. In this paper, we introduce Uni-ControlNet, a unified framework that allows for the simultaneous utilization of different local controls (e.g., edge maps, depth map, segmentation masks) and global controls (e.g., CLIP image embeddings) in a flexible and composable manner within one single model. Unlike existing methods, Uni-ControlNet only requires the fine-tuning of two additional adapters upon frozen pre-trained text-to-image diffusion models, eliminating the huge cost of training from scratch. Moreover, thanks to some dedicated adapter designs, Uni-ControlNet only necessitates a constant number (i.e., 2) of adapters, regardless of the number of local or global controls used. This not only reduces the fine-tuning costs and model size, making it more suitable for real-world deployment, but also facilitate composability of different conditions. Through both quantitative and qualitative comparisons, Uni-ControlNet demonstrates its superiority over existing methods in terms of controllability, generation quality and composability. Code is available at \\url{https://github.com/ShihaoZhaoZSH/Uni-ControlNet}.","url_abs":"https://arxiv.org/abs/2305.16322v3","url_pdf":"https://arxiv.org/pdf/2305.16322v3.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":"uni-controlnet-all-in-one-control-to-text-to-1","repo_url":"https://github.com/shihaozhaozsh/uni-controlnet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"all","task_name":"All"}],"methods":[{"method_slug":"adapter","method_name":"Adapter"},{"method_slug":"clip","method_name":"CLIP"},{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2305.16322","atlas_url":"https://app.syntology.ai/?focus=2305.16322","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2305.16322"}},"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/shihaozhaozsh/uni-controlnet","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":1,"ran_violates":2,"ran":1,"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"official":{"samples":8,"ran":5,"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":8,"samples":[{"code_sha256_prefix":"f9ec7d70add02b6f","entry":"HWC3","repo":"shihaozhaozsh/uni-controlnet","repo_kind":"official","path":"annotator/util.py","file_url":"https://github.com/shihaozhaozsh/uni-controlnet/blob/HEAD/annotator/util.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"f9ec7d70add02b6f"}},{"code_sha256_prefix":"424012cb37b31172","entry":"default","repo":"shihaozhaozsh/uni-controlnet","repo_kind":"official","path":"ldm/modules/attention.py","file_url":"https://github.com/shihaozhaozsh/uni-controlnet/blob/HEAD/ldm/modules/attention.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"424012cb37b31172"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"shihaozhaozsh/uni-controlnet","repo_kind":"official","path":"ldm/modules/attention.py","file_url":"https://github.com/shihaozhaozsh/uni-controlnet/blob/HEAD/ldm/modules/attention.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"0af8635db2bb32a2","entry":"make_layers","repo":"shihaozhaozsh/uni-controlnet","repo_kind":"official","path":"annotator/openpose/model.py","file_url":"https://github.com/shihaozhaozsh/uni-controlnet/blob/HEAD/annotator/openpose/model.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":false,"mcp_get_code":{"code_sha256":"0af8635db2bb32a2"}},{"code_sha256_prefix":"9a299fe5ae09e407","entry":"uniq","repo":"shihaozhaozsh/uni-controlnet","repo_kind":"official","path":"ldm/modules/attention.py","file_url":"https://github.com/shihaozhaozsh/uni-controlnet/blob/HEAD/ldm/modules/attention.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":false,"mcp_get_code":{"code_sha256":"9a299fe5ae09e407"}},{"code_sha256_prefix":"cfc17707f35e7ec4","entry":"get_state_dict","repo":"shihaozhaozsh/uni-controlnet","repo_kind":"official","path":"models/util.py","file_url":"https://github.com/shihaozhaozsh/uni-controlnet/blob/HEAD/models/util.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":false,"mcp_get_code":{"code_sha256":"cfc17707f35e7ec4"}},{"code_sha256_prefix":"df733a879693145d","entry":"load_state_dict","repo":"shihaozhaozsh/uni-controlnet","repo_kind":"official","path":"models/util.py","file_url":"https://github.com/shihaozhaozsh/uni-controlnet/blob/HEAD/models/util.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":false,"mcp_get_code":{"code_sha256":"df733a879693145d"}},{"code_sha256_prefix":"50fd68f6989503c6","entry":"resize_image","repo":"shihaozhaozsh/uni-controlnet","repo_kind":"official","path":"annotator/util.py","file_url":"https://github.com/shihaozhaozsh/uni-controlnet/blob/HEAD/annotator/util.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":false,"mcp_get_code":{"code_sha256":"50fd68f6989503c6"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}