{"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/how-to-build-a-consistency-model-learning","title":"How to build a consistency model: Learning flow maps via self-distillation","arxiv_id":"2505.18825","date":"2025-05-24","proceeding":null,"authors":["Nicholas M. Boffi","Michael S. Albergo","Eric Vanden-Eijnden"],"abstract":"Building on the framework proposed in Boffi et al. (2024), we present a systematic approach for learning flow maps associated with flow and diffusion models. Flow map-based models, commonly known as consistency models, encompass recent efforts to improve the efficiency of generative models based on solutions to differential equations. By exploiting a relationship between the velocity field underlying a continuous-time flow and the instantaneous rate of change of the flow map, we show how to convert existing distillation schemes into direct training algorithms via self-distillation, eliminating the need for pre-trained models. We empirically evaluate several instantiations of our framework, finding that high-dimensional tasks like image synthesis benefit from objective functions that avoid temporal and spatial derivatives of the flow map, while lower-dimensional tasks can benefit from objectives incorporating higher-order derivatives to capture sharp features.","url_abs":"https://arxiv.org/abs/2505.18825v1","url_pdf":"https://arxiv.org/pdf/2505.18825v1.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":[],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2505.18825","atlas_url":"https://app.syntology.ai/?focus=2505.18825","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.18825"}},"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":"deterministic:regex_extraction","url":"https://github.com/nmboffi/flow-maps","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran":10,"unverified":4},"by_repo_kind":{"found_in_text":{"samples":14,"ran":10,"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":"f7df6e2cd7e357d7","entry":"compute_grad_norm","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/logging.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/logging.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":true,"mcp_get_code":{"code_sha256":"f7df6e2cd7e357d7"}},{"code_sha256_prefix":"866b3e86c2a4c44c","entry":"mean_reduce","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/losses.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/losses.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":true,"mcp_get_code":{"code_sha256":"866b3e86c2a4c44c"}},{"code_sha256_prefix":"4951bd0c52c2029e","entry":"normalize_image_tf","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/datasets.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/datasets.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":true,"mcp_get_code":{"code_sha256":"4951bd0c52c2029e"}},{"code_sha256_prefix":"188974e9cabf04d1","entry":"process_celeba_for_fid","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/fid_utils.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/fid_utils.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":true,"mcp_get_code":{"code_sha256":"188974e9cabf04d1"}},{"code_sha256_prefix":"a8a8e7bbadf4d9c5","entry":"process_image_for_fid","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/fid_utils.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/fid_utils.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":true,"mcp_get_code":{"code_sha256":"a8a8e7bbadf4d9c5"}},{"code_sha256_prefix":"111bbbd1ceb1f4de","entry":"project_to_sphere","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/edm2_net.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/edm2_net.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":true,"mcp_get_code":{"code_sha256":"111bbbd1ceb1f4de"}},{"code_sha256_prefix":"307ccd5877a33274","entry":"resize_and_incept","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/fid_utils.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/fid_utils.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":true,"mcp_get_code":{"code_sha256":"307ccd5877a33274"}},{"code_sha256_prefix":"e72bec44e12d556e","entry":"safe_resize","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/loss_args.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/loss_args.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":true,"mcp_get_code":{"code_sha256":"e72bec44e12d556e"}},{"code_sha256_prefix":"7c644c21d70f5141","entry":"sample","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/flow_map.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/flow_map.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":true,"mcp_get_code":{"code_sha256":"7c644c21d70f5141"}},{"code_sha256_prefix":"018cc04bd14d78e5","entry":"unnormalize_image","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/datasets.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/datasets.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"018cc04bd14d78e5"}},{"code_sha256_prefix":"cf9d4ec736ab7238","entry":"batch_sample","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/flow_map.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/flow_map.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":"cf9d4ec736ab7238"}},{"code_sha256_prefix":"39844e19617e535f","entry":"pmap_batch_sample","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/flow_map.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/flow_map.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":"39844e19617e535f"}},{"code_sha256_prefix":"46817614f0ce1e03","entry":"pmap_project_to_sphere","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/edm2_net.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/edm2_net.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":"46817614f0ce1e03"}},{"code_sha256_prefix":"61c289ac786da2cb","entry":"preprocess_celeb_a","repo":"nmboffi/flow-maps","repo_kind":"found_in_text","path":"py/common/datasets.py","file_url":"https://github.com/nmboffi/flow-maps/blob/HEAD/py/common/datasets.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":"61c289ac786da2cb"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}