{"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/fastdrag-manipulate-anything-in-one-step","title":"FastDrag: Manipulate Anything in One Step","arxiv_id":"2405.15769","date":"2024-05-24","proceeding":null,"authors":["Xuanjia Zhao","Jian Guan","Congyi Fan","Dongli Xu","Youtian Lin","Haiwei Pan","Pengming Feng"],"abstract":"Drag-based image editing using generative models provides precise control over image contents, enabling users to manipulate anything in an image with a few clicks. However, prevailing methods typically adopt $n$-step iterations for latent semantic optimization to achieve drag-based image editing, which is time-consuming and limits practical applications. In this paper, we introduce a novel one-step drag-based image editing method, i.e., FastDrag, to accelerate the editing process. Central to our approach is a latent warpage function (LWF), which simulates the behavior of a stretched material to adjust the location of individual pixels within the latent space. This innovation achieves one-step latent semantic optimization and hence significantly promotes editing speeds. Meanwhile, null regions emerging after applying LWF are addressed by our proposed bilateral nearest neighbor interpolation (BNNI) strategy. This strategy interpolates these regions using similar features from neighboring areas, thus enhancing semantic integrity. Additionally, a consistency-preserving strategy is introduced to maintain the consistency between the edited and original images by adopting semantic information from the original image, saved as key and value pairs in self-attention module during diffusion inversion, to guide the diffusion sampling. Our FastDrag is validated on the DragBench dataset, demonstrating substantial improvements in processing time over existing methods, while achieving enhanced editing performance. Project page: https://fastdrag-site.github.io/ .","url_abs":"https://arxiv.org/abs/2405.15769v3","url_pdf":"https://arxiv.org/pdf/2405.15769v3.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":"fastdrag-manipulate-anything-in-one-step","repo_url":"https://github.com/XuanjiaZ/FastDrag","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2405.15769","atlas_url":"https://app.syntology.ai/?focus=2405.15769","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2405.15769"}},"developers":"https://syntology.ai/developers","read_at":"2026-09-25T09:33:49+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/XuanjiaZ/FastDrag","reach":null}],"summary":{"ran_draft_wrong":2,"ran_fixture":2,"unverified":1},"by_repo_kind":{"official":{"samples":5,"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":0,"samples":[{"code_sha256_prefix":"a43f655fb03112d9","entry":"check_handle_reach_target","repo":"XuanjiaZ/FastDrag","repo_kind":"official","path":"utils/drag_utils.py","file_url":"https://github.com/XuanjiaZ/FastDrag/blob/HEAD/utils/drag_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a43f655fb03112d9"}},{"code_sha256_prefix":"8ae3b1ed253e0c6f","entry":"interpolate_feature_patch","repo":"XuanjiaZ/FastDrag","repo_kind":"official","path":"utils/drag_utils.py","file_url":"https://github.com/XuanjiaZ/FastDrag/blob/HEAD/utils/drag_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"8ae3b1ed253e0c6f"}},{"code_sha256_prefix":"aaf9fd71daa69ae4","entry":"point_tracking","repo":"XuanjiaZ/FastDrag","repo_kind":"official","path":"utils/drag_utils.py","file_url":"https://github.com/XuanjiaZ/FastDrag/blob/HEAD/utils/drag_utils.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"aaf9fd71daa69ae4"}},{"code_sha256_prefix":"b6f9c54d3eaa1c8a","entry":"preprocess_image","repo":"XuanjiaZ/FastDrag","repo_kind":"official","path":"drag_bench_evaluation/run_fast_drag.py","file_url":"https://github.com/XuanjiaZ/FastDrag/blob/HEAD/drag_bench_evaluation/run_fast_drag.py","link_basis":"first_harvest_node","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"b6f9c54d3eaa1c8a"}},{"code_sha256_prefix":"f6c4a71dae1c6163","entry":"drag_diffusion_update","repo":"XuanjiaZ/FastDrag","repo_kind":"official","path":"utils/drag_utils.py","file_url":"https://github.com/XuanjiaZ/FastDrag/blob/HEAD/utils/drag_utils.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"f6c4a71dae1c6163"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}