{"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/diffusion-models-without-classifier-free-1","title":"Diffusion Models without Classifier-free Guidance","arxiv_id":"2502.12154","date":"2025-02-17","proceeding":null,"authors":["Zhicong Tang","Jianmin Bao","Dong Chen","Baining Guo"],"abstract":"This paper presents Model-guidance (MG), a novel objective for training diffusion model that addresses and removes of the commonly used Classifier-free guidance (CFG). Our innovative approach transcends the standard modeling of solely data distribution to incorporating the posterior probability of conditions. The proposed technique originates from the idea of CFG and is easy yet effective, making it a plug-and-play module for existing models. Our method significantly accelerates the training process, doubles the inference speed, and achieve exceptional quality that parallel and even surpass concurrent diffusion models with CFG. Extensive experiments demonstrate the effectiveness, efficiency, scalability on different models and datasets. Finally, we establish state-of-the-art performance on ImageNet 256 benchmarks with an FID of 1.34. Our code is available at https://github.com/tzco/Diffusion-wo-CFG.","url_abs":"https://arxiv.org/abs/2502.12154v1","url_pdf":"https://arxiv.org/pdf/2502.12154v1.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":"diffusion-models-without-classifier-free-1","repo_url":"https://github.com/tzco/Diffusion-wo-CFG","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}},{"paper_slug":"diffusion-models-without-classifier-free-1","repo_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"conditional-image-generation","task_name":"Conditional Image Generation"},{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-generation-on-imagenet-256x256","task":"Image Generation","dataset":"ImageNet 256x256","model":"SiT-XL/2 + MG","rank_in_archive_order":12,"of":94,"metrics":{"FID":"1.34"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2502.12154","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2502.12154"}},"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/tzco/Diffusion-wo-CFG","reach":{"status":"ok"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lucidrains/classifier-free-guidance-pytorch","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":4,"ran_honours":2,"ran_violates":2,"unverified":4},"by_repo_kind":{"listed":{"samples":12,"ran":8,"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":"98f385d847636a3e","entry":"basic_clean","repo":"lucidrains/classifier-free-guidance-pytorch","repo_kind":"listed","path":"classifier_free_guidance_pytorch/tokenizer.py","file_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch/blob/HEAD/classifier_free_guidance_pytorch/tokenizer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"98f385d847636a3e"}},{"code_sha256_prefix":"f70dcb896366697c","entry":"cast_tuple","repo":"lucidrains/classifier-free-guidance-pytorch","repo_kind":"listed","path":"classifier_free_guidance_pytorch/classifier_free_guidance_pytorch.py","file_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch/blob/HEAD/classifier_free_guidance_pytorch/classifier_free_guidance_pytorch.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f70dcb896366697c"}},{"code_sha256_prefix":"60fff7c3c400d7ff","entry":"default","repo":"lucidrains/classifier-free-guidance-pytorch","repo_kind":"listed","path":"classifier_free_guidance_pytorch/open_clip.py","file_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch/blob/HEAD/classifier_free_guidance_pytorch/open_clip.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"60fff7c3c400d7ff"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"lucidrains/classifier-free-guidance-pytorch","repo_kind":"listed","path":"classifier_free_guidance_pytorch/attend.py","file_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch/blob/HEAD/classifier_free_guidance_pytorch/attend.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"f3232418205f7cbd","entry":"identity","repo":"lucidrains/classifier-free-guidance-pytorch","repo_kind":"listed","path":"classifier_free_guidance_pytorch/typing.py","file_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch/blob/HEAD/classifier_free_guidance_pytorch/typing.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f3232418205f7cbd"}},{"code_sha256_prefix":"3eb58dae620046d3","entry":"l2norm","repo":"lucidrains/classifier-free-guidance-pytorch","repo_kind":"listed","path":"classifier_free_guidance_pytorch/open_clip.py","file_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch/blob/HEAD/classifier_free_guidance_pytorch/open_clip.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":"3eb58dae620046d3"}},{"code_sha256_prefix":"52e10a7d6b0fa036","entry":"once","repo":"lucidrains/classifier-free-guidance-pytorch","repo_kind":"listed","path":"classifier_free_guidance_pytorch/attend.py","file_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch/blob/HEAD/classifier_free_guidance_pytorch/attend.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"52e10a7d6b0fa036"}},{"code_sha256_prefix":"9542161e9640b858","entry":"whitespace_clean","repo":"lucidrains/classifier-free-guidance-pytorch","repo_kind":"listed","path":"classifier_free_guidance_pytorch/tokenizer.py","file_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch/blob/HEAD/classifier_free_guidance_pytorch/tokenizer.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9542161e9640b858"}},{"code_sha256_prefix":"360032808d3d3b2a","entry":"always","repo":"lucidrains/classifier-free-guidance-pytorch","repo_kind":"listed","path":"classifier_free_guidance_pytorch/typing.py","file_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch/blob/HEAD/classifier_free_guidance_pytorch/typing.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":"360032808d3d3b2a"}},{"code_sha256_prefix":"b50994ad24f6d583","entry":"get_pairs","repo":"lucidrains/classifier-free-guidance-pytorch","repo_kind":"listed","path":"classifier_free_guidance_pytorch/tokenizer.py","file_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch/blob/HEAD/classifier_free_guidance_pytorch/tokenizer.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":"b50994ad24f6d583"}},{"code_sha256_prefix":"cbdf413e88112af9","entry":"get_tokenizer","repo":"lucidrains/classifier-free-guidance-pytorch","repo_kind":"listed","path":"classifier_free_guidance_pytorch/t5.py","file_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch/blob/HEAD/classifier_free_guidance_pytorch/t5.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":"cbdf413e88112af9"}},{"code_sha256_prefix":"5d2c2d7980cd0f5c","entry":"is_empty","repo":"lucidrains/classifier-free-guidance-pytorch","repo_kind":"listed","path":"classifier_free_guidance_pytorch/classifier_free_guidance_pytorch.py","file_url":"https://github.com/lucidrains/classifier-free-guidance-pytorch/blob/HEAD/classifier_free_guidance_pytorch/classifier_free_guidance_pytorch.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":"5d2c2d7980cd0f5c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}