Papers
Topics
Authors
Recent
Search
2000 character limit reached

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

Published 26 May 2026 in cs.CV | (2605.27235v1)

Abstract: Layered image generation and editing is a fundamental capability that enables layer-wise reuse, editing, and composition of generated visual content, analogous to word-level editing in natural language. Despite its importance, this remains an underexplored area at scale. To address this gap, we present MRT, a 20B-parameter masked region diffusion model tailored for multi-layer transparent image generation and editing, trained on over 10M multilingual design samples spanning diverse aspect ratios and textual prompts. To fully leverage this scale, we make two key technical contributions. First, we unify three complementary tasks including text-to-layers, image-to-layers, and layers-to-layers within a shared masked region diffusion framework, where selective token masking enables flexible layer-wise generation and editing. Second, to enable overflow layer generation, we introduce an overflow-aware canvas layer that handles boundary inconsistencies and supports semi-transparent background synthesis, enabling complete editable layers extending beyond visible canvas boundaries. Additionally, we apply diffusion distillation to achieve 8-step, real-time multi-layer generation with minimal quality degradation. Extensive experiments demonstrate that our framework substantially outperforms prior state-of-the-art approaches, including various commercial systems, across all three tasks, establishing a new benchmark for multi-layer transparent image generation. Notably, our model significantly outperforms the concurrent Qwen-Image-Layered model in image-to-layers quality according to user-study results, while achieving 10-100\times faster inference and reducing activation GPU memory consumption by 50-90\% during image-to-layer inference.

Summary

  • The paper introduces a unified masked region diffusion transformer for scalable layered image generation and editing.
  • It efficiently handles overflow elements with full-sized canvas layers and uses distribution matching distillation for real-time performance.
  • Empirical results demonstrate superior quality, speed, and memory usage compared to existing models through comprehensive evaluations.

Masked Region Transformer for Scalable Layered Image Generation and Editing

Dataset Construction and Analysis

MRT leverages a meticulously curated in-house dataset of over 10 million multi-layer graphic designs, each created by professional designers and encompassing diverse resolutions, aspect ratios, and multilingual text layers. This dataset provides ground-truth typography and complete transparent layer annotations, supporting overflow elements that extend beyond canvas boundaries—a property missing from prior datasets and critical for practical editability and reusability. Figure 1

Figure 1: Distribution statistics for layer counts, languages, layer types, visual tokens (with and without overflow), and aspect ratios across the dataset.

Overflow layer generation is highlighted, revealing that over 60% of samples contain such elements—necessitating architectural designs capable of preserving complete editability. The layered data include full-size RGBA layers for every visual element, paired with bilingual captions for compositional guidance.

Unified Masked Region Diffusion Transformer Architecture

The proposed Masked Region Transformer (MRT) is a 20B-parameter diffusion model based on Qwen-Image, supporting flexible multi-layer generation and editing through task-specific token masking within a shared regional diffusion transformer. MRT unifies three major tasks:

  • Text-to-Layers: Synthesis of transparent RGBA layers from language prompt, using noise-injected latents for all layers except a transparent canvas.
  • Image-to-Layers: Decomposition of raster images into transparent layers guided by bounding box layouts (auto-detected or annotated), with masking applied to the latent global image representation and diffusion restricted to layer tokens.
  • Layers-to-Layers: Layer addition and restylization, where diffusion applies only to target latents for newly generated or restylized layers, conditioned on existing masked layer tokens and optionally visual references.

This framework enables iterative, task-conditioned layer-wise editing, fully supporting overflow layers and semi-transparent backgrounds. Key innovations include modular masking for cross-attention and regional tokenization over the full canvas. Figure 2

Figure 2: Visualization of overflow layer support. Overflow-aware generation preserves pixel content outside the background boundary and enables complete layer editability.

Figure 3

Figure 3: Unified Masked Region Transformer: Text-to-layers, image-to-layers, and layers-to-layers are all addressed by selective latent masking within a regional diffusion transformer.

Technical Contributions

Overflow-Aware Canvas Layer

Previous systems truncate visual elements at the canvas edge, limiting layer editability. MRT introduces full-size canvas layers with semi-transparent backgrounds, extending the layer generation to support overflow elements, maintaining complete layer integrity and placement flexibility. Training with overflow data incurs minimal performance cost but achieves significantly higher editability. Figure 4

Figure 4: Overflow layer generation enables editing and reuse of elements that extend across background boundaries.

Accelerated Generation via Distribution Matching Distillation

MRT exploits improved Distribution Matching Distillation (DMD) to compress its multi-step diffusion model into an 8-step student generator, offering real-time multi-layer generation (up to 6× speedup) without quality compromise. The distilled model maintains comparable FID, PSNR, and SSIM to the baseline, supporting interactive graphics design applications. Figure 5

