Papers › MaskGIT: Masked Generative Image Transformer

MaskGIT: Masked Generative Image Transformer

8 Feb 2022CVPR 2022 1arXiv:2202.04200archive 2025-07-28

Huiwen Chang, Han Zhang, Lu Jiang, Ce Liu, William T. Freeman

Generative transformers have experienced rapid popularity growth in the computer vision community in synthesizing high-fidelity and high-resolution images. The best generative transformer models so far, however, still treat an image naively as a sequence of tokens, and decode an image sequentially following the raster scan ordering (i.e. line-by-line). We find this strategy neither optimal nor efficient. This paper proposes a novel image synthesis paradigm using a bidirectional transformer decoder, which we term MaskGIT. During training, MaskGIT learns to predict randomly masked tokens by attending to tokens in all directions. At inference time, the model begins with generating all tokens of an image simultaneously, and then refines the image iteratively conditioned on the previous generation. Our experiments demonstrate that MaskGIT significantly outperforms the state-of-the-art transformer model on the ImageNet dataset, and accelerates autoregressive decoding by up to 64x. Besides, we illustrate that MaskGIT can be easily extended to various image editing tasks, such as inpainting, extrapolation, and image manipulation.

PaperPDFConference PDFCodeCode Syntology ran

In Syntology Open this paper in Syntology's Atlas, the map of the papers in Syntology's graph and their citations.

For agents, Syntology's MCP tool lists every function and class Syntology harvested from this paper and whether it ran (how to connect): get_harvested_code_for_paper(arxiv_id="2202.04200")

Code

Syntology Ran 14 of 21 code samples harvested from 5 repositories linked to this paper; 7 have no recorded run. Of those that ran: 3 ran · our draft was wrong; 11 ran with no contract checked.

By repository: community (archive-listed): 21 samples from 5 repositories, 14 ran. The run record, sample by sample. “Ran” means executed on a synthesized input, not that the code is correct or reproduces the paper.

google-research/maskgit officialmentioned on GitHubjaxApache-2.0 report
HKUNLP/Dream mentioned on GitHubpytorch report
LAION-AI/phenaki mentioned on GitHubpytorch report
alibaba/graph-gpt mentioned on GitHubpytorch report
dome272/MaskGIT-pytorch mentioned on GitHubpytorch report
lucidrains/phenaki-pytorch mentioned on GitHubpytorch report
lucidrains/soundstorm-pytorch mentioned on GitHubpytorch report
myscience/open-genie mentioned on GitHubpytorchMIT report
valeoai/maskgit-pytorch mentioned on GitHubpytorch report

Repository list and official/mentioned flags are the archive's, frozen 2025-07-28. Reachability, where shown, is from one Syntology probe window (2026-09-16 to 2026-09-18); repositories not probed show nothing. GitHub stars are not tracked.

Code Syntology ran Syntology

21 samples harvested; 14 ran; 0 honoured the contract we drafted; 7 have no recorded run. Read from Syntology's graph 2026-09-24; that is when this build read the record, not when the samples ran.

3ran · our draft was wrong
11ran
7unverified

Licence: 4 of the 21 samples are pointer only, meaning Syntology does not serve that copy's text. This page shows no code text for any sample; each one links to its file in the repository.

Harvested from 5 repositories linked to this paper, official or community; each sample names its own and says which. “Ran” means the sample executed on a synthesized input. It does not mean the output is correct, and nothing here reproduces the paper's results. “Honoured” and “violated” refer to a contract Syntology drafted from the code itself; “our draft was wrong” and “fixture could not drive it” are failures of Syntology's instrument, not of the code.

Each sample ends with its code_sha256, Syntology's identity for that exact code. An agent fetches the stored sample with Syntology's MCP tool get_code(code_sha256="…") (how to connect); click an identity to copy that call.

Repository labels, per sample. official repository: The archive marks this repository official for the paper. named in the paper: The archive records that the paper mentions this repository; it is not marked official. community (archive-listed): In the archive's code links for this paper, not marked official and not recorded as mentioned in the paper. found in paper text by Syntology: 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. Samples from a repository marked official are listed first. Licence labels name the repository's licence as recorded at harvest. “Pointer only” means Syntology does not serve that copy's text, for one of four reasons: no licence file was found; the licence was not identified; the licence is recorded as permissive but that copy's record is not marked cleared; or the licence is outside the permissive list Syntology serves text under (MIT, Apache-2.0, BSD and similar). Some licences outside that list permit redistribution, such as WTFPL, and GPL-3.0 under its conditions; they are simply not on the list. Hover a licence label for the reason. File links open the file on GitHub at the default branch, which may have changed since the harvest.

