- 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.
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: 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.
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: Visualization of overflow layer support. Overflow-aware generation preserves pixel content outside the background boundary and enables complete layer editability.
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: 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: 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: MRT’s inference speed and memory usage scales favorably with number of layers and tokens, outperforming the Qwen-Image-Layered baseline.
Experimental Results
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: User study showing MRT’s dominance over ART for text-to-layer generation across multiple dimensions.
Figure 8: User study comparison with Qwen-Image-Layered on image-to-layers, demonstrating advantages in editability and decomposition quality.
Figure 9: Example text-to-layers generations—showing GMT’s ability to synthesize complex hierarchical layer compositions.
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: Comparative image-to-layer decompositions—MRT surpasses all baselines in layer accuracy and granularity.
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: 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: 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)