Figure 5: Comparison of baseline and distilled few-step models. Distillation achieves efficient generation with negligible quality loss.

Inference Efficiency and Scalability

MRT achieves substantial computational efficiency relative to Qwen-Image-Layered. It maintains near-constant latency as the number of layers increases, realizing up to 108.5× speedup for 20+ layers and 10.5×–23.6× reductions in GPU memory consumption. Unlike competing models, it tokenizes only spatially relevant regions, enhancing scalability. Figure 6

Figure 6: MRT’s inference speed and memory usage scales favorably with number of layers and tokens, outperforming the Qwen-Image-Layered baseline.

Experimental Results

Quantitative Performance

MRT demonstrates strong numerical superiority over the concurrent Qwen-Image-Layered on multiple benchmarks:

  • Text-to-Layers: MRT achieves higher user preferences on instruction following, aesthetics, and layer quality.
  • Image-to-Layers: MRT outperforms LayerD, Lovart, RoboNeo, and Qwen-Image-Layered, achieving higher PSNR, SSIM, and user study win rates (79.5%, 68.9%, 82.6%) for layer quality, integrity, and granularity, respectively. MRT maintains superior performance at increased layer counts. Figure 7

    Figure 7: User study showing MRT’s dominance over ART for text-to-layer generation across multiple dimensions.

    Figure 8

    Figure 8: User study comparison with Qwen-Image-Layered on image-to-layers, demonstrating advantages in editability and decomposition quality.

    Figure 9

    Figure 9: Example text-to-layers generations—showing GMT’s ability to synthesize complex hierarchical layer compositions.

    Figure 10

    Figure 10: Image-to-layers results for Nano-Banana-Pro datasets, highlighting qualitative improvements compared to Qwen-Image-Layered.

Qualitative Analysis

MRT successfully decomposes flat and complex designs into appropriately granular, clean, and reusable RGBA layers. Overflow support generates full visual elements, overcoming cropping limitations. The model generalizes to out-of-domain images and natural scenes, maintaining fidelity and semantic segmentation. Figure 11

Figure 11: Comparative image-to-layer decompositions—MRT surpasses all baselines in layer accuracy and granularity.

Figure 12

Figure 12: MRT generalizes to natural photographs, highlighting robustness beyond design data.

Attention map visualizations confirm semantically selective layer generation, with explicit spatial correlations to text, foreground, and background elements. Figure 13

Figure 13: MRT attends to precise semantic regions during layer decomposition, ensuring disentangled and accurate RGBA outputs.

Layered Editing and Style Transfer

In the novel layers-to-layers scenario, MRT achieves single-pass context-aware layer addition and harmonizes user-provided assets for restylization, outperforming GPT-Image-1 in both instruction-guided layer insertion and stylistic adaptation. The architecture allows parallel generation and ensures global compositional consistency. Figure 14

Figure 14: Layers-to-layers editing—MRT outperforms the multi-step GPT-Image-1 baseline for both layer addition and restylization.

Ablation and Analysis

Key findings include:

  • Model and dataset scaling (20B parameters, 10M samples) significantly reduce FID, confirming the necessity for high-capacity and large-scale data.
  • Overflow training enables complete layer editing at negligible performance loss.
  • Layer grouping augmentation improves robustness against ambiguous layouts and noisy bounding boxes.
  • Caption conditioning modestly improves image-to-layer decomposition but is not critical.
  • Multi-task unification incurs minimal degradation, confirming joint optimization efficacy.

Limitations and Future Directions

Current limitations involve handling physical effects in natural photographs, specifically shadows and reflections, due to training exclusively on design data. The ambiguity in ground-truth layer granularity, occluded layer completion, and inpainting under severe occlusion remain open challenges. Adopting richer datasets and exploring more advanced layout detectors will be essential for advancing structural understanding and physical plausibility in layer decomposition.

Conclusion

MRT establishes a scalable, efficient frontier for layered image generation and editing. Unified under a masked regional diffusion transformer, it bridges text-to-layers, image-to-layers, and iterative layered editing, incorporating overflow-aware canvas layers and efficient inference via distillation. Extensive empirical evaluation confirms MRT’s superiority in quality, speed, and memory efficiency. Theoretical implications include redefining architectural designs for conditional layer-wise tokenization, offering avenues for future multimodal compositional modeling and automated design workflows in AI-assisted graphics creation.

(2605.27235)

Paper to Video (Beta)

No one has generated a video about this paper yet.

Whiteboard

No one has generated a whiteboard explanation for this paper yet.

Open Problems

We haven't generated a list of open problems mentioned in this paper yet.

Collections

Sign up for free to add this paper to one or more collections.

Tweets

Sign up for free to view the 2 tweets with 9 likes about this paper.