{"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/learning-to-discretize-denoising-diffusion","title":"Learning to Discretize Denoising Diffusion ODEs","arxiv_id":"2405.15506","date":"2024-05-24","proceeding":null,"authors":["Vinh Tong","Hoang Trung-Dung","Anji Liu","Guy Van Den Broeck","Mathias Niepert"],"abstract":"Diffusion Probabilistic Models (DPMs) are generative models showing competitive performance in various domains, including image synthesis and 3D point cloud generation. Sampling from pre-trained DPMs involves multiple neural function evaluations (NFEs) to transform Gaussian noise samples into images, resulting in higher computational costs compared to single-step generative models such as GANs or VAEs. Therefore, reducing the number of NFEs while preserving generation quality is crucial. To address this, we propose LD3, a lightweight framework designed to learn the optimal time discretization for sampling. LD3 can be combined with various samplers and consistently improves generation quality without having to retrain resource-intensive neural networks. We demonstrate analytically and empirically that LD3 improves sampling efficiency with much less computational overhead. We evaluate our method with extensive experiments on 7 pre-trained models, covering unconditional and conditional sampling in both pixel-space and latent-space DPMs. We achieve FIDs of 2.38 (10 NFE), and 2.27 (10 NFE) on unconditional CIFAR10 and AFHQv2 in 5-10 minutes of training. LD3 offers an efficient approach to sampling from pre-trained diffusion models. Code is available at https://github.com/vinhsuhi/LD3.","url_abs":"https://arxiv.org/abs/2405.15506v4","url_pdf":"https://arxiv.org/pdf/2405.15506v4.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":"learning-to-discretize-denoising-diffusion","repo_url":"https://github.com/vinhsuhi/ld3","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"point-cloud-generation","task_name":"Point Cloud Generation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2405.15506","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.15506"}},"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/vinhsuhi/ld3","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":5,"ran":9,"unverified":1},"by_repo_kind":{"official":{"samples":15,"ran":14,"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":15,"samples":[{"code_sha256_prefix":"6a35b62fbc80f70a","entry":"interpolate_fn","repo":"vinhsuhi/ld3","repo_kind":"official","path":"noise_schedulers.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/noise_schedulers.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6a35b62fbc80f70a"}},{"code_sha256_prefix":"3c04e2c9c1fea67f","entry":"calculate_fid_from_inception_stats","repo":"vinhsuhi/ld3","repo_kind":"official","path":"compute_fid.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/compute_fid.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3c04e2c9c1fea67f"}},{"code_sha256_prefix":"9de72366ed400b32","entry":"compute_distance_between_two","repo":"vinhsuhi/ld3","repo_kind":"official","path":"utils.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9de72366ed400b32"}},{"code_sha256_prefix":"f1578daf6d04b0fa","entry":"compute_distance_between_two_L1","repo":"vinhsuhi/ld3","repo_kind":"official","path":"utils.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/utils.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f1578daf6d04b0fa"}},{"code_sha256_prefix":"6fc0c975e29ab730","entry":"custom_collate_fn","repo":"vinhsuhi/ld3","repo_kind":"official","path":"trainer.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"6fc0c975e29ab730"}},{"code_sha256_prefix":"be5bbe03e0053737","entry":"discretize_model_wrapper","repo":"vinhsuhi/ld3","repo_kind":"official","path":"trainer.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/trainer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"be5bbe03e0053737"}},{"code_sha256_prefix":"e6110366588c5c65","entry":"expand_dims","repo":"vinhsuhi/ld3","repo_kind":"official","path":"models/latent_diff.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/models/latent_diff.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e6110366588c5c65"}},{"code_sha256_prefix":"674eca7b9e1b6439","entry":"format_time","repo":"vinhsuhi/ld3","repo_kind":"official","path":"dnnlib/util.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/dnnlib/util.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"674eca7b9e1b6439"}},{"code_sha256_prefix":"32af001972a0699f","entry":"format_time_brief","repo":"vinhsuhi/ld3","repo_kind":"official","path":"dnnlib/util.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/dnnlib/util.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":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"32af001972a0699f"}},{"code_sha256_prefix":"f7c7e8e70f4a652b","entry":"get_data_inverse_scaler","repo":"vinhsuhi/ld3","repo_kind":"official","path":"gen_data.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/gen_data.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f7c7e8e70f4a652b"}},{"code_sha256_prefix":"221b2d116fdf1032","entry":"get_obj_from_str","repo":"vinhsuhi/ld3","repo_kind":"official","path":"models/latent_diff.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/models/latent_diff.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"221b2d116fdf1032"}},{"code_sha256_prefix":"4db328029379ff51","entry":"load_data_from_dir","repo":"vinhsuhi/ld3","repo_kind":"official","path":"dataset.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/dataset.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4db328029379ff51"}},{"code_sha256_prefix":"f7adf140ec2262ee","entry":"model_wrapper","repo":"vinhsuhi/ld3","repo_kind":"official","path":"models/edm_uncond.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/models/edm_uncond.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f7adf140ec2262ee"}},{"code_sha256_prefix":"4a51afc5d36d9348","entry":"model_wrapper","repo":"vinhsuhi/ld3","repo_kind":"official","path":"models/latent_diff.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/models/latent_diff.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"4a51afc5d36d9348"}},{"code_sha256_prefix":"9d31d2c4cd16bb2d","entry":"ask_yes_no","repo":"vinhsuhi/ld3","repo_kind":"official","path":"dnnlib/util.py","file_url":"https://github.com/vinhsuhi/ld3/blob/HEAD/dnnlib/util.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"9d31d2c4cd16bb2d"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}