{"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/dc-solver-improving-predictor-corrector","title":"DC-Solver: Improving Predictor-Corrector Diffusion Sampler via Dynamic Compensation","arxiv_id":"2409.03755","date":"2024-09-05","proceeding":null,"authors":["Wenliang Zhao","Haolin Wang","Jie zhou","Jiwen Lu"],"abstract":"Diffusion probabilistic models (DPMs) have shown remarkable performance in visual synthesis but are computationally expensive due to the need for multiple evaluations during the sampling. Recent predictor-corrector diffusion samplers have significantly reduced the required number of function evaluations (NFE), but inherently suffer from a misalignment issue caused by the extra corrector step, especially with a large classifier-free guidance scale (CFG). In this paper, we introduce a new fast DPM sampler called DC-Solver, which leverages dynamic compensation (DC) to mitigate the misalignment of the predictor-corrector samplers. The dynamic compensation is controlled by compensation ratios that are adaptive to the sampling steps and can be optimized on only 10 datapoints by pushing the sampling trajectory toward a ground truth trajectory. We further propose a cascade polynomial regression (CPR) which can instantly predict the compensation ratios on unseen sampling configurations. Additionally, we find that the proposed dynamic compensation can also serve as a plug-and-play module to boost the performance of predictor-only samplers. Extensive experiments on both unconditional sampling and conditional sampling demonstrate that our DC-Solver can consistently improve the sampling quality over previous methods on different DPMs with a wide range of resolutions up to 1024$\\times$1024. Notably, we achieve 10.38 FID (NFE=5) on unconditional FFHQ and 0.394 MSE (NFE=5, CFG=7.5) on Stable-Diffusion-2.1. Code is available at https://github.com/wl-zhao/DC-Solver","url_abs":"https://arxiv.org/abs/2409.03755v1","url_pdf":"https://arxiv.org/pdf/2409.03755v1.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":"dc-solver-improving-predictor-corrector","repo_url":"https://github.com/wl-zhao/dc-solver","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok"}}],"tasks":[],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2409.03755","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2409.03755"}},"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/wl-zhao/dc-solver","reach":{"status":"ok"}},{"provenance":"deterministic:regex_extraction","url":"https://github.com/wl-zhao/DC-Solver","reach":{"status":"ok"}}],"summary":{"ran_draft_wrong":2,"ran_fixture":1,"ran":1,"unverified":2},"by_repo_kind":{"official":{"samples":6,"ran":4,"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":6,"samples":[{"code_sha256_prefix":"6a35b62fbc80f70a","entry":"interpolate_fn","repo":"wl-zhao/dc-solver","repo_kind":"official","path":"stable-diffusion/ldm/models/diffusion/dc_solver/dc_solver.py","file_url":"https://github.com/wl-zhao/dc-solver/blob/HEAD/stable-diffusion/ldm/models/diffusion/dc_solver/dc_solver.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":"e6110366588c5c65","entry":"expand_dims","repo":"wl-zhao/dc-solver","repo_kind":"official","path":"stable-diffusion/ldm/models/diffusion/dc_solver/dc_solver.py","file_url":"https://github.com/wl-zhao/dc-solver/blob/HEAD/stable-diffusion/ldm/models/diffusion/dc_solver/dc_solver.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":"3552d38797b670d4","entry":"model_wrapper","repo":"wl-zhao/dc-solver","repo_kind":"official","path":"stable-diffusion/ldm/models/diffusion/dc_solver/dc_solver.py","file_url":"https://github.com/wl-zhao/dc-solver/blob/HEAD/stable-diffusion/ldm/models/diffusion/dc_solver/dc_solver.py","link_basis":"plan_row","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"3552d38797b670d4"}},{"code_sha256_prefix":"c38c4cd486f7a766","entry":"model_wrapper","repo":"wl-zhao/dc-solver","repo_kind":"official","path":"stable-diffusion/ldm/models/diffusion/dpm_solver/dpm_solver.py","file_url":"https://github.com/wl-zhao/dc-solver/blob/HEAD/stable-diffusion/ldm/models/diffusion/dpm_solver/dpm_solver.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":"c38c4cd486f7a766"}},{"code_sha256_prefix":"4fffa779d1ef3577","entry":"DCSolver","repo":"wl-zhao/DC-Solver","repo_kind":"official","path":"stable-diffusion/ldm/models/diffusion/dc_solver/dc_solver.py","file_url":"https://github.com/wl-zhao/DC-Solver/blob/HEAD/stable-diffusion/ldm/models/diffusion/dc_solver/dc_solver.py","link_basis":"first_harvest_node","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":"4fffa779d1ef3577"}},{"code_sha256_prefix":"4533e43e06a12dc5","entry":"download_models","repo":"wl-zhao/dc-solver","repo_kind":"official","path":"stable-diffusion/notebook_helpers.py","file_url":"https://github.com/wl-zhao/dc-solver/blob/HEAD/stable-diffusion/notebook_helpers.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":"4533e43e06a12dc5"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}