{"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/patch-diffusion-faster-and-more-data-1","title":"Patch Diffusion: Faster and More Data-Efficient Training of Diffusion Models","arxiv_id":"2304.12526","date":"2023-04-25","proceeding":"NeurIPS 2023 11","authors":["Zhendong Wang","Yifan Jiang","Huangjie Zheng","Peihao Wang","Pengcheng He","Zhangyang Wang","Weizhu Chen","Mingyuan Zhou"],"abstract":"Diffusion models are powerful, but they require a lot of time and data to train. We propose Patch Diffusion, a generic patch-wise training framework, to significantly reduce the training time costs while improving data efficiency, which thus helps democratize diffusion model training to broader users. At the core of our innovations is a new conditional score function at the patch level, where the patch location in the original image is included as additional coordinate channels, while the patch size is randomized and diversified throughout training to encode the cross-region dependency at multiple scales. Sampling with our method is as easy as in the original diffusion model. Through Patch Diffusion, we could achieve $\\mathbf{\\ge 2\\times}$ faster training, while maintaining comparable or better generation quality. Patch Diffusion meanwhile improves the performance of diffusion models trained on relatively small datasets, $e.g.$, as few as 5,000 images to train from scratch. We achieve outstanding FID scores in line with state-of-the-art benchmarks: 1.77 on CelebA-64$\\times$64, 1.93 on AFHQv2-Wild-64$\\times$64, and 2.72 on ImageNet-256$\\times$256. We share our code and pre-trained models at https://github.com/Zhendong-Wang/Patch-Diffusion.","url_abs":"https://arxiv.org/abs/2304.12526v2","url_pdf":"https://arxiv.org/pdf/2304.12526v2.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":"patch-diffusion-faster-and-more-data-1","repo_url":"https://github.com/Zhendong-Wang/Patch-Diffusion","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2304.12526","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2304.12526"}},"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/Zhendong-Wang/Patch-Diffusion","reach":null}],"summary":{"ran_honours":1,"ran_draft_wrong":1,"ran_fixture":1,"unverified":1},"by_repo_kind":{"official":{"samples":3,"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":1,"samples":[{"code_sha256_prefix":"45e941764344e7f3","entry":"calculate_fid_from_inception_stats","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"45e941764344e7f3"}},{"code_sha256_prefix":"4c4d0471c70f18f2","entry":"random_patch","repo":"Zhendong-Wang/Patch-Diffusion","repo_kind":"official","path":"generate.py","file_url":"https://github.com/Zhendong-Wang/Patch-Diffusion/blob/HEAD/generate.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4c4d0471c70f18f2"}},{"code_sha256_prefix":"a2973b6d2127039d","entry":"sample_with_cfg","repo":"Zhendong-Wang/Patch-Diffusion","repo_kind":"official","path":"generate.py","file_url":"https://github.com/Zhendong-Wang/Patch-Diffusion/blob/HEAD/generate.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a2973b6d2127039d"}},{"code_sha256_prefix":"9f88bec60fdc8cf7","entry":"edm_sampler","repo":"Zhendong-Wang/Patch-Diffusion","repo_kind":"official","path":"generate.py","file_url":"https://github.com/Zhendong-Wang/Patch-Diffusion/blob/HEAD/generate.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"9f88bec60fdc8cf7"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}