{"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/muse-text-to-image-generation-via-masked","title":"Muse: Text-To-Image Generation via Masked Generative Transformers","arxiv_id":"2301.00704","date":"2023-01-02","proceeding":null,"authors":["Huiwen Chang","Han Zhang","Jarred Barber","AJ Maschinot","Jose Lezama","Lu Jiang","Ming-Hsuan Yang","Kevin Murphy","William T. Freeman","Michael Rubinstein","Yuanzhen Li","Dilip Krishnan"],"abstract":"We present Muse, a text-to-image Transformer model that achieves state-of-the-art image generation performance while being significantly more efficient than diffusion or autoregressive models. Muse is trained on a masked modeling task in discrete token space: given the text embedding extracted from a pre-trained large language model (LLM), Muse is trained to predict randomly masked image tokens. Compared to pixel-space diffusion models, such as Imagen and DALL-E 2, Muse is significantly more efficient due to the use of discrete tokens and requiring fewer sampling iterations; compared to autoregressive models, such as Parti, Muse is more efficient due to the use of parallel decoding. The use of a pre-trained LLM enables fine-grained language understanding, translating to high-fidelity image generation and the understanding of visual concepts such as objects, their spatial relationships, pose, cardinality etc. Our 900M parameter model achieves a new SOTA on CC3M, with an FID score of 6.06. The Muse 3B parameter model achieves an FID of 7.88 on zero-shot COCO evaluation, along with a CLIP score of 0.32. Muse also directly enables a number of image editing applications without the need to fine-tune or invert the model: inpainting, outpainting, and mask-free editing. More results are available at https://muse-model.github.io","url_abs":"https://arxiv.org/abs/2301.00704v1","url_pdf":"https://arxiv.org/pdf/2301.00704v1.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":"muse-text-to-image-generation-via-masked","repo_url":"https://github.com/baaivision/muse-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}},{"paper_slug":"muse-text-to-image-generation-via-masked","repo_url":"https://github.com/huggingface/amused","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"pytorch","reach":null},{"paper_slug":"muse-text-to-image-generation-via-masked","repo_url":"https://github.com/huggingface/open-muse","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":1,"framework":"jax","reach":null},{"paper_slug":"muse-text-to-image-generation-via-masked","repo_url":"https://github.com/Qiyuan-Ge/PaintMind","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":null},{"paper_slug":"muse-text-to-image-generation-via-masked","repo_url":"https://github.com/lucidrains/muse-pytorch","is_official":0,"mentioned_in_paper":0,"mentioned_in_github":0,"framework":"pytorch","reach":{"status":"ok","spdx":"MIT"}}],"tasks":[{"task_slug":"image-generation","task_name":"Image Generation"},{"task_slug":"language-modelling","task_name":"Language Modelling"},{"task_slug":"large-language-model","task_name":"Large Language Model"},{"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"}],"methods":[{"method_slug":"absolute-position-encodings","method_name":"Absolute Position Encodings"},{"method_slug":"adam","method_name":"Adam"},{"method_slug":"attention","method_name":"Attention"},{"method_slug":"bpe","method_name":"BPE"},{"method_slug":"clip","method_name":"CLIP"},{"method_slug":"dense-connections","method_name":"Dense Connections"},{"method_slug":"diffusion","method_name":"Diffusion"},{"method_slug":"dropout","method_name":"Dropout"},{"method_slug":"label-smoothing","method_name":"Label Smoothing"},{"method_slug":"layer-normalization","method_name":"Layer Normalization"},{"method_slug":"linear-layer","method_name":"Linear Layer"},{"method_slug":"multi-head-attention","method_name":"Multi-Head Attention"},{"method_slug":"position-wise-feed-forward-layer","method_name":"Position-Wise Feed-Forward Layer"},{"method_slug":"residual-connection","method_name":"Residual Connection"},{"method_slug":"softmax","method_name":"Softmax"},{"method_slug":"transformer","method_name":"Transformer"}],"datasets_introduced":[],"methods_introduced":[],"results":[{"leaderboard":"/sota/text-to-image-generation-on-ms-coco","task":"Text-to-Image Generation","dataset":"MS-COCO","model":"Muse-3B (zero-shot)","rank_in_archive_order":2,"of":2,"metrics":{"FID":"7.88"},"uses_additional_data":false}],"syntology":{"syntology_url":null,"atlas_url":"https://app.syntology.ai/?focus=2301.00704","mcp":{"get_harvested_code_for_paper":{"arxiv_id":"2301.00704"}},"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/baaivision/muse-pytorch","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/lucidrains/muse-pytorch","reach":{"status":"ok","spdx":"MIT"}},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/huggingface/open-muse","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/Qiyuan-Ge/PaintMind","reach":null},{"provenance":"external:paperswithcode_snapshot_2025-07-28","url":"https://github.com/huggingface/amused","reach":null}],"summary":{"ran_honours":2,"ran_draft_wrong":10,"ran_violates":5,"ran_fixture":1,"unverified":3},"by_repo_kind":{"listed":{"samples":14,"ran":11,"repositories":4}},"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":9,"samples":[{"code_sha256_prefix":"7f1040f5e3991d5e","entry":"identity","repo":"lucidrains/muse-pytorch","repo_kind":"listed","path":"muse_maskgit_pytorch/trainers.py","file_url":"https://github.com/lucidrains/muse-pytorch/blob/HEAD/muse_maskgit_pytorch/trainers.py","link_basis":"harvester_set","language":"python","status":"ran_honours","verification_level":2,"contract_check":"HONOURS","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"7f1040f5e3991d5e"}},{"code_sha256_prefix":"35a0e57cdda9e212","entry":"LSimple","repo":"baaivision/muse-pytorch","repo_kind":"listed","path":"train_t2i_discrete_muse.py","file_url":"https://github.com/baaivision/muse-pytorch/blob/HEAD/train_t2i_discrete_muse.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"35a0e57cdda9e212"}},{"code_sha256_prefix":"9ef9985f5609c318","entry":"add_gumbel_noise","repo":"baaivision/muse-pytorch","repo_kind":"listed","path":"libs/muse.py","file_url":"https://github.com/baaivision/muse-pytorch/blob/HEAD/libs/muse.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"9ef9985f5609c318"}},{"code_sha256_prefix":"8241c0562bc710fd","entry":"chunk","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"8241c0562bc710fd"}},{"code_sha256_prefix":"60fff7c3c400d7ff","entry":"default","repo":"lucidrains/muse-pytorch","repo_kind":"listed","path":"muse_maskgit_pytorch/muse_maskgit_pytorch.py","file_url":"https://github.com/lucidrains/muse-pytorch/blob/HEAD/muse_maskgit_pytorch/muse_maskgit_pytorch.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"60fff7c3c400d7ff"}},{"code_sha256_prefix":"fbf9ec7be545688e","entry":"default","repo":"Qiyuan-Ge/PaintMind","repo_kind":"listed","path":"paintmind/generate.py","file_url":"https://github.com/Qiyuan-Ge/PaintMind/blob/HEAD/paintmind/generate.py","link_basis":"first_harvest_node","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":"fbf9ec7be545688e"}},{"code_sha256_prefix":"af6cdb4b6a4b5860","entry":"encode_prompt","repo":"huggingface/amused","repo_kind":"listed","path":"training/train_amused.py","file_url":"https://github.com/huggingface/amused/blob/HEAD/training/train_amused.py","link_basis":"first_harvest_node","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"af6cdb4b6a4b5860"}},{"code_sha256_prefix":"c16aee9490eb8729","entry":"eval_decorator","repo":"lucidrains/muse-pytorch","repo_kind":"listed","path":"muse_maskgit_pytorch/muse_maskgit_pytorch.py","file_url":"https://github.com/lucidrains/muse-pytorch/blob/HEAD/muse_maskgit_pytorch/muse_maskgit_pytorch.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"c16aee9490eb8729"}},{"code_sha256_prefix":"aa5486a3650902d8","entry":"exists","repo":"lucidrains/muse-pytorch","repo_kind":"listed","path":"muse_maskgit_pytorch/attend.py","file_url":"https://github.com/lucidrains/muse-pytorch/blob/HEAD/muse_maskgit_pytorch/attend.py","link_basis":"harvester_set","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"aa5486a3650902d8"}},{"code_sha256_prefix":"608e364a9d2376a3","entry":"exists","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"608e364a9d2376a3"}},{"code_sha256_prefix":"ef8d9a0b717d3cb0","entry":"flatten_omega_conf","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"ef8d9a0b717d3cb0"}},{"code_sha256_prefix":"e88526ab8fc3ebc4","entry":"make_attention_mask","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"e88526ab8fc3ebc4"}},{"code_sha256_prefix":"4fd2dac3028a4e1f","entry":"mask_schedule","repo":"Qiyuan-Ge/PaintMind","repo_kind":"listed","path":"paintmind/generate.py","file_url":"https://github.com/Qiyuan-Ge/PaintMind/blob/HEAD/paintmind/generate.py","link_basis":"first_harvest_node","language":"python","status":"ran_violates","verification_level":1,"contract_check":"VIOLATES","metamorphic_tier":"well_formed","behaviour_fingerprint":true,"licence":"Apache-2.0","inline_ok":true,"mcp_get_code":{"code_sha256":"4fd2dac3028a4e1f"}},{"code_sha256_prefix":"52e10a7d6b0fa036","entry":"once","repo":"lucidrains/muse-pytorch","repo_kind":"listed","path":"muse_maskgit_pytorch/attend.py","file_url":"https://github.com/lucidrains/muse-pytorch/blob/HEAD/muse_maskgit_pytorch/attend.py","link_basis":"harvester_set","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"OUTPUT_MISDECLARED","metamorphic_tier":null,"behaviour_fingerprint":false,"licence":"MIT","inline_ok":true,"mcp_get_code":{"code_sha256":"52e10a7d6b0fa036"}},{"code_sha256_prefix":"162f6eae613812c6","entry":"prob_mask_like","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_fixture","verification_level":1,"contract_check":"RAISES","metamorphic_tier":"deterministic","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"162f6eae613812c6"}},{"code_sha256_prefix":"d8437c41cc2a860f","entry":"soft_target_cross_entropy","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"invariant","behaviour_fingerprint":true,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"d8437c41cc2a860f"}},{"code_sha256_prefix":"e63f8661cb0af2c8","entry":"tokenize_prompt","repo":"huggingface/amused","repo_kind":"listed","path":"training/train_amused.py","file_url":"https://github.com/huggingface/amused/blob/HEAD/training/train_amused.py","link_basis":"first_harvest_node","language":"python","status":"ran_honours","verification_level":1,"contract_check":"HONOURS","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":"NONE","inline_ok":false,"mcp_get_code":{"code_sha256":"e63f8661cb0af2c8"}},{"code_sha256_prefix":"66e51521e0875290","entry":"uniform","repo":null,"repo_kind":null,"path":null,"file_url":null,"link_basis":"identical_code_first_harvested_elsewhere","language":"python","status":"ran_draft_wrong","verification_level":1,"contract_check":"MISDECLARED","metamorphic_tier":"well_formed","behaviour_fingerprint":false,"licence":null,"inline_ok":false,"mcp_get_code":{"code_sha256":"66e51521e0875290"}},{"code_sha256_prefix":"3474c6be94998255","entry":"find_index","repo":"lucidrains/muse-pytorch","repo_kind":"listed","path":"muse_maskgit_pytorch/trainers.py","file_url":"https://github.com/lucidrains/muse-pytorch/blob/HEAD/muse_maskgit_pytorch/trainers.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":"3474c6be94998255"}},{"code_sha256_prefix":"feff9391629f5643","entry":"get_model","repo":"lucidrains/muse-pytorch","repo_kind":"listed","path":"muse_maskgit_pytorch/t5.py","file_url":"https://github.com/lucidrains/muse-pytorch/blob/HEAD/muse_maskgit_pytorch/t5.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":"feff9391629f5643"}},{"code_sha256_prefix":"cbdf413e88112af9","entry":"get_tokenizer","repo":"lucidrains/muse-pytorch","repo_kind":"listed","path":"muse_maskgit_pytorch/t5.py","file_url":"https://github.com/lucidrains/muse-pytorch/blob/HEAD/muse_maskgit_pytorch/t5.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":"cbdf413e88112af9"}}]},"arxiv_metadata":null,"syntology_extracted_results":null}