{"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/unipc-a-unified-predictor-corrector-framework-1","title":"UniPC: A Unified Predictor-Corrector Framework for Fast Sampling of Diffusion Models","arxiv_id":"2302.04867","date":"2023-02-09","proceeding":"NeurIPS 2023 11","authors":["Wenliang Zhao","Lujia Bai","Yongming Rao","Jie zhou","Jiwen Lu"],"abstract":"Diffusion probabilistic models (DPMs) have demonstrated a very promising ability in high-resolution image synthesis. However, sampling from a pre-trained DPM is time-consuming due to the multiple evaluations of the denoising network, making it more and more important to accelerate the sampling of DPMs. Despite recent progress in designing fast samplers, existing methods still cannot generate satisfying images in many applications where fewer steps (e.g., $<$10) are favored. In this paper, we develop a unified corrector (UniC) that can be applied after any existing DPM sampler to increase the order of accuracy without extra model evaluations, and derive a unified predictor (UniP) that supports arbitrary order as a byproduct. Combining UniP and UniC, we propose a unified predictor-corrector framework called UniPC for the fast sampling of DPMs, which has a unified analytical form for any order and can significantly improve the sampling quality over previous methods, especially in extremely few steps. We evaluate our methods through extensive experiments including both unconditional and conditional sampling using pixel-space and latent-space DPMs. Our UniPC can achieve 3.87 FID on CIFAR10 (unconditional) and 7.51 FID on ImageNet 256$\\times$256 (conditional) with only 10 function evaluations. Code is available at https://github.com/wl-zhao/UniPC.","url_abs":"https://arxiv.org/abs/2302.04867v4","url_pdf":"https://arxiv.org/pdf/2302.04867v4.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":"unipc-a-unified-predictor-corrector-framework-1","repo_url":"https://github.com/wl-zhao/unipc","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":0,"framework":"jax","reach":null}],"tasks":[{"task_slug":"denoising","task_name":"Denoising"},{"task_slug":"image-generation","task_name":"Image Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2302.04867","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.04867"}},"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":"deterministic:regex_extraction","url":"https://github.com/wl-zhao/UniPC","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/wl-zhao/unipc","reach":null}],"summary":{"ran_draft_wrong":4,"ran":1,"ran_fixture":1,"unverified":2},"by_repo_kind":{"official":{"samples":8,"ran":6,"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":"39c68b6295eaca2f","entry":"interpolate_fn","repo":"wl-zhao/UniPC","repo_kind":"official","path":"example/score_sde_pytorch/uni_pc.py","file_url":"https://github.com/wl-zhao/UniPC/blob/HEAD/example/score_sde_pytorch/uni_pc.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"39c68b6295eaca2f"}},{"code_sha256_prefix":"6a35b62fbc80f70a","entry":"interpolate_fn","repo":"wl-zhao/unipc","repo_kind":"official","path":"example/score_sde_pytorch/uni_pc.py","file_url":"https://github.com/wl-zhao/unipc/blob/HEAD/example/score_sde_pytorch/uni_pc.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":2,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"6a35b62fbc80f70a"}},{"code_sha256_prefix":"bbcc7bee81a99149","entry":"UniPC","repo":"wl-zhao/unipc","repo_kind":"official","path":"uni_pc.py","file_url":"https://github.com/wl-zhao/unipc/blob/HEAD/uni_pc.py","link_basis":"first_harvest_node","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":"bbcc7bee81a99149"}},{"code_sha256_prefix":"e6110366588c5c65","entry":"expand_dims","repo":"wl-zhao/unipc","repo_kind":"official","path":"example/score_sde_pytorch/uni_pc.py","file_url":"https://github.com/wl-zhao/unipc/blob/HEAD/example/score_sde_pytorch/uni_pc.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"e6110366588c5c65"}},{"code_sha256_prefix":"64098eb6704a58dd","entry":"model_wrapper","repo":"wl-zhao/unipc","repo_kind":"official","path":"example/score_sde_pytorch/uni_pc.py","file_url":"https://github.com/wl-zhao/unipc/blob/HEAD/example/score_sde_pytorch/uni_pc.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"64098eb6704a58dd"}},{"code_sha256_prefix":"3552d38797b670d4","entry":"model_wrapper","repo":"wl-zhao/unipc","repo_kind":"official","path":"example/stable-diffusion/ldm/models/diffusion/uni_pc/uni_pc.py","file_url":"https://github.com/wl-zhao/unipc/blob/HEAD/example/stable-diffusion/ldm/models/diffusion/uni_pc/uni_pc.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"3552d38797b670d4"}},{"code_sha256_prefix":"292d0a3a80570d32","entry":"expand_dims","repo":"wl-zhao/UniPC","repo_kind":"official","path":"example/score_sde_pytorch/uni_pc.py","file_url":"https://github.com/wl-zhao/UniPC/blob/HEAD/example/score_sde_pytorch/uni_pc.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"VIOLATES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"292d0a3a80570d32"}},{"code_sha256_prefix":"812cebe843fafdb2","entry":"model_wrapper","repo":"wl-zhao/UniPC","repo_kind":"official","path":"example/score_sde_pytorch/uni_pc.py","file_url":"https://github.com/wl-zhao/UniPC/blob/HEAD/example/score_sde_pytorch/uni_pc.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"812cebe843fafdb2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}