{"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/portrait-diffusion-training-free-face","title":"Portrait Diffusion: Training-free Face Stylization with Chain-of-Painting","arxiv_id":"2312.02212","date":"2023-12-03","proceeding":null,"authors":["Jin Liu","Huaibo Huang","Chao Jin","Ran He"],"abstract":"Face stylization refers to the transformation of a face into a specific portrait style. However, current methods require the use of example-based adaptation approaches to fine-tune pre-trained generative models so that they demand lots of time and storage space and fail to achieve detailed style transformation. This paper proposes a training-free face stylization framework, named Portrait Diffusion. This framework leverages off-the-shelf text-to-image diffusion models, eliminating the need for fine-tuning specific examples. Specifically, the content and style images are first inverted into latent codes. Then, during image reconstruction using the corresponding latent code, the content and style features in the attention space are delicately blended through a modified self-attention operation called Style Attention Control. Additionally, a Chain-of-Painting method is proposed for the gradual redrawing of unsatisfactory areas from rough adjustments to fine-tuning. Extensive experiments validate the effectiveness of our Portrait Diffusion method and demonstrate the superiority of Chain-of-Painting in achieving precise face stylization. Code will be released at \\url{https://github.com/liujin112/PortraitDiffusion}.","url_abs":"https://arxiv.org/abs/2312.02212v1","url_pdf":"https://arxiv.org/pdf/2312.02212v1.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":"portrait-diffusion-training-free-face","repo_url":"https://github.com/liujin112/portraitdiffusion","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-reconstruction","task_name":"Image Reconstruction"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2312.02212","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2312.02212"}},"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/liujin112/portraitdiffusion","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":1,"ran_violates":1,"unverified":3},"by_repo_kind":{"official":{"samples":5,"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":"63e5469c687a88a7","entry":"Fourier_filter","repo":"liujin112/portraitdiffusion","repo_kind":"official","path":"utils/free_lunch_utils.py","file_url":"https://github.com/liujin112/portraitdiffusion/blob/HEAD/utils/free_lunch_utils.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"63e5469c687a88a7"}},{"code_sha256_prefix":"cd5d5067de871c97","entry":"isinstance_str","repo":"liujin112/portraitdiffusion","repo_kind":"official","path":"utils/free_lunch_utils.py","file_url":"https://github.com/liujin112/portraitdiffusion/blob/HEAD/utils/free_lunch_utils.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"cd5d5067de871c97"}},{"code_sha256_prefix":"2464a3bfcf2ba82f","entry":"register_upblock2d","repo":"liujin112/portraitdiffusion","repo_kind":"official","path":"utils/free_lunch_utils.py","file_url":"https://github.com/liujin112/portraitdiffusion/blob/HEAD/utils/free_lunch_utils.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":"2464a3bfcf2ba82f"}},{"code_sha256_prefix":"d321812b8f73ef4b","entry":"regiter_attention_editor_diffusers","repo":"liujin112/portraitdiffusion","repo_kind":"official","path":"utils/masactrl_utils.py","file_url":"https://github.com/liujin112/portraitdiffusion/blob/HEAD/utils/masactrl_utils.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":"d321812b8f73ef4b"}},{"code_sha256_prefix":"431f768e76ae86fa","entry":"regiter_attention_editor_ldm","repo":"liujin112/portraitdiffusion","repo_kind":"official","path":"utils/masactrl_utils.py","file_url":"https://github.com/liujin112/portraitdiffusion/blob/HEAD/utils/masactrl_utils.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":"431f768e76ae86fa"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}