{"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/freestyle-free-lunch-for-text-guided-style","title":"FreeStyle: Free Lunch for Text-guided Style Transfer using Diffusion Models","arxiv_id":"2401.15636","date":"2024-01-28","proceeding":null,"authors":["Feihong He","Gang Li","Fuhui Sun","Mengyuan Zhang","Lingyu Si","Xiaoyan Wang","Li Shen"],"abstract":"The rapid development of generative diffusion models has significantly advanced the field of style transfer. However, most current style transfer methods based on diffusion models typically involve a slow iterative optimization process, e.g., model fine-tuning and textual inversion of style concept. In this paper, we introduce FreeStyle, an innovative style transfer method built upon a pre-trained large diffusion model, requiring no further optimization. Besides, our method enables style transfer only through a text description of the desired style, eliminating the necessity of style images. Specifically, we propose a dual-stream encoder and single-stream decoder architecture, replacing the conventional U-Net in diffusion models. In the dual-stream encoder, two distinct branches take the content image and style text prompt as inputs, achieving content and style decoupling. In the decoder, we further modulate features from the dual streams based on a given content image and the corresponding style text prompt for precise style transfer. Our experimental results demonstrate high-quality synthesis and fidelity of our method across various content images and style text prompts. Compared with state-of-the-art methods that require training, our FreeStyle approach notably reduces the computational burden by thousands of iterations, while achieving comparable or superior performance across multiple evaluation metrics including CLIP Aesthetic Score, CLIP Score, and Preference. We have released the code at: https://github.com/FreeStyleFreeLunch/FreeStyle.","url_abs":"https://arxiv.org/abs/2401.15636v3","url_pdf":"https://arxiv.org/pdf/2401.15636v3.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":"freestyle-free-lunch-for-text-guided-style","repo_url":"https://github.com/freestylefreelunch/freestyle","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok"}}],"tasks":[{"task_slug":"decoder","task_name":"Decoder"},{"task_slug":"style-transfer","task_name":"Style Transfer"}],"methods":[{"method_slug":"clip","method_name":"CLIP"},{"method_slug":"concatenated-skip-connection","method_name":"Concatenated Skip Connection"},{"method_slug":"convolution","method_name":"Convolution"},{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"max-pooling","method_name":"Max Pooling"},{"method_slug":"relu","method_name":"ReLU"},{"method_slug":"u-net","method_name":"U-Net"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2401.15636","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2401.15636"}},"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/freestylefreelunch/freestyle","reach":{"status":"ok"}}],"summary":{"ran":3,"ran_draft_wrong":1,"unverified":3},"by_repo_kind":{"official":{"samples":7,"ran":4,"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":7,"samples":[{"code_sha256_prefix":"a8366f238618edad","entry":"get_constant_schedule","repo":"freestylefreelunch/freestyle","repo_kind":"official","path":"diffusers/src/diffusers/optimization.py","file_url":"https://github.com/freestylefreelunch/freestyle/blob/HEAD/diffusers/src/diffusers/optimization.py","link_basis":"harvester_set","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":"a8366f238618edad"}},{"code_sha256_prefix":"11f07821d1b2286b","entry":"get_constant_schedule_with_warmup","repo":"freestylefreelunch/freestyle","repo_kind":"official","path":"diffusers/src/diffusers/optimization.py","file_url":"https://github.com/freestylefreelunch/freestyle/blob/HEAD/diffusers/src/diffusers/optimization.py","link_basis":"harvester_set","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":"11f07821d1b2286b"}},{"code_sha256_prefix":"9cc5235bd8b13556","entry":"get_piecewise_constant_schedule","repo":"freestylefreelunch/freestyle","repo_kind":"official","path":"diffusers/src/diffusers/optimization.py","file_url":"https://github.com/freestylefreelunch/freestyle/blob/HEAD/diffusers/src/diffusers/optimization.py","link_basis":"harvester_set","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":"9cc5235bd8b13556"}},{"code_sha256_prefix":"bea2d776a332f2b0","entry":"rescale_noise_cfg","repo":"freestylefreelunch/freestyle","repo_kind":"official","path":"diffusers_test/pipeline_stable_diffusion_img2img.py","file_url":"https://github.com/freestylefreelunch/freestyle/blob/HEAD/diffusers_test/pipeline_stable_diffusion_img2img.py","link_basis":"plan_row","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"bea2d776a332f2b0"}},{"code_sha256_prefix":"f4ac91315a94774b","entry":"text_encoder_attn_modules","repo":"freestylefreelunch/freestyle","repo_kind":"official","path":"diffusers/src/diffusers/loaders.py","file_url":"https://github.com/freestylefreelunch/freestyle/blob/HEAD/diffusers/src/diffusers/loaders.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":"f4ac91315a94774b"}},{"code_sha256_prefix":"2c476d130bd89887","entry":"text_encoder_lora_state_dict","repo":"freestylefreelunch/freestyle","repo_kind":"official","path":"diffusers/src/diffusers/loaders.py","file_url":"https://github.com/freestylefreelunch/freestyle/blob/HEAD/diffusers/src/diffusers/loaders.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":"2c476d130bd89887"}},{"code_sha256_prefix":"ccca296c90beae91","entry":"text_encoder_mlp_modules","repo":"freestylefreelunch/freestyle","repo_kind":"official","path":"diffusers/src/diffusers/loaders.py","file_url":"https://github.com/freestylefreelunch/freestyle/blob/HEAD/diffusers/src/diffusers/loaders.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":"ccca296c90beae91"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}