{"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/mean-flows-for-one-step-generative-modeling","title":"Mean Flows for One-step Generative Modeling","arxiv_id":"2505.13447","date":"2025-05-19","proceeding":null,"authors":["Zhengyang Geng","Mingyang Deng","Xingjian Bai","J. Zico Kolter","Kaiming He"],"abstract":"We propose a principled and effective framework for one-step generative modeling. We introduce the notion of average velocity to characterize flow fields, in contrast to instantaneous velocity modeled by Flow Matching methods. A well-defined identity between average and instantaneous velocities is derived and used to guide neural network training. Our method, termed the MeanFlow model, is self-contained and requires no pre-training, distillation, or curriculum learning. MeanFlow demonstrates strong empirical performance: it achieves an FID of 3.43 with a single function evaluation (1-NFE) on ImageNet 256x256 trained from scratch, significantly outperforming previous state-of-the-art one-step diffusion/flow models. Our study substantially narrows the gap between one-step diffusion/flow models and their multi-step predecessors, and we hope it will motivate future research to revisit the foundations of these powerful models.","url_abs":"https://arxiv.org/abs/2505.13447v1","url_pdf":"https://arxiv.org/pdf/2505.13447v1.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":"mean-flows-for-one-step-generative-modeling","repo_url":"https://github.com/Gsunshine/meanflow","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":null},{"paper_slug":"mean-flows-for-one-step-generative-modeling","repo_url":"https://github.com/ali-vilab/FACM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}},{"paper_slug":"mean-flows-for-one-step-generative-modeling","repo_url":"https://github.com/andypinxinliu/GestureLSM","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2505.13447","atlas_url":"https://app.syntology.ai/?focus=2505.13447","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2505.13447"}},"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/andypinxinliu/GestureLSM","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Gsunshine/meanflow","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ali-vilab/FACM","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":8,"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"listed":{"samples":12,"ran":9,"repositories":2}},"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":"f3c44f47824302dc","entry":"exponential_pdf","repo":"andypinxinliu/GestureLSM","repo_kind":"listed","path":"models/LSM.py","file_url":"https://github.com/andypinxinliu/GestureLSM/blob/HEAD/models/LSM.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":"f3c44f47824302dc"}},{"code_sha256_prefix":"1b12f7f17b973eee","entry":"find_attention_modules","repo":"andypinxinliu/GestureLSM","repo_kind":"listed","path":"models/MeanFlow.py","file_url":"https://github.com/andypinxinliu/GestureLSM/blob/HEAD/models/MeanFlow.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":"1b12f7f17b973eee"}},{"code_sha256_prefix":"4f043bf1bec12652","entry":"get_loss_func","repo":"andypinxinliu/GestureLSM","repo_kind":"listed","path":"optimizers/loss_factory.py","file_url":"https://github.com/andypinxinliu/GestureLSM/blob/HEAD/optimizers/loss_factory.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":"4f043bf1bec12652"}},{"code_sha256_prefix":"2057a8b48b0d5cf3","entry":"get_module_config","repo":"andypinxinliu/GestureLSM","repo_kind":"listed","path":"models/config.py","file_url":"https://github.com/andypinxinliu/GestureLSM/blob/HEAD/models/config.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":"2057a8b48b0d5cf3"}},{"code_sha256_prefix":"6f951d437f9f5c5f","entry":"get_obj_from_str","repo":"andypinxinliu/GestureLSM","repo_kind":"listed","path":"models/config.py","file_url":"https://github.com/andypinxinliu/GestureLSM/blob/HEAD/models/config.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":"6f951d437f9f5c5f"}},{"code_sha256_prefix":"dd96bc6c07c85dae","entry":"mean_flat","repo":"andypinxinliu/GestureLSM","repo_kind":"listed","path":"models/MeanFlow.py","file_url":"https://github.com/andypinxinliu/GestureLSM/blob/HEAD/models/MeanFlow.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"dd96bc6c07c85dae"}},{"code_sha256_prefix":"1ba44760ad133e99","entry":"sample_beta_distribution","repo":"andypinxinliu/GestureLSM","repo_kind":"listed","path":"models/LSM.py","file_url":"https://github.com/andypinxinliu/GestureLSM/blob/HEAD/models/LSM.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":"1ba44760ad133e99"}},{"code_sha256_prefix":"f9b3244bb6e382cd","entry":"sample_t","repo":"andypinxinliu/GestureLSM","repo_kind":"listed","path":"models/LSM.py","file_url":"https://github.com/andypinxinliu/GestureLSM/blob/HEAD/models/LSM.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":"f9b3244bb6e382cd"}},{"code_sha256_prefix":"b3786bbc856619f6","entry":"update_lr_warm_up","repo":"andypinxinliu/GestureLSM","repo_kind":"listed","path":"rvq_beatx_train.py","file_url":"https://github.com/andypinxinliu/GestureLSM/blob/HEAD/rvq_beatx_train.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":"b3786bbc856619f6"}},{"code_sha256_prefix":"15cb9cb0de4aadad","entry":"generate","repo":"Gsunshine/meanflow","repo_kind":"listed","path":"meanflow.py","file_url":"https://github.com/Gsunshine/meanflow/blob/HEAD/meanflow.py","link_basis":"first_harvest_node","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":"15cb9cb0de4aadad"}},{"code_sha256_prefix":"16e41676220876a4","entry":"instantiate_from_config","repo":"andypinxinliu/GestureLSM","repo_kind":"listed","path":"models/config.py","file_url":"https://github.com/andypinxinliu/GestureLSM/blob/HEAD/models/config.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":"16e41676220876a4"}},{"code_sha256_prefix":"24486901843b5f5c","entry":"reshape_coefs","repo":"andypinxinliu/GestureLSM","repo_kind":"listed","path":"models/MeanFlow.py","file_url":"https://github.com/andypinxinliu/GestureLSM/blob/HEAD/models/MeanFlow.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":"24486901843b5f5c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}