{"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/dual-diffusion-for-unified-image-generation","title":"Dual Diffusion for Unified Image Generation and Understanding","arxiv_id":"2501.00289","date":"2024-12-31","proceeding":"CVPR 2025 1","authors":["Zijie Li","Henry Li","Yichun Shi","Amir Barati Farimani","Yuval Kluger","Linjie Yang","Peng Wang"],"abstract":"Diffusion models have gained tremendous success in text-to-image generation, yet still lag behind with visual understanding tasks, an area dominated by autoregressive vision-language models. We propose a large-scale and fully end-to-end diffusion model for multi-modal understanding and generation that significantly improves on existing diffusion-based multimodal models, and is the first of its kind to support the full suite of vision-language modeling capabilities. Inspired by the multimodal diffusion transformer (MM-DiT) and recent advances in discrete diffusion language modeling, we leverage a cross-modal maximum likelihood estimation framework that simultaneously trains the conditional likelihoods of both images and text jointly under a single loss function, which is back-propagated through both branches of the diffusion transformer. The resulting model is highly flexible and capable of a wide range of tasks including image generation, captioning, and visual question answering. Our model attained competitive performance compared to recent unified image understanding and generation models, demonstrating the potential of multimodal diffusion modeling as a promising alternative to autoregressive next-token prediction models.","url_abs":"https://arxiv.org/abs/2501.00289v1","url_pdf":"https://arxiv.org/pdf/2501.00289v1.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":"dual-diffusion-for-unified-image-generation","repo_url":"https://github.com/zijieli-Jlee/Dual-Diffusion","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"language-modeling","task_name":"Language Modeling"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"question-answering","task_name":"Question Answering"},{"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"},{"task_slug":"visual-question-answering-1","task_name":"Visual Question Answering"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2501.00289","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2501.00289"}},"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/zijieli-Jlee/Dual-Diffusion","reach":{"status":"ok","spdx":"MIT"}}],"summary":{"ran_violates":1,"ran_draft_wrong":1,"unverified":7},"by_repo_kind":{"listed":{"samples":9,"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":"4e3ad3679e5c37b2","entry":"calculate_shift","repo":"zijieli-Jlee/Dual-Diffusion","repo_kind":"listed","path":"sd3_modules/dual_diff_pipeline.py","file_url":"https://github.com/zijieli-Jlee/Dual-Diffusion/blob/HEAD/sd3_modules/dual_diff_pipeline.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"4e3ad3679e5c37b2"}},{"code_sha256_prefix":"0b56680ee1708fee","entry":"retrieve_timesteps","repo":"zijieli-Jlee/Dual-Diffusion","repo_kind":"listed","path":"sd3_modules/dual_diff_pipeline.py","file_url":"https://github.com/zijieli-Jlee/Dual-Diffusion/blob/HEAD/sd3_modules/dual_diff_pipeline.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"0b56680ee1708fee"}},{"code_sha256_prefix":"a6cb835becfb9125","entry":"compute_density_for_timestep_sampling","repo":"zijieli-Jlee/Dual-Diffusion","repo_kind":"listed","path":"sd3_modules/sd3_training_utils.py","file_url":"https://github.com/zijieli-Jlee/Dual-Diffusion/blob/HEAD/sd3_modules/sd3_training_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":"a6cb835becfb9125"}},{"code_sha256_prefix":"43e67a426c782b94","entry":"compute_loss_weighting_for_sd3","repo":"zijieli-Jlee/Dual-Diffusion","repo_kind":"listed","path":"sd3_modules/sd3_training_utils.py","file_url":"https://github.com/zijieli-Jlee/Dual-Diffusion/blob/HEAD/sd3_modules/sd3_training_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":"43e67a426c782b94"}},{"code_sha256_prefix":"cab1caee58ae7b81","entry":"create_logger","repo":"zijieli-Jlee/Dual-Diffusion","repo_kind":"listed","path":"train_dual_diffusion_sd3.py","file_url":"https://github.com/zijieli-Jlee/Dual-Diffusion/blob/HEAD/train_dual_diffusion_sd3.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":"cab1caee58ae7b81"}},{"code_sha256_prefix":"7a16f09fe2ddb9f5","entry":"gradnorm","repo":"zijieli-Jlee/Dual-Diffusion","repo_kind":"listed","path":"sd3_modules/sd_loss_utils.py","file_url":"https://github.com/zijieli-Jlee/Dual-Diffusion/blob/HEAD/sd3_modules/sd_loss_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":"7a16f09fe2ddb9f5"}},{"code_sha256_prefix":"d91cfae999630304","entry":"load_json","repo":"zijieli-Jlee/Dual-Diffusion","repo_kind":"listed","path":"custom_dataset/iterable_data.py","file_url":"https://github.com/zijieli-Jlee/Dual-Diffusion/blob/HEAD/custom_dataset/iterable_data.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":"d91cfae999630304"}},{"code_sha256_prefix":"b23cf8649eb8c230","entry":"prepare_text_inputs","repo":"zijieli-Jlee/Dual-Diffusion","repo_kind":"listed","path":"sd3_modules/dual_diff_pipeline.py","file_url":"https://github.com/zijieli-Jlee/Dual-Diffusion/blob/HEAD/sd3_modules/dual_diff_pipeline.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":"b23cf8649eb8c230"}},{"code_sha256_prefix":"fcf8e44c9540403a","entry":"prepare_text_inputs","repo":"zijieli-Jlee/Dual-Diffusion","repo_kind":"listed","path":"sd3_modules/sd_loss_utils.py","file_url":"https://github.com/zijieli-Jlee/Dual-Diffusion/blob/HEAD/sd3_modules/sd_loss_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":"fcf8e44c9540403a"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}