← Latest papers
💻 computer science

MRT: Masked Region Transformer for Layered Image Generation and Editing at Scale

This paper introduces MRT, a 20B-parameter masked region diffusion model trained on 10M samples that unifies text-to-layers, image-to-layers, and layers-to-layers tasks to achieve state-of-the-art, real-time, multi-layer transparent image generation and editing with superior quality and efficiency compared to existing commercial and concurrent systems.

Original authors: Zhicong Tang, Zhao Zhang, Jingye Chen, Mohan Zhou, Yifan Pu, Yuchi Liu, Yalong Bai, Ethan Smith, Yuhui Yuan

Published 2026-05-27
📖 5 min read🧠 Deep dive

Original authors: Zhicong Tang, Zhao Zhang, Jingye Chen, Mohan Zhou, Yifan Pu, Yuchi Liu, Yalong Bai, Ethan Smith, Yuhui Yuan

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a digital photo editor, like Photoshop, where you can work with separate "layers." You can move a text box, change a background, or swap out an icon without messing up the rest of the picture. Now, imagine an AI that doesn't just make a flat, finished picture, but builds that picture layer by layer, just like a human designer does.

That is exactly what the paper "MRT: Masked Region Transformer" is about. Here is a simple breakdown of what they built and how it works, using some everyday analogies.

The Big Problem: The "Flat Cake" vs. The "Layered Cake"

Most AI image generators today are like bakers who only make flat cakes. They give you a finished image, but if you want to change the cherry on top, you have to repaint the whole cake. You can't easily move the cherry or change the frosting without ruining the sponge.

The researchers wanted an AI that bakes a layered cake. They wanted a system that generates the sponge, the filling, the frosting, and the cherries as separate, movable pieces that can be edited later. This is called "Layered Image Generation."

The Solution: MRT (The Master Chef)

The team from Canva Research built a massive AI model called MRT (Masked Region Transformer). Think of it as a Master Chef who has studied over 10 million different graphic designs (posters, flyers, ads) to learn how to build these layered cakes from scratch.

Here are the three main "superpowers" this chef has:

1. The "Magic Recipe" (Text-to-Layers)

You can give the AI a text description, like "A poster for a disco party with a glowing ball and a '20% OFF' sign."

  • Old AI: Would draw a flat picture of a disco.
  • MRT: Draws the background, the disco ball, and the text as separate, transparent layers. You can take the text layer and move it to the left, or change the disco ball to a star, and the rest of the poster stays perfect.

2. The "Reverse Engineer" (Image-to-Layers)

This is like taking a finished, flat cake and magically separating it back into its ingredients.

  • The Task: You upload a flat image (like a screenshot of a website or a poster).
  • MRT's Job: It figures out what belongs to the background, what is the text, and what are the pictures. It then "peels" them apart into separate, editable layers.
  • The Trick: The paper claims this works incredibly well, even on complex designs with many overlapping items, and it's much faster and more accurate than other tools currently available.

3. The "Mix-and-Match" (Layers-to-Layers)

This is the editing part. You can give the AI a design and say, "Add a new layer here" or "Change the style of this specific layer to match the rest."

  • Example: You have a poster with a blue sky. You want to add a new sun. MRT adds the sun in a way that fits the lighting and style of the existing sky perfectly. Or, you upload a photo of a cat and say, "Make this cat look like a cartoon sticker that fits this poster." MRT does the transformation instantly.

The Secret Sauce: How They Did It

1. The "Overflow" Trick (The Big Canvas)
Usually, when AI draws a picture, it cuts off anything that goes outside the frame (like a tree branch sticking out the side of a photo).

  • MRT's Innovation: They taught the AI to draw on a giant, invisible canvas that is bigger than the final picture. This allows elements to "overflow" the edges.
  • Why it matters: If you want to move that overflowing tree branch to the other side of the poster later, the AI has the whole branch saved, not just the part that was visible. It keeps the pieces whole and editable.

2. The "Masking" Game
Imagine you are playing a game where you have to guess what's under a blanket.

  • Text-to-Layers: The AI starts with a blank, noisy canvas (like static on an old TV) and fills in the layers.
  • Image-to-Layers: The AI is given the finished picture (the blanket is lifted) but is told to "mask" (cover up) the background and the text, then "re-draw" just those specific parts to separate them.
  • By using this "masking" technique, the same AI brain can handle writing from scratch, taking things apart, and editing things, all at once.

3. Speeding It Up (The "Distillation")
Normally, generating a complex layered image takes a long time (like waiting for a slow computer to render).

  • The researchers used a technique called distillation. Think of this as a master chef (the slow, perfect teacher) teaching an apprentice (the fast student) how to cook the same dish in 8 steps instead of 50.
  • Result: The AI can now generate these complex, layered designs in real-time (about 3 to 6 seconds) without losing much quality.

The Results

The paper compares MRT to other top AI models and commercial tools.

  • Quality: In user tests, people preferred MRT's results over other systems because the layers were cleaner, the text was better, and the pieces fit together more naturally.
  • Speed: It is 10 to 100 times faster than a competing model called "Qwen-Image-Layered" when breaking down complex images.
  • Memory: It uses significantly less computer memory, meaning it can run on standard powerful graphics cards without crashing.

In Summary

The paper presents a tool that treats digital images not as static paintings, but as editable Lego sets. It can build these sets from a text description, take apart a finished picture to reveal the Lego bricks, or swap out bricks to change the design—all while keeping the pieces whole, even if they stick out the edges of the box.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →