{"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/instantstyle-plus-style-transfer-with-content","title":"InstantStyle-Plus: Style Transfer with Content-Preserving in Text-to-Image Generation","arxiv_id":"2407.00788","date":"2024-06-30","proceeding":null,"authors":["Haofan Wang","Peng Xing","Renyuan Huang","Hao Ai","Qixun Wang","Xu Bai"],"abstract":"Style transfer is an inventive process designed to create an image that maintains the essence of the original while embracing the visual style of another. Although diffusion models have demonstrated impressive generative power in personalized subject-driven or style-driven applications, existing state-of-the-art methods still encounter difficulties in achieving a seamless balance between content preservation and style enhancement. For example, amplifying the style's influence can often undermine the structural integrity of the content. To address these challenges, we deconstruct the style transfer task into three core elements: 1) Style, focusing on the image's aesthetic characteristics; 2) Spatial Structure, concerning the geometric arrangement and composition of visual elements; and 3) Semantic Content, which captures the conceptual meaning of the image. Guided by these principles, we introduce InstantStyle-Plus, an approach that prioritizes the integrity of the original content while seamlessly integrating the target style. Specifically, our method accomplishes style injection through an efficient, lightweight process, utilizing the cutting-edge InstantStyle framework. To reinforce the content preservation, we initiate the process with an inverted content latent noise and a versatile plug-and-play tile ControlNet for preserving the original image's intrinsic layout. We also incorporate a global semantic adapter to enhance the semantic content's fidelity. To safeguard against the dilution of style information, a style extractor is employed as discriminator for providing supplementary style guidance. Codes will be available at https://github.com/instantX-research/InstantStyle-Plus.","url_abs":"https://arxiv.org/abs/2407.00788v1","url_pdf":"https://arxiv.org/pdf/2407.00788v1.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":"instantstyle-plus-style-transfer-with-content","repo_url":"https://github.com/instantx-research/instantstyle-plus","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"style-transfer","task_name":"Style Transfer"},{"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":[{"method_slug":"adapter","method_name":"Adapter"},{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2407.00788","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2407.00788"}},"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/instantx-research/instantstyle-plus","reach":{"status":"ok"}}],"summary":{"ran":6,"ran_draft_wrong":2,"unverified":4},"by_repo_kind":{"official":{"samples":12,"ran":8,"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":12,"samples":[{"code_sha256_prefix":"eba1cdeb422e3178","entry":"auto_corr_loss","repo":"instantx-research/instantstyle-plus","repo_kind":"official","path":"src/renoise_inversion.py","file_url":"https://github.com/instantx-research/instantstyle-plus/blob/HEAD/src/renoise_inversion.py","link_basis":"plan_row","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eba1cdeb422e3178"}},{"code_sha256_prefix":"1f2384fcfd86a0a9","entry":"calculate_l2_difference","repo":"instantx-research/instantstyle-plus","repo_kind":"official","path":"src/metrics/metric_util.py","file_url":"https://github.com/instantx-research/instantstyle-plus/blob/HEAD/src/metrics/metric_util.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1f2384fcfd86a0a9"}},{"code_sha256_prefix":"62635133d9c50017","entry":"calculate_psnr","repo":"instantx-research/instantstyle-plus","repo_kind":"official","path":"src/metrics/metric_util.py","file_url":"https://github.com/instantx-research/instantstyle-plus/blob/HEAD/src/metrics/metric_util.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"62635133d9c50017"}},{"code_sha256_prefix":"51408ff2502aba41","entry":"noise_regularization","repo":"instantx-research/instantstyle-plus","repo_kind":"official","path":"src/renoise_inversion.py","file_url":"https://github.com/instantx-research/instantstyle-plus/blob/HEAD/src/renoise_inversion.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"51408ff2502aba41"}},{"code_sha256_prefix":"1dab900b2adbe38e","entry":"normalize_activation","repo":"instantx-research/instantstyle-plus","repo_kind":"official","path":"src/metrics/lpips.py","file_url":"https://github.com/instantx-research/instantstyle-plus/blob/HEAD/src/metrics/lpips.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1dab900b2adbe38e"}},{"code_sha256_prefix":"e7ebb1753ecca4f4","entry":"patchify_latents_kl_divergence","repo":"instantx-research/instantstyle-plus","repo_kind":"official","path":"src/renoise_inversion.py","file_url":"https://github.com/instantx-research/instantstyle-plus/blob/HEAD/src/renoise_inversion.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e7ebb1753ecca4f4"}},{"code_sha256_prefix":"1cfa1fd260c26481","entry":"resize_img","repo":"instantx-research/instantstyle-plus","repo_kind":"official","path":"infer_style.py","file_url":"https://github.com/instantx-research/instantstyle-plus/blob/HEAD/infer_style.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"1cfa1fd260c26481"}},{"code_sha256_prefix":"eaea2e0cbf2754c5","entry":"spherical_dist_loss","repo":"instantx-research/instantstyle-plus","repo_kind":"official","path":"pipeline_controlnet_sd_xl_img2img.py","file_url":"https://github.com/instantx-research/instantstyle-plus/blob/HEAD/pipeline_controlnet_sd_xl_img2img.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"eaea2e0cbf2754c5"}},{"code_sha256_prefix":"f47234275dee8d5c","entry":"generate_caption","repo":"instantx-research/instantstyle-plus","repo_kind":"official","path":"infer_style.py","file_url":"https://github.com/instantx-research/instantstyle-plus/blob/HEAD/infer_style.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":"f47234275dee8d5c"}},{"code_sha256_prefix":"bcec35cdd56e58a2","entry":"get_network","repo":"instantx-research/instantstyle-plus","repo_kind":"official","path":"src/metrics/lpips.py","file_url":"https://github.com/instantx-research/instantstyle-plus/blob/HEAD/src/metrics/lpips.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":"bcec35cdd56e58a2"}},{"code_sha256_prefix":"17a0ef3b8319a5bc","entry":"get_state_dict","repo":"instantx-research/instantstyle-plus","repo_kind":"official","path":"src/metrics/lpips.py","file_url":"https://github.com/instantx-research/instantstyle-plus/blob/HEAD/src/metrics/lpips.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":"17a0ef3b8319a5bc"}},{"code_sha256_prefix":"8262566e1ed7239a","entry":"retrieve_latents","repo":"instantx-research/instantstyle-plus","repo_kind":"official","path":"pipeline_controlnet_sd_xl_img2img.py","file_url":"https://github.com/instantx-research/instantstyle-plus/blob/HEAD/pipeline_controlnet_sd_xl_img2img.py","link_basis":"harvester_set","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":"8262566e1ed7239a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}