EditMGT: Unleashing Potentials of Masked Generative Transformers in Image Editing

Wei Chow, Linfeng Li, Lingdong Kong, Zefeng Li, Qi Xu, Hang Song, Tian Ye, Xian Wang, Jinbin Bai, Shilin Xu, Xiangtai Li, Junting Pan, Shaoteng Liu, Ran Zhou, Tianshu Yang, Songhua Liu

Abstract

EditMGT is a novel image editing framework that leverages Masked Generative Transformers (MGTs) to provide a faster and more precise alternative to standard Diffusion Models (DMs). By utilizing the discrete "token flipping" nature of MGTs and a multi-layer attention consolidation scheme, EditMGT eliminates "edit leakage"—unintended changes to non-target areas—while running up to 6x faster than state-of-the-art diffusion-based models. With only 960M parameters, EditMGT achieves superior performance in localized editing and instruction following.

Introduction

The current landscape of image editing is dominated by Diffusion Models. However, these models suffer from a fundamental limitation: their denoising process is global. When a user requests a localized change, such as "adding a hat to a dog," the model often re-processes the entire image, leading to subtle but undesirable alterations in the background or the subject's texture. This phenomenon, known as "edit leakage," typically requires manual masking or computationally expensive inversion techniques to mitigate.

EditMGT proposes a shift toward Masked Generative Transformers. Unlike DMs, which refine continuous noise, MGTs predict discrete visual tokens. This inherent property allows for "localized decoding," where the boundary between edited and preserved regions is mathematically explicit.

Methodology

EditMGT adapts a pre-trained text-to-image MGT (specifically Meissonic) for high-precision editing through three primary innovations:

  1. Attention Injection: The framework adapts the pre-trained model without adding new parameters. It treats the original image as a conditional signal, using a bias term to balance the influence of the source image against the new text instructions.
  2. Multi-layer Attention Consolidation: To overcome the noise present in raw transformer attention maps, EditMGT aggregates cross-attention signals from specific deep layers (blocks 28–36). An adaptive filtering process then sharpens these signals into a precise localization map.
  3. Region-hold Sampling: This mechanism prevents leakage by identifying "low-attention" regions during the iterative generation process. Tokens in these areas are explicitly flipped back to their original state, ensuring that non-target pixels remain identical to the source.
The EditMGT architecture featuring multi-modal and single-modal transformer blocks.

Data and Evaluation

To support the training of such a precise model, the authors introduced CrispEdit-2M, a high-resolution (≥1024px) dataset containing 2 million samples. This dataset covers diverse editing tasks including additions, removals, style transformations, and motion modifications. In total, the model was trained on a mixture of 4 million samples.

Evaluation was conducted across four major benchmarks: EMU Edit, MagicBrush, AnyBench, and GEdit-EN-full. The results demonstrated that EditMGT not only matches or exceeds the quality of much larger models but does so with significantly higher efficiency.

Key Results

EditMGT demonstrates a significant leap in both speed and accuracy:

  • Efficiency: The model performs 1024x1024 resolution edits in approximately 2 seconds, making it 6x faster than high-performing baselines like FluxKontext.
  • Compactness: At 960M parameters, it is 2x to 8x smaller than many competing 7B-12B parameter models.
  • Performance: On the GEdit-EN-full benchmark, EditMGT outperformed the 12B-parameter FluxKontext in style transfer by 17.6% and showed superior comprehension of complex semantic instructions.
Editing results from EditMGT alongside performance benchmarks for speed, score, and dataset scale.

Conclusion

EditMGT proves that Masked Generative Transformers are naturally suited for localized image editing. By moving away from global denoising and toward discrete token manipulation, the framework achieves high-fidelity results without the need for manual masks. While the model currently inherits some stylistic biases from its foundation model, future scaling of training data and integration of more powerful text encoders promise even greater generalization and creative potential.

Summary updated

BibTeX
@inproceedings{chow2026editmgt,
  author = {Wei Chow and Linfeng Li and Lingdong Kong and Zefeng Li and Qi Xu and Hang Song and Tian Ye and Xian Wang and Jinbin Bai and Shilin Xu and Xiangtai Li and Junting Pan and Shaoteng Liu and Ran Zhou and Tianshu Yang and Songhua Liu},
  title = {{EditMGT: Unleashing Potentials of Masked Generative Transformers in Image Editing}},
  booktitle = {IEEE/CVF Conference on Computer Vision and Pattern Recognition},
  year = {2026},
  url = {https://openreview.net/forum?id=aQMAJgT9vA},
}
Figure