{"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/an-image-is-worth-one-word-personalizing-text","title":"An Image is Worth One Word: Personalizing Text-to-Image Generation using Textual Inversion","arxiv_id":"2208.01618","date":"2022-08-02","proceeding":null,"authors":["Rinon Gal","Yuval Alaluf","Yuval Atzmon","Or Patashnik","Amit H. Bermano","Gal Chechik","Daniel Cohen-Or"],"abstract":"Text-to-image models offer unprecedented freedom to guide creation through natural language. Yet, it is unclear how such freedom can be exercised to generate images of specific unique concepts, modify their appearance, or compose them in new roles and novel scenes. In other words, we ask: how can we use language-guided models to turn our cat into a painting, or imagine a new product based on our favorite toy? Here we present a simple approach that allows such creative freedom. Using only 3-5 images of a user-provided concept, like an object or a style, we learn to represent it through new \"words\" in the embedding space of a frozen text-to-image model. These \"words\" can be composed into natural language sentences, guiding personalized creation in an intuitive way. Notably, we find evidence that a single word embedding is sufficient for capturing unique and varied concepts. We compare our approach to a wide range of baselines, and demonstrate that it can more faithfully portray the concepts across a range of applications and tasks. Our code, data and new words will be available at: https://textual-inversion.github.io","url_abs":"https://arxiv.org/abs/2208.01618v1","url_pdf":"https://arxiv.org/pdf/2208.01618v1.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":"an-image-is-worth-one-word-personalizing-text","repo_url":"https://github.com/rinongal/textual_inversion","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"an-image-is-worth-one-word-personalizing-text","repo_url":"https://github.com/brandontrabucco/da-fusion","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"an-image-is-worth-one-word-personalizing-text","repo_url":"https://github.com/cloneofsimo/lora","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"an-image-is-worth-one-word-personalizing-text","repo_url":"https://github.com/giannisdaras/multires_textual_inversion","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"an-image-is-worth-one-word-personalizing-text","repo_url":"https://github.com/ignoww/ZOODiP","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"an-image-is-worth-one-word-personalizing-text","repo_url":"https://github.com/joycenerd/p4d","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"an-image-is-worth-one-word-personalizing-text","repo_url":"https://github.com/nicolai256/stable-textual-inversion_win","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"an-image-is-worth-one-word-personalizing-text","repo_url":"https://github.com/visinf/diagen","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"an-image-is-worth-one-word-personalizing-text","repo_url":"https://github.com/yandex-research/dvar","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"personalized-image-generation","task_name":"Personalized Image Generation"},{"task_slug":"text-to-image-generation-1","task_name":"Text to Image Generation"},{"task_slug":"text-to-image-generation","task_name":"Text-to-Image Generation"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/personalized-image-generation-on-dreambench","task":"Personalized Image Generation","dataset":"DreamBooth","model":"Textual Inversion SD v1.5","rank_in_archive_order":7,"of":7,"metrics":{"Concept Preservation (CP)":"0.378","Overall (CP * PF)":"0.236","Prompt Following (PF)":"0.624"},"uses_additional_data":false}],"syntology":{"syntology_url":"https://syntology.ai/paper/2208.01618","atlas_url":"https://app.syntology.ai/?focus=2208.01618","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2208.01618"}},"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/giannisdaras/multires_textual_inversion","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/brandontrabucco/da-fusion","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/visinf/diagen","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/nicolai256/stable-textual-inversion_win","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/cloneofsimo/lora","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/ignoww/ZOODiP","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/yandex-research/dvar","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/rinongal/textual_inversion","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/joycenerd/p4d","reach":null}],"summary":{"ran":4,"ran_draft_wrong":3,"ran_honours":3,"unverified":3},"by_repo_kind":{"official":{"samples":4,"ran":3,"repositories":1},"listed":{"samples":9,"ran":7,"repositories":4}},"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":1,"samples":[{"code_sha256_prefix":"1548fd8499deb498","entry":"LoraInjectedConv2d","repo":"cloneofsimo/lora","repo_kind":"listed","path":"lora_diffusion/lora.py","file_url":"https://github.com/cloneofsimo/lora/blob/HEAD/lora_diffusion/lora.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1548fd8499deb498"}},{"code_sha256_prefix":"3ca96bc3c5f38318","entry":"LoraInjectedLinear","repo":"cloneofsimo/lora","repo_kind":"listed","path":"lora_diffusion/lora.py","file_url":"https://github.com/cloneofsimo/lora/blob/HEAD/lora_diffusion/lora.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"3ca96bc3c5f38318"}},{"code_sha256_prefix":"cbc39c2df0771d50","entry":"SimpleTokenizer","repo":"joycenerd/p4d","repo_kind":"listed","path":"open_clip/tokenizer.py","file_url":"https://github.com/joycenerd/p4d/blob/HEAD/open_clip/tokenizer.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":"cbc39c2df0771d50"}},{"code_sha256_prefix":"e1b3ccc792ff8565","entry":"_find_modules_v2","repo":"cloneofsimo/lora","repo_kind":"listed","path":"lora_diffusion/lora.py","file_url":"https://github.com/cloneofsimo/lora/blob/HEAD/lora_diffusion/lora.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"e1b3ccc792ff8565"}},{"code_sha256_prefix":"5267c9a6cdeea45b","entry":"bytes_to_unicode","repo":"joycenerd/p4d","repo_kind":"listed","path":"open_clip/tokenizer.py","file_url":"https://github.com/joycenerd/p4d/blob/HEAD/open_clip/tokenizer.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"5267c9a6cdeea45b"}},{"code_sha256_prefix":"d5726f9e3a5684c3","entry":"get_bert_token_for_string","repo":"rinongal/textual_inversion","repo_kind":"official","path":"ldm/modules/embedding_manager.py","file_url":"https://github.com/rinongal/textual_inversion/blob/HEAD/ldm/modules/embedding_manager.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"d5726f9e3a5684c3"}},{"code_sha256_prefix":"41c6eb3a0aa3eb46","entry":"get_clip_token_for_string","repo":"rinongal/textual_inversion","repo_kind":"official","path":"ldm/modules/embedding_manager.py","file_url":"https://github.com/rinongal/textual_inversion/blob/HEAD/ldm/modules/embedding_manager.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"41c6eb3a0aa3eb46"}},{"code_sha256_prefix":"7e334d1575bdaede","entry":"get_clip_token_for_string","repo":"nicolai256/stable-textual-inversion_win","repo_kind":"listed","path":"ldm/modules/embedding_manager.py","file_url":"https://github.com/nicolai256/stable-textual-inversion_win/blob/HEAD/ldm/modules/embedding_manager.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7e334d1575bdaede"}},{"code_sha256_prefix":"71c2df28a1008d03","entry":"get_embedding_for_clip_token","repo":"rinongal/textual_inversion","repo_kind":"official","path":"ldm/modules/embedding_manager.py","file_url":"https://github.com/rinongal/textual_inversion/blob/HEAD/ldm/modules/embedding_manager.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":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"71c2df28a1008d03"}},{"code_sha256_prefix":"c8dd7e385ef5e915","entry":"inject_trainable_lora","repo":"cloneofsimo/lora","repo_kind":"listed","path":"lora_diffusion/lora.py","file_url":"https://github.com/cloneofsimo/lora/blob/HEAD/lora_diffusion/lora.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":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c8dd7e385ef5e915"}},{"code_sha256_prefix":"7cb89a6737441411","entry":"EmbeddingManager","repo":"rinongal/textual_inversion","repo_kind":"official","path":"ldm/modules/embedding_manager.py","file_url":"https://github.com/rinongal/textual_inversion/blob/HEAD/ldm/modules/embedding_manager.py","link_basis":"first_harvest_node","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":"7cb89a6737441411"}},{"code_sha256_prefix":"e7e48e96a6442923","entry":"EmbeddingManager","repo":"nicolai256/stable-textual-inversion_win","repo_kind":"listed","path":"ldm/modules/embedding_manager.py","file_url":"https://github.com/nicolai256/stable-textual-inversion_win/blob/HEAD/ldm/modules/embedding_manager.py","link_basis":"first_harvest_node","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":"e7e48e96a6442923"}},{"code_sha256_prefix":"0c65f0063ebd7b8c","entry":"TextualInversionDataset","repo":"ignoww/ZOODiP","repo_kind":"listed","path":"train_zoodip.py","file_url":"https://github.com/ignoww/ZOODiP/blob/HEAD/train_zoodip.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":"0c65f0063ebd7b8c"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}