{"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/postedit-posterior-sampling-for-efficient","title":"PostEdit: Posterior Sampling for Efficient Zero-Shot Image Editing","arxiv_id":"2410.04844","date":"2024-10-07","proceeding":null,"authors":["Feng Tian","Yixuan Li","Yichao Yan","Shanyan Guan","Yanhao Ge","Xiaokang Yang"],"abstract":"In the field of image editing, three core challenges persist: controllability, background preservation, and efficiency. Inversion-based methods rely on time-consuming optimization to preserve the features of the initial images, which results in low efficiency due to the requirement for extensive network inference. Conversely, inversion-free methods lack theoretical support for background similarity, as they circumvent the issue of maintaining initial features to achieve efficiency. As a consequence, none of these methods can achieve both high efficiency and background consistency. To tackle the challenges and the aforementioned disadvantages, we introduce PostEdit, a method that incorporates a posterior scheme to govern the diffusion sampling process. Specifically, a corresponding measurement term related to both the initial features and Langevin dynamics is introduced to optimize the estimated image generated by the given target prompt. Extensive experimental results indicate that the proposed PostEdit achieves state-of-the-art editing performance while accurately preserving unedited regions. Furthermore, the method is both inversion- and training-free, necessitating approximately 1.5 seconds and 18 GB of GPU memory to generate high-quality results.","url_abs":"https://arxiv.org/abs/2410.04844v2","url_pdf":"https://arxiv.org/pdf/2410.04844v2.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":"postedit-posterior-sampling-for-efficient","repo_url":"https://github.com/TFNTF/PostEdit","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":null,"task_name":"GPU"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2410.04844","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2410.04844"}},"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/TFNTF/PostEdit","reach":{"status":"ok"}}],"summary":{"ran":6,"unverified":6},"by_repo_kind":{"official":{"samples":12,"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":12,"samples":[{"code_sha256_prefix":"372b275922a9f531","entry":"box","repo":"TFNTF/PostEdit","repo_kind":"official","path":"forward_operator/resizer.py","file_url":"https://github.com/TFNTF/PostEdit/blob/HEAD/forward_operator/resizer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"372b275922a9f531"}},{"code_sha256_prefix":"ee77cd8fde21ffd1","entry":"cubic","repo":"TFNTF/PostEdit","repo_kind":"official","path":"forward_operator/resizer.py","file_url":"https://github.com/TFNTF/PostEdit/blob/HEAD/forward_operator/resizer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"ee77cd8fde21ffd1"}},{"code_sha256_prefix":"a042902caede448b","entry":"diffusion_step","repo":"TFNTF/PostEdit","repo_kind":"official","path":"ptp_utils.py","file_url":"https://github.com/TFNTF/PostEdit/blob/HEAD/ptp_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":"a042902caede448b"}},{"code_sha256_prefix":"dc2dcfd069e89041","entry":"fft2c_new","repo":"TFNTF/PostEdit","repo_kind":"official","path":"forward_operator/fastmri_utils.py","file_url":"https://github.com/TFNTF/PostEdit/blob/HEAD/forward_operator/fastmri_utils.py","link_basis":"harvester_set","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":"dc2dcfd069e89041"}},{"code_sha256_prefix":"f106699fc610a684","entry":"lanczos2","repo":"TFNTF/PostEdit","repo_kind":"official","path":"forward_operator/resizer.py","file_url":"https://github.com/TFNTF/PostEdit/blob/HEAD/forward_operator/resizer.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"f106699fc610a684"}},{"code_sha256_prefix":"85d5eb123674597d","entry":"text_under_image","repo":"TFNTF/PostEdit","repo_kind":"official","path":"ptp_utils.py","file_url":"https://github.com/TFNTF/PostEdit/blob/HEAD/ptp_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":"85d5eb123674597d"}},{"code_sha256_prefix":"3f254aa71fe31570","entry":"diffusion_step_xl","repo":"TFNTF/PostEdit","repo_kind":"official","path":"ptp_utils.py","file_url":"https://github.com/TFNTF/PostEdit/blob/HEAD/ptp_utils.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":"3f254aa71fe31570"}},{"code_sha256_prefix":"d5d761740edb12db","entry":"fft2c_old","repo":"TFNTF/PostEdit","repo_kind":"official","path":"forward_operator/fastmri_utils.py","file_url":"https://github.com/TFNTF/PostEdit/blob/HEAD/forward_operator/fastmri_utils.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":"d5d761740edb12db"}},{"code_sha256_prefix":"d167441d997c52ce","entry":"get_matrix","repo":"TFNTF/PostEdit","repo_kind":"official","path":"seq_align.py","file_url":"https://github.com/TFNTF/PostEdit/blob/HEAD/seq_align.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":"d167441d997c52ce"}},{"code_sha256_prefix":"81db21bf982ca0fe","entry":"get_matrix","repo":"TFNTF/PostEdit","repo_kind":"official","path":"seq_align.py","file_url":"https://github.com/TFNTF/PostEdit/blob/HEAD/seq_align.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":"81db21bf982ca0fe"}},{"code_sha256_prefix":"beb8f6a30678a4d9","entry":"get_traceback_matrix","repo":"TFNTF/PostEdit","repo_kind":"official","path":"seq_align.py","file_url":"https://github.com/TFNTF/PostEdit/blob/HEAD/seq_align.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":"beb8f6a30678a4d9"}},{"code_sha256_prefix":"d63efa5d2fd536e2","entry":"ifft2c_old","repo":"TFNTF/PostEdit","repo_kind":"official","path":"forward_operator/fastmri_utils.py","file_url":"https://github.com/TFNTF/PostEdit/blob/HEAD/forward_operator/fastmri_utils.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":"d63efa5d2fd536e2"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}