{"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/d2styler-advancing-arbitrary-style-transfer","title":"D2Styler: Advancing Arbitrary Style Transfer with Discrete Diffusion Methods","arxiv_id":"2408.03558","date":"2024-08-07","proceeding":null,"authors":["Onkar Susladkar","Gayatri Deshmukh","Sparsh Mittal","Parth Shastri"],"abstract":"In image processing, one of the most challenging tasks is to render an image's semantic meaning using a variety of artistic approaches. Existing techniques for arbitrary style transfer (AST) frequently experience mode-collapse, over-stylization, or under-stylization due to a disparity between the style and content images. We propose a novel framework called D$^2$Styler (Discrete Diffusion Styler) that leverages the discrete representational capability of VQ-GANs and the advantages of discrete diffusion, including stable training and avoidance of mode collapse. Our method uses Adaptive Instance Normalization (AdaIN) features as a context guide for the reverse diffusion process. This makes it easy to move features from the style image to the content image without bias. The proposed method substantially enhances the visual quality of style-transferred images, allowing the combination of content and style in a visually appealing manner. We take style images from the WikiArt dataset and content images from the COCO dataset. Experimental results demonstrate that D$^2$Styler produces high-quality style-transferred images and outperforms twelve existing methods on nearly all the metrics. The qualitative results and ablation studies provide further insights into the efficacy of our technique. The code is available at https://github.com/Onkarsus13/D2Styler.","url_abs":"https://arxiv.org/abs/2408.03558v1","url_pdf":"https://arxiv.org/pdf/2408.03558v1.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":"d2styler-advancing-arbitrary-style-transfer","repo_url":"https://github.com/onkarsus13/d2styler","is_official":1,"mentioned_in_paper":1,"mentioned_in_github":1,"framework":"jax","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"style-transfer","task_name":"Style Transfer"}],"methods":[{"method_slug":"adaptive-instance-normalization","method_name":"Adaptive Instance Normalization"},{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"instance-normalization","method_name":"Instance Normalization"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"syntology_url":"https://syntology.ai/paper/2408.03558","atlas_url":"https://app.syntology.ai/?focus=2408.03558","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2408.03558"}},"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/onkarsus13/d2styler","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran":1,"unverified":3},"by_repo_kind":{"official":{"samples":4,"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":"c4b92150d431c3a1","entry":"poly_to_mask","repo":"onkarsus13/d2styler","repo_kind":"official","path":"Train_Styler.py","file_url":"https://github.com/onkarsus13/d2styler/blob/HEAD/Train_Styler.py","link_basis":"first_harvest_node","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"c4b92150d431c3a1"}},{"code_sha256_prefix":"47ccb78720fa43a4","entry":"get_down_block","repo":"onkarsus13/d2styler","repo_kind":"official","path":"models/unet_blocks.py","file_url":"https://github.com/onkarsus13/d2styler/blob/HEAD/models/unet_blocks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"47ccb78720fa43a4"}},{"code_sha256_prefix":"17bb6aea1323b38f","entry":"get_up_block","repo":"onkarsus13/d2styler","repo_kind":"official","path":"models/unet_blocks.py","file_url":"https://github.com/onkarsus13/d2styler/blob/HEAD/models/unet_blocks.py","link_basis":"first_harvest_node","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"17bb6aea1323b38f"}},{"code_sha256_prefix":"da94debb8019ad46","entry":"zero_module","repo":"onkarsus13/d2styler","repo_kind":"official","path":"sparse_controlnet.py","file_url":"https://github.com/onkarsus13/d2styler/blob/HEAD/sparse_controlnet.py","link_basis":"harvester_set","language":"python","status":"unverified","verification_level":0,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"da94debb8019ad46"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}