{"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/fatezero-fusing-attentions-for-zero-shot-text","title":"FateZero: Fusing Attentions for Zero-shot Text-based Video Editing","arxiv_id":"2303.09535","date":"2023-03-16","proceeding":"ICCV 2023 1","authors":["Chenyang Qi","Xiaodong Cun","Yong Zhang","Chenyang Lei","Xintao Wang","Ying Shan","Qifeng Chen"],"abstract":"The diffusion-based generative models have achieved remarkable success in text-based image generation. However, since it contains enormous randomness in generation progress, it is still challenging to apply such models for real-world visual content editing, especially in videos. In this paper, we propose FateZero, a zero-shot text-based editing method on real-world videos without per-prompt training or use-specific mask. To edit videos consistently, we propose several techniques based on the pre-trained models. Firstly, in contrast to the straightforward DDIM inversion technique, our approach captures intermediate attention maps during inversion, which effectively retain both structural and motion information. These maps are directly fused in the editing process rather than generated during denoising. To further minimize semantic leakage of the source video, we then fuse self-attentions with a blending mask obtained by cross-attention features from the source prompt. Furthermore, we have implemented a reform of the self-attention mechanism in denoising UNet by introducing spatial-temporal attention to ensure frame consistency. Yet succinct, our method is the first one to show the ability of zero-shot text-driven video style and local attribute editing from the trained text-to-image model. We also have a better zero-shot shape-aware editing ability based on the text-to-video model. Extensive experiments demonstrate our superior temporal consistency and editing capability than previous works.","url_abs":"https://arxiv.org/abs/2303.09535v3","url_pdf":"https://arxiv.org/pdf/2303.09535v3.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":"fatezero-fusing-attentions-for-zero-shot-text","repo_url":"https://github.com/chenyangqiqi/fatezero","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"attribute","task_name":"Attribute"},{"task_slug":"text-to-video-editing","task_name":"Text-to-Video Editing"},{"task_slug":"video-editing","task_name":"Video Editing"},{"task_slug":"video-style-transfer","task_name":"Video Style Transfer"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2303.09535","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2303.09535"}},"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/chenyangqiqi/fatezero","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_draft_wrong":4,"ran":3,"unverified":5},"by_repo_kind":{"official":{"samples":12,"ran":7,"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":"98f385d847636a3e","entry":"basic_clean","repo":"chenyangqiqi/fatezero","repo_kind":"official","path":"CLIP/clip/simple_tokenizer.py","file_url":"https://github.com/chenyangqiqi/fatezero/blob/HEAD/CLIP/clip/simple_tokenizer.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"98f385d847636a3e"}},{"code_sha256_prefix":"aad535655c5f6b0f","entry":"collate_fn","repo":"chenyangqiqi/fatezero","repo_kind":"official","path":"train_tune_a_video.py","file_url":"https://github.com/chenyangqiqi/fatezero/blob/HEAD/train_tune_a_video.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aad535655c5f6b0f"}},{"code_sha256_prefix":"92f6ba552dffd628","entry":"crop_read_image_path","repo":"chenyangqiqi/fatezero","repo_kind":"official","path":"CLIP/frame_acc_tem_con.py","file_url":"https://github.com/chenyangqiqi/fatezero/blob/HEAD/CLIP/frame_acc_tem_con.py","link_basis":"harvester_set","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":"92f6ba552dffd628"}},{"code_sha256_prefix":"f46bcb6099334fa6","entry":"downsample_2d","repo":"chenyangqiqi/fatezero","repo_kind":"official","path":"video_diffusion/models/resnet.py","file_url":"https://github.com/chenyangqiqi/fatezero/blob/HEAD/video_diffusion/models/resnet.py","link_basis":"harvester_set","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":"f46bcb6099334fa6"}},{"code_sha256_prefix":"d919ae32e5e4e616","entry":"get_pairs","repo":"chenyangqiqi/fatezero","repo_kind":"official","path":"CLIP/clip/simple_tokenizer.py","file_url":"https://github.com/chenyangqiqi/fatezero/blob/HEAD/CLIP/clip/simple_tokenizer.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d919ae32e5e4e616"}},{"code_sha256_prefix":"d3ea46d2b896a593","entry":"upfirdn2d_native","repo":"chenyangqiqi/fatezero","repo_kind":"official","path":"video_diffusion/models/resnet.py","file_url":"https://github.com/chenyangqiqi/fatezero/blob/HEAD/video_diffusion/models/resnet.py","link_basis":"harvester_set","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":"d3ea46d2b896a593"}},{"code_sha256_prefix":"9542161e9640b858","entry":"whitespace_clean","repo":"chenyangqiqi/fatezero","repo_kind":"official","path":"CLIP/clip/simple_tokenizer.py","file_url":"https://github.com/chenyangqiqi/fatezero/blob/HEAD/CLIP/clip/simple_tokenizer.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9542161e9640b858"}},{"code_sha256_prefix":"39e6b23b55f376ea","entry":"build_model","repo":"chenyangqiqi/fatezero","repo_kind":"official","path":"CLIP/clip/model.py","file_url":"https://github.com/chenyangqiqi/fatezero/blob/HEAD/CLIP/clip/model.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"39e6b23b55f376ea"}},{"code_sha256_prefix":"032954630a69a9df","entry":"get_down_block","repo":"chenyangqiqi/fatezero","repo_kind":"official","path":"video_diffusion/models/unet_3d_blocks.py","file_url":"https://github.com/chenyangqiqi/fatezero/blob/HEAD/video_diffusion/models/unet_3d_blocks.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"032954630a69a9df"}},{"code_sha256_prefix":"75eee0ffe8b4fafe","entry":"get_up_block","repo":"chenyangqiqi/fatezero","repo_kind":"official","path":"video_diffusion/models/unet_3d_blocks.py","file_url":"https://github.com/chenyangqiqi/fatezero/blob/HEAD/video_diffusion/models/unet_3d_blocks.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"75eee0ffe8b4fafe"}},{"code_sha256_prefix":"f6f30e41636ae569","entry":"load","repo":"chenyangqiqi/fatezero","repo_kind":"official","path":"CLIP/clip/clip.py","file_url":"https://github.com/chenyangqiqi/fatezero/blob/HEAD/CLIP/clip/clip.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"f6f30e41636ae569"}},{"code_sha256_prefix":"31e7ed79c46ee9a9","entry":"upsample_2d","repo":"chenyangqiqi/fatezero","repo_kind":"official","path":"video_diffusion/models/resnet.py","file_url":"https://github.com/chenyangqiqi/fatezero/blob/HEAD/video_diffusion/models/resnet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"31e7ed79c46ee9a9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}