{"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/zero-shot-image-to-image-translation","title":"Zero-shot Image-to-Image Translation","arxiv_id":"2302.03027","date":"2023-02-06","proceeding":null,"authors":["Gaurav Parmar","Krishna Kumar Singh","Richard Zhang","Yijun Li","Jingwan Lu","Jun-Yan Zhu"],"abstract":"Large-scale text-to-image generative models have shown their remarkable ability to synthesize diverse and high-quality images. However, it is still challenging to directly apply these models for editing real images for two reasons. First, it is hard for users to come up with a perfect text prompt that accurately describes every visual detail in the input image. Second, while existing models can introduce desirable changes in certain regions, they often dramatically alter the input content and introduce unexpected changes in unwanted regions. In this work, we propose pix2pix-zero, an image-to-image translation method that can preserve the content of the original image without manual prompting. We first automatically discover editing directions that reflect desired edits in the text embedding space. To preserve the general content structure after editing, we further propose cross-attention guidance, which aims to retain the cross-attention maps of the input image throughout the diffusion process. In addition, our method does not need additional training for these edits and can directly use the existing pre-trained text-to-image diffusion model. We conduct extensive experiments and show that our method outperforms existing and concurrent works for both real and synthetic image editing.","url_abs":"https://arxiv.org/abs/2302.03027v1","url_pdf":"https://arxiv.org/pdf/2302.03027v1.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":"zero-shot-image-to-image-translation","repo_url":"https://github.com/pix2pixzero/pix2pix-zero","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"zero-shot-image-to-image-translation","repo_url":"https://github.com/hansam95/nmg","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-to-image-translation","task_name":"Image-to-Image Translation"},{"task_slug":"text-based-image-editing","task_name":"Text-based Image Editing"},{"task_slug":"translation","task_name":"Translation"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/text-based-image-editing-on-pie-bench","task":"Text-based Image Editing","dataset":"PIE-Bench","model":"DDIM Inversion+Pix2Pix-Zero","rank_in_archive_order":16,"of":18,"metrics":{"Background LPIPS":"172.22","Background PSNR":"20.44","CLIPSIM":"22.80","Structure Distance":"61.68"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2302.03027","atlas_url":"https://app.syntology.ai/?focus=2302.03027","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2302.03027"}},"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/pix2pixzero/pix2pix-zero","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/hansam95/nmg","reach":null}],"summary":{"ran":2,"unverified":1},"by_repo_kind":{"official":{"samples":3,"ran":2,"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":"b5b7f96baa2b94a9","entry":"clean_l_sentences","repo":"pix2pixzero/pix2pix-zero","repo_kind":"official","path":"src/utils/gradio_utils.py","file_url":"https://github.com/pix2pixzero/pix2pix-zero/blob/HEAD/src/utils/gradio_utils.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":"b5b7f96baa2b94a9"}},{"code_sha256_prefix":"2578faa2a5d91c0e","entry":"load_sentence_embeddings","repo":"pix2pixzero/pix2pix-zero","repo_kind":"official","path":"src/utils/gradio_utils.py","file_url":"https://github.com/pix2pixzero/pix2pix-zero/blob/HEAD/src/utils/gradio_utils.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":"2578faa2a5d91c0e"}},{"code_sha256_prefix":"5f1dc9ccbe79d31b","entry":"construct_direction","repo":"pix2pixzero/pix2pix-zero","repo_kind":"official","path":"src/utils/edit_directions.py","file_url":"https://github.com/pix2pixzero/pix2pix-zero/blob/HEAD/src/utils/edit_directions.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":"5f1dc9ccbe79d31b"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}