{"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/flow-matching-in-latent-space","title":"Flow Matching in Latent Space","arxiv_id":"2307.08698","date":"2023-07-17","proceeding":null,"authors":["Quan Dao","Hao Phung","Binh Nguyen","Anh Tran"],"abstract":"Flow matching is a recent framework to train generative models that exhibits impressive empirical performance while being relatively easier to train compared with diffusion-based models. Despite its advantageous properties, prior methods still face the challenges of expensive computing and a large number of function evaluations of off-the-shelf solvers in the pixel space. Furthermore, although latent-based generative methods have shown great success in recent years, this particular model type remains underexplored in this area. In this work, we propose to apply flow matching in the latent spaces of pretrained autoencoders, which offers improved computational efficiency and scalability for high-resolution image synthesis. This enables flow-matching training on constrained computational resources while maintaining their quality and flexibility. Additionally, our work stands as a pioneering contribution in the integration of various conditions into flow matching for conditional generation tasks, including label-conditioned image generation, image inpainting, and semantic-to-image generation. Through extensive experiments, our approach demonstrates its effectiveness in both quantitative and qualitative results on various datasets, such as CelebA-HQ, FFHQ, LSUN Church & Bedroom, and ImageNet. We also provide a theoretical control of the Wasserstein-2 distance between the reconstructed latent flow distribution and true data distribution, showing it is upper-bounded by the latent flow matching objective. Our code will be available at https://github.com/VinAIResearch/LFM.git.","url_abs":"https://arxiv.org/abs/2307.08698v1","url_pdf":"https://arxiv.org/pdf/2307.08698v1.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":"flow-matching-in-latent-space","repo_url":"https://github.com/vinairesearch/lfm","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"computational-efficiency","task_name":"Computational Efficiency"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"image-inpainting","task_name":"Image Inpainting"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/image-generation-on-celeba-hq-256x256","task":"Image Generation","dataset":"CelebA-HQ 256x256","model":"LFM","rank_in_archive_order":4,"of":19,"metrics":{"FID":"5.26"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-ffhq-256-x-256","task":"Image Generation","dataset":"FFHQ 256 x 256","model":"LFM","rank_in_archive_order":23,"of":51,"metrics":{"FID":"4.55"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-imagenet-256x256","task":"Image Generation","dataset":"ImageNet 256x256","model":"LFM","rank_in_archive_order":84,"of":94,"metrics":{"FID":"4.46"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-lsun-bedroom-256-x-256","task":"Image Generation","dataset":"LSUN Bedroom 256 x 256","model":"LFM","rank_in_archive_order":12,"of":32,"metrics":{"FID":"4.92"},"uses_additional_data":false},{"leaderboard":"/sota/image-generation-on-lsun-churches-256-x-256","task":"Image Generation","dataset":"LSUN Churches 256 x 256","model":"LFM","rank_in_archive_order":20,"of":27,"metrics":{"FID":"5.54"},"uses_additional_data":false}],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2307.08698","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2307.08698"}},"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/vinairesearch/lfm","reach":null}],"summary":{"ran_honours":1},"by_repo_kind":{"official":{"samples":1,"ran":1,"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":"108b501edfe900a5","entry":"get_weight","repo":"vinairesearch/lfm","repo_kind":"official","path":"train_flow_latent.py","file_url":"https://github.com/vinairesearch/lfm/blob/HEAD/train_flow_latent.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"AGPL-3.0","inline_ok":false,"mcp_get_code":{"code_sha256":"108b501edfe900a5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}