{"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/zigma-zigzag-mamba-diffusion-model","title":"ZigMa: A DiT-style Zigzag Mamba Diffusion Model","arxiv_id":"2403.13802","date":"2024-03-20","proceeding":null,"authors":["Vincent Tao Hu","Stefan Andreas Baumann","Ming Gui","Olga Grebenkova","Pingchuan Ma","Johannes Schusterbauer","Björn Ommer"],"abstract":"The diffusion model has long been plagued by scalability and quadratic complexity issues, especially within transformer-based structures. In this study, we aim to leverage the long sequence modeling capability of a State-Space Model called Mamba to extend its applicability to visual data generation. Firstly, we identify a critical oversight in most current Mamba-based vision methods, namely the lack of consideration for spatial continuity in the scan scheme of Mamba. Secondly, building upon this insight, we introduce a simple, plug-and-play, zero-parameter method named Zigzag Mamba, which outperforms Mamba-based baselines and demonstrates improved speed and memory utilization compared to transformer-based baselines. Lastly, we integrate Zigzag Mamba with the Stochastic Interpolant framework to investigate the scalability of the model on large-resolution visual datasets, such as FacesHQ $1024\\times 1024$ and UCF101, MultiModal-CelebA-HQ, and MS COCO $256\\times 256$ . Code will be released at https://taohu.me/zigma/","url_abs":"https://arxiv.org/abs/2403.13802v3","url_pdf":"https://arxiv.org/pdf/2403.13802v3.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":"zigma-zigzag-mamba-diffusion-model","repo_url":"https://github.com/CompVis/zigma","is_official":1,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"Apache-2.0"}}],"tasks":[{"task_slug":"mamba","task_name":"Mamba"},{"task_slug":"model","task_name":"model"}],"methods":[{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"speed","method_name":"SPEED"}],"datasets_introduced":[],"methods_introduced":[],"results":[],"syntology":{"atlas_url":"https://app.syntology.ai/?focus=2403.13802","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2403.13802"}},"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/CompVis/zigma","reach":{"status":"ok","spdx":"Apache-2.0"}}],"summary":{"ran_draft_wrong":3,"ran":6,"ran_violates":1,"ran_honours":1,"unverified":3},"by_repo_kind":{"official":{"samples":14,"ran":11,"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":"1712a07966b542ee","entry":"center_crop_arr","repo":"CompVis/zigma","repo_kind":"official","path":"datasets/video_utils.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/datasets/video_utils.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"1712a07966b542ee"}},{"code_sha256_prefix":"fffa4c66b7275f88","entry":"dict_collation_fn","repo":"CompVis/zigma","repo_kind":"official","path":"datasets/wds_dataloader.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/datasets/wds_dataloader.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":"fffa4c66b7275f88"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"CompVis/zigma","repo_kind":"official","path":"model_zigma.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/model_zigma.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"6de57ffd4ee7fee7","entry":"expand_t_like_x","repo":"CompVis/zigma","repo_kind":"official","path":"transport/path.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/transport/path.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"6de57ffd4ee7fee7"}},{"code_sha256_prefix":"661fd94e23de34b1","entry":"generate_run_id","repo":"CompVis/zigma","repo_kind":"official","path":"wandb_utils.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/wandb_utils.py","link_basis":"harvester_set","language":"python","status":"ran","verification_level":1,"contract_check":null,"metamorphic_tier":null,"behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"661fd94e23de34b1"}},{"code_sha256_prefix":"0ed422d461596968","entry":"get_max_ckpt_from_dir","repo":"CompVis/zigma","repo_kind":"official","path":"wandb_utils.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/wandb_utils.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":"0ed422d461596968"}},{"code_sha256_prefix":"7a53c711fb94458d","entry":"has_text","repo":"CompVis/zigma","repo_kind":"official","path":"train_acc.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/train_acc.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":"7a53c711fb94458d"}},{"code_sha256_prefix":"03310bba324ae4fb","entry":"modulate","repo":"CompVis/zigma","repo_kind":"official","path":"model_zigma.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/model_zigma.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"03310bba324ae4fb"}},{"code_sha256_prefix":"06a3ad042b36b928","entry":"namespace_to_dict","repo":"CompVis/zigma","repo_kind":"official","path":"wandb_utils.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/wandb_utils.py","link_basis":"harvester_set","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":"06a3ad042b36b928"}},{"code_sha256_prefix":"a5e3d9618aac5205","entry":"t2i_modulate","repo":"CompVis/zigma","repo_kind":"official","path":"model_zigma.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/model_zigma.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"a5e3d9618aac5205"}},{"code_sha256_prefix":"887e16a203fee3e4","entry":"update_note","repo":"CompVis/zigma","repo_kind":"official","path":"train_acc.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/train_acc.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":"887e16a203fee3e4"}},{"code_sha256_prefix":"b6159b54fe35ce26","entry":"crop","repo":"CompVis/zigma","repo_kind":"official","path":"datasets/video_utils.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/datasets/video_utils.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":"b6159b54fe35ce26"}},{"code_sha256_prefix":"50a84404aceceeb8","entry":"out2img","repo":"CompVis/zigma","repo_kind":"official","path":"train_acc.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/train_acc.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":"50a84404aceceeb8"}},{"code_sha256_prefix":"f1f9c7dfbe0b3105","entry":"resize","repo":"CompVis/zigma","repo_kind":"official","path":"datasets/video_utils.py","file_url":"https://github.com/CompVis/zigma/blob/HEAD/datasets/video_utils.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":"f1f9c7dfbe0b3105"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}