{"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/implicit-style-content-separation-using-b","title":"Implicit Style-Content Separation using B-LoRA","arxiv_id":"2403.14572","date":"2024-03-21","proceeding":null,"authors":["Yarden Frenkel","Yael Vinker","Ariel Shamir","Daniel Cohen-Or"],"abstract":"Image stylization involves manipulating the visual appearance and texture (style) of an image while preserving its underlying objects, structures, and concepts (content). The separation of style and content is essential for manipulating the image's style independently from its content, ensuring a harmonious and visually pleasing result. Achieving this separation requires a deep understanding of both the visual and semantic characteristics of images, often necessitating the training of specialized models or employing heavy optimization. In this paper, we introduce B-LoRA, a method that leverages LoRA (Low-Rank Adaptation) to implicitly separate the style and content components of a single image, facilitating various image stylization tasks. By analyzing the architecture of SDXL combined with LoRA, we find that jointly learning the LoRA weights of two specific blocks (referred to as B-LoRAs) achieves style-content separation that cannot be achieved by training each B-LoRA independently. Consolidating the training into only two blocks and separating style and content allows for significantly improving style manipulation and overcoming overfitting issues often associated with model fine-tuning. Once trained, the two B-LoRAs can be used as independent components to allow various image stylization tasks, including image style transfer, text-based image stylization, consistent style generation, and style-content mixing.","url_abs":"https://arxiv.org/abs/2403.14572v2","url_pdf":"https://arxiv.org/pdf/2403.14572v2.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":"implicit-style-content-separation-using-b","repo_url":"https://github.com/yardenfren1996/B-LoRA","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-stylization","task_name":"Image Stylization"},{"task_slug":"style-transfer","task_name":"Style Transfer"}],"methods":[],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.14572","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.14572"}},"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/yardenfren1996/B-LoRA","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_fixture":1,"unverified":5},"by_repo_kind":{"listed":{"samples":6,"ran":1,"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":"4ed40bc152475f67","entry":"text_encoder_lora_state_dict","repo":"yardenfren1996/B-LoRA","repo_kind":"listed","path":"train_dreambooth_b-lora_sdxl.py","file_url":"https://github.com/yardenfren1996/B-LoRA/blob/HEAD/train_dreambooth_b-lora_sdxl.py","link_basis":"harvester_set","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4ed40bc152475f67"}},{"code_sha256_prefix":"26d0436c8164fb97","entry":"filter_lora","repo":"yardenfren1996/B-LoRA","repo_kind":"listed","path":"blora_utils.py","file_url":"https://github.com/yardenfren1996/B-LoRA/blob/HEAD/blora_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":"26d0436c8164fb97"}},{"code_sha256_prefix":"86965b6bae051ea4","entry":"import_model_class_from_model_name_or_path","repo":"yardenfren1996/B-LoRA","repo_kind":"listed","path":"train_dreambooth_b-lora_sdxl.py","file_url":"https://github.com/yardenfren1996/B-LoRA/blob/HEAD/train_dreambooth_b-lora_sdxl.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":"86965b6bae051ea4"}},{"code_sha256_prefix":"014b19a847875a69","entry":"is_belong_to_blocks","repo":"yardenfren1996/B-LoRA","repo_kind":"listed","path":"blora_utils.py","file_url":"https://github.com/yardenfren1996/B-LoRA/blob/HEAD/blora_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":"014b19a847875a69"}},{"code_sha256_prefix":"9701b178ddabc9d0","entry":"parse_args","repo":"yardenfren1996/B-LoRA","repo_kind":"listed","path":"train_dreambooth_b-lora_sdxl.py","file_url":"https://github.com/yardenfren1996/B-LoRA/blob/HEAD/train_dreambooth_b-lora_sdxl.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":"9701b178ddabc9d0"}},{"code_sha256_prefix":"bf1ba82efded0a30","entry":"scale_lora","repo":"yardenfren1996/B-LoRA","repo_kind":"listed","path":"blora_utils.py","file_url":"https://github.com/yardenfren1996/B-LoRA/blob/HEAD/blora_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":"bf1ba82efded0a30"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}