{"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/adding-conditional-control-to-text-to-image","title":"Adding Conditional Control to Text-to-Image Diffusion Models","arxiv_id":"2302.05543","date":"2023-02-10","proceeding":"ICCV 2023 1","authors":["Lvmin Zhang","Anyi Rao","Maneesh Agrawala"],"abstract":"We present ControlNet, a neural network architecture to add spatial conditioning controls to large, pretrained text-to-image diffusion models. ControlNet locks the production-ready large diffusion models, and reuses their deep and robust encoding layers pretrained with billions of images as a strong backbone to learn a diverse set of conditional controls. The neural architecture is connected with \"zero convolutions\" (zero-initialized convolution layers) that progressively grow the parameters from zero and ensure that no harmful noise could affect the finetuning. We test various conditioning controls, eg, edges, depth, segmentation, human pose, etc, with Stable Diffusion, using single or multiple conditions, with or without prompts. We show that the training of ControlNets is robust with small (<50k) and large (>1m) datasets. Extensive results show that ControlNet may facilitate wider applications to control image diffusion models.","url_abs":"https://arxiv.org/abs/2302.05543v3","url_pdf":"https://arxiv.org/pdf/2302.05543v3.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":"adding-conditional-control-to-text-to-image","repo_url":"https://github.com/lllyasviel/controlnet","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"adding-conditional-control-to-text-to-image","repo_url":"https://github.com/DingDing33/BPS-v1-1","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"adding-conditional-control-to-text-to-image","repo_url":"https://github.com/Francis-Rings/MotionEditor","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"adding-conditional-control-to-text-to-image","repo_url":"https://github.com/KU-CVLAB/Perturbed-Attention-Guidance","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"adding-conditional-control-to-text-to-image","repo_url":"https://github.com/bytedance/x-dyna","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"adding-conditional-control-to-text-to-image","repo_url":"https://github.com/explainingai-code/ControlNet-PyTorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"adding-conditional-control-to-text-to-image","repo_url":"https://github.com/fhshen2022/prunerepaint","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"adding-conditional-control-to-text-to-image","repo_url":"https://github.com/google/style-aligned","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"adding-conditional-control-to-text-to-image","repo_url":"https://github.com/microsoft/visual-chatgpt","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"none","reach":{"status":"ok","spdx":"NOASSERTION"}},{"paper_slug":"adding-conditional-control-to-text-to-image","repo_url":"https://github.com/quereste/implicit-deepfake","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"adding-conditional-control-to-text-to-image","repo_url":"https://github.com/xuanliu2000/vgcdm","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"adding-conditional-control-to-text-to-image","repo_url":"https://github.com/modelscope/modelscope","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"layout-to-image-generation","task_name":"Layout-to-Image Generation"},{"task_slug":"text-to-image-generation-1","task_name":"Text to Image Generation"}],"methods":[{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/layout-to-image-generation-on-layoutbench-4","task":"Layout-to-Image Generation","dataset":"LayoutBench-COCO - Combination","model":"ControlNet","rank_in_archive_order":4,"of":4,"metrics":{"AP":"6.4"},"uses_additional_data":false},{"leaderboard":"/sota/layout-to-image-generation-on-layoutbench-1","task":"Layout-to-Image Generation","dataset":"LayoutBench-COCO - Number","model":"ControlNet","rank_in_archive_order":4,"of":4,"metrics":{"AP":"9.2"},"uses_additional_data":false},{"leaderboard":"/sota/layout-to-image-generation-on-layoutbench-2","task":"Layout-to-Image Generation","dataset":"LayoutBench-COCO - Position","model":"ControlNet","rank_in_archive_order":4,"of":4,"metrics":{"AP":"15.3"},"uses_additional_data":false},{"leaderboard":"/sota/layout-to-image-generation-on-layoutbench-3","task":"Layout-to-Image Generation","dataset":"LayoutBench-COCO - Size","model":"ControlNet","rank_in_archive_order":4,"of":4,"metrics":{"AP":"10.8"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2302.05543","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.05543"}},"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/explainingai-code/ControlNet-PyTorch","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/modelscope/modelscope","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/xuanliu2000/vgcdm","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/DingDing33/BPS-v1-1","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lllyasviel/controlnet","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/fhshen2022/prunerepaint","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/google/style-aligned","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/quereste/implicit-deepfake","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/KU-CVLAB/Perturbed-Attention-Guidance","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/bytedance/x-dyna","reach":{"status":"ok","spdx":"Apache-2.0"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/microsoft/visual-chatgpt","reach":{"status":"ok","spdx":"NOASSERTION"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Francis-Rings/MotionEditor","reach":{"status":"ok"}}],"summary":{"ran_fixture":1,"ran_draft_wrong":1,"unverified":2},"by_repo_kind":{"listed":{"samples":4,"ran":2,"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":"d3705ec829eb39f1","entry":"get_time_embedding","repo":"explainingai-code/ControlNet-PyTorch","repo_kind":"listed","path":"models/blocks.py","file_url":"https://github.com/explainingai-code/ControlNet-PyTorch/blob/HEAD/models/blocks.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d3705ec829eb39f1"}},{"code_sha256_prefix":"29e5e72bcd006dcd","entry":"spatial_average","repo":"explainingai-code/ControlNet-PyTorch","repo_kind":"listed","path":"models/lpips.py","file_url":"https://github.com/explainingai-code/ControlNet-PyTorch/blob/HEAD/models/lpips.py","link_basis":"harvester_set","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":"29e5e72bcd006dcd"}},{"code_sha256_prefix":"97f9c554227c4d08","entry":"get_config_value","repo":"explainingai-code/ControlNet-PyTorch","repo_kind":"listed","path":"utils/config_utils.py","file_url":"https://github.com/explainingai-code/ControlNet-PyTorch/blob/HEAD/utils/config_utils.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":"97f9c554227c4d08"}},{"code_sha256_prefix":"cc09ac4f5193b11a","entry":"make_zero_module","repo":"explainingai-code/ControlNet-PyTorch","repo_kind":"listed","path":"models/controlnet.py","file_url":"https://github.com/explainingai-code/ControlNet-PyTorch/blob/HEAD/models/controlnet.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":"cc09ac4f5193b11a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}