AdaNorm valeoai/maskgit-pytorch/Network/transformer.py community (archive-listed) ran MIT (permissive) · db6abd243470c35a · report
Attention valeoai/maskgit-pytorch/Network/transformer.py community (archive-listed) ran MIT (permissive) · 7fd4e0ce7bd6b27f · report
Attention LAION-AI/phenaki/maskgit.py community (archive-listed) ran no licence file found · pointer only · 7e79dc89343596b8 · report
Block valeoai/maskgit-pytorch/Network/transformer.py community (archive-listed) ran MIT (permissive) · c1c45512a825fc3b · report
ContinuousPositionBias lucidrains/phenaki-pytorch/phenaki_pytorch/phenaki_pytorch.py community (archive-listed) ran · metamorphic tier: deterministic MIT (permissive) · 220f01cece0c0d8b · report
Encoder dome272/MaskGIT-pytorch/bidirectional_transformer.py community (archive-listed) ran MIT (permissive) · 6ee8c0748ff579f0 · report
FeedForward valeoai/maskgit-pytorch/Network/transformer.py community (archive-listed) ran MIT (permissive) · 9bdc5ed60c59ed33 · report
FeedForward LAION-AI/phenaki/maskgit.py community (archive-listed) ran · our draft was wrong no licence file found · pointer only · 37eef98f3b06bc78 · report
QKNorm valeoai/maskgit-pytorch/Network/transformer.py community (archive-listed) ran MIT (permissive) · 3c34ec2ff05d28fd · report
RMSNorm valeoai/maskgit-pytorch/Network/transformer.py community (archive-listed) ran MIT (permissive) · 86a159a05ae09375 · report
Transformer LAION-AI/phenaki/maskgit.py community (archive-listed) ran no licence file found · pointer only · c86e4af300cafb7a · report
_batch_unmask_without_for_loop alibaba/graph-gpt/src/utils/generation_utils.py community (archive-listed) ran · our draft was wrong MIT (permissive) · 93bc9d37c053dcd3 · report
leaky_relu lucidrains/phenaki-pytorch/phenaki_pytorch/phenaki_pytorch.py community (archive-listed) ran · our draft was wrong MIT (permissive) · f11bef5e87ce3904 · report
sample_tokens alibaba/graph-gpt/src/utils/generation_utils.py community (archive-listed) ran MIT (permissive) · 3028b4a113e4e8f8 · report
BidirectionalTransformer dome272/MaskGIT-pytorch/bidirectional_transformer.py community (archive-listed) unverified MIT (permissive) · b3029d867f4bb08d · report
GenerationConfig alibaba/graph-gpt/src/utils/generation_utils.py community (archive-listed) unverified MIT (permissive) · def2e2196cd17208 · report
MaskGit lucidrains/phenaki-pytorch/phenaki_pytorch/phenaki_pytorch.py community (archive-listed) unverified MIT (permissive) · d683bf3267136071 · report
MaskGit LAION-AI/phenaki/maskgit.py community (archive-listed) unverified no licence file found · pointer only · 78ffd63b86b6fe34 · report
Transformer valeoai/maskgit-pytorch/Network/transformer.py community (archive-listed) unverified MIT (permissive) · d14b816d459cd10d · report
TransformerEncoder valeoai/maskgit-pytorch/Network/transformer.py community (archive-listed) unverified MIT (permissive) · ae6080e4032dcb9a · report
weights_init dome272/MaskGIT-pytorch/bidirectional_transformer.py community (archive-listed) unverified MIT (permissive) · 323141756998f1c6 · report

Tasks

DecoderImage GenerationImage ManipulationImage OutpaintingImage ReconstructionText-to-Image Generation

Results from the paper archive 2025-07-28

TaskDatasetModelMetricValueRank at snapshotLeaderboardReport
Image Generation ImageNet 256x256 MaskGIT (a=0.05) FID 4.02 #80 of 94 Archive leaderboard report
Image Generation ImageNet 256x256 MaskGIT FID 6.18 #89 of 94 Archive leaderboard report
Image Generation ImageNet 512x512 MaskGIT (a=0.05) FID 4.46 #49 of 52 Archive leaderboard report
Image Generation ImageNet 512x512 MaskGIT (a=0.05) Inception score 342.0 #49 of 52 Archive leaderboard report
Image Generation ImageNet 512x512 MaskGIT FID 7.32 #51 of 52 Archive leaderboard report
Image Generation ImageNet 512x512 MaskGIT Inception score 156.0 #51 of 52 Archive leaderboard report
Image Outpainting LHQC MaskGIT Block-FID (Right Extend) 14.68 #3 of 4 Archive leaderboard report
Image Outpainting LHQC MaskGIT Block-FID (Down Extend) 25.57 #3 of 4 Archive leaderboard report
Image Outpainting LHQC MaskGIT Block-FID (Left Extend) 14.81 #3 of 4 Archive leaderboard report
Image Outpainting LHQC MaskGIT Block-FID (Up Extend) 25.38 #3 of 4 Archive leaderboard report
Image Reconstruction ImageNet MaskGIT-VQGAN (16x16) FID 2.28 #13 of 15 Archive leaderboard report
Text-to-Image Generation LHQC MaskGIT Block-FID 24.33 #2 of 3 Archive leaderboard report

Ranks are positions in the archive's leaderboards as they stood at the 2025-07-28 snapshot. Results published since then are not among these rows, so a rank here is not a current standing.

Report a problem or propose a change · a person checks every report against the paper or source before anything changes; decisions are listed on /corrections