表示同等第一作者贡献。通讯作者:
ryanyuan@canva.com
摘要
分层图像生成与编辑是一项基础能力,它能够实现对生成视觉内容的逐层复用、编辑与合成,类似于自然语言中的单词级编辑。尽管其重要性显著,但在大规模应用层面,这仍是一个探索不足的领域。为填补这一空白,我们提出了 MRT,一个拥有 200 亿参数的掩码区域扩散模型,专为多层透明图像生成与编辑而设计,并在超过 1000 万个涵盖多种宽高比和文本提示的多语言设计样本上进行了训练。为充分利用这一规模,我们做出了两项关键技术贡献。首先,我们将三种互补的任务——文本到图层、图像到图层以及图层到图层——统一在一个共享的掩码区域扩散框架内,通过选择性 token 掩码实现灵活的逐层生成与编辑。其次,为了实现溢出图层生成,我们引入了一个溢出感知画布图层,用于处理边界不一致性并支持半透明背景合成,从而能够生成超出可见画布边界的完整可编辑图层。此外,我们应用扩散蒸馏技术,实现了 8 步、实时的多层生成,且质量下降极小。大量实验表明,我们的框架在所有三项任务上均大幅超越了包括多种商业系统在内的先前最先进方法,为多层透明图像生成树立了新的标杆。值得注意的是,根据用户研究结果,我们的模型在图像到图层的质量上显著优于同期发布的 Qwen-Image-Layered 模型,同时在图像到图层推理过程中实现了更快的推理速度并节省了激活 GPU 内存消耗。
1 引言
近年来,文本到图像生成技术通过多种技术进步取得了显著的质量提升,包括大规模扩散Transformer架构[37, 9, 36]、基于数十亿高质量图文对数据的分布式训练[55, 14, 13, 43]、通过直线路径将简单先验分布转化为复杂数据分布的整流流匹配[9, 30]、用于加速推理的分布匹配知识蒸馏[61, 60, 41, 66, 67, 12, 34, 33, 65],以及先进的文本编码器架构[14, 31, 32]。相比之下,面向分层图像生成的生成模型[62, 48, 28, 17, 64, 21, 22, 38, 5]仍显著发展不足。这一差距主要源于两个因素:缺乏可与LAION-5B[42]相媲美的大规模高质量数据集,以及对最先进开源文本到图像模型中先验知识的利用有限。这些制约因素阻碍了分层图像合成领域关键研究方向的系统性探索。
我们通过一项全面的研究来填补这一基础性研究空白,该研究基于一个高质量、大规模的多层数据集,包含超过百万个样本——其规模比近期工作[38]大一个数量级。我们的数据集涵盖多种分辨率和宽高比,包含超过百万个独立图层和超过百万个超大视觉元素,以支持溢出图层生成。我们采用GPT-5 mini为所有图形设计生成全局描述。对于视觉文本图层,我们利用真实排版属性,确保全面且高质量的标注。为了在大规模上充分利用该数据集,我们通过在Qwen-Image[55](最大的开源文本到图像扩散模型,参数量约为B)上实现掩码区域Transformer架构,构建了我们的多层生成模型。
为了提升分层图像生成与编辑在训练和推理过程中的效率,我们引入了以下关键技术贡献:首先,我们提出了一种统一的掩码区域 Transformer 框架,可处理三种互补任务:文本到图层、图像到图层以及图层到图层的生成与编辑。其核心创新在于我们的自适应掩码机制,该机制根据具体任务需求,决定是从干净潜变量还是从噪声中初始化每个图层。其次,我们的掩码区域 Transformer 直接在完整画布上运行,将背景视为一种特殊的透明前景图层,并封装了部分延伸至背景区域之外的溢出图层。这种架构确保所有前景图层保持完全可复用性,并且可以在画布上任意重新定位,这一点在图 2 和实验部分中得到了说明。第三,我们进一步提出利用分布匹配蒸馏方案,开发一个质量退化极小的少步数多层生成器。
我们进行了全面的消融实验,以研究不同组件的影响。我们通过实验证明,扩大模型和数据集规模可将性能提升至新水平,而联合多任务训练在提升性能的同时,也改善了用户体验。我们展示了我们的图像到图层任务对各种领域外的设计图像和自然图像具有出色的泛化能力。我们的图层到图层任务则能轻松支持多图像融合,将任意给定的用户图像无缝集成到现有设计中。我们希望我们的掩码区域 Transformer 能够以前所未有的规模,推动对这一基础性挑战任务的理解。
2 相关工作
分层图像生成与编辑任务遵循两种范式:同步生成(Text2Layer [64]、LayerDiff [17]、ART [38]、PrismLayer [5]、Qwen-Image-Layered [59])和顺序生成(LayerDiffuse [62]、COLE [22]、OpenCOLE [21]、LayerD [45])。相关的布局生成与控制方法分为两类:(1)从视觉元素生成布局 [7, 44, 25, 10, 56, 19, 3, 18, 27, 6, 46, 24, 23, 54, 53, 15, 58, 20, 4, 11, 2],以及(2)通过空间条件控制生成 [29, 52, 51, 1, 57, 26, 47, 40, 63, 10, 4]。与最相关的工作 ART [38] 和 Qwen-Image-Layered [59] 相比,我们的掩码区域 Transformer 统一了三个任务:文本到图层、图像到图层以及图层到图层的生成。我们进一步原生支持溢出图层,并通过知识蒸馏实现了少步数多层生成。
3 方法
3.1 扩展分层数据与扩散模型
扩展的分层数据集。大规模、高质量多层透明图像的稀缺,是推进多层生成建模面临的根本性挑战。我们没有依赖嘈杂且未经整理的互联网来源,而是构建了一个经过筛选的内部数据集,其中包含来自全球最大图形设计平台之一的超过 1000 万份多层图形设计。所有设计均由专业设计师创作,并完全授权用于生成模型训练。图 1 展示了关键的数据集统计信息,表明我们的数据集涵盖了多样的宽高比和分辨率,同时支持多语言视觉文本渲染和双语文本提示词。
缩放区域 Transformer。为了融入溢出层的生成,我们遵循 ART [38] 以区域方式执行去噪扩散过程,具体如下:首先,我们将多层透明图像表示为 {, , },其中 是全尺寸画布上的合成图像, 是半透明 RGBA 背景层, 和 是 RGBA 前景层。其次,我们在合并图像上执行扩散过程,该合并图像将完全透明的画布作为基础层,并根据预定义布局叠加 和所有层。第三,我们使用 WAN-2.1-VAE [50] 编码器提取所有前景层的区域裁剪表示、背景层的表示以及合成完整设计的表示。最后,我们实现了一个匿名区域扩散 Transformer [38],其参数量为 B,遵循 Qwen-Image [55] 架构,对这些区域前景层 token、背景层 token 和合成完整设计图像 token 共同执行全注意力机制。
溢出层支持。此前的研究工作[38, 5]仅在可见画布区域内生成前景层,导致超出背景边界的元素不完整。这限制了层的可复用性,如图2第二行所示。然而,我们发现训练集中超过一定比例的样本包含溢出层,这使得该问题成为关键的实际考量。为解决此问题,我们引入了一个额外的全尺寸画布层,用于支持生成完整的半透明背景和溢出元素。这一方案之所以可行,是因为我们能够获取数据集中所有样本的真实完整层数据。该设计对于实际编辑工作流至关重要:若无此设计,超出画布的层将被裁剪并呈现为不可编辑状态,严重限制其在后续合成任务中的可用性。图2展示了我们数据集中具有代表性的溢出层示例(第一行),并对比了有无溢出层支持的分层样本(第二行和第三行)。
3.2 掩码区域Transformer
我们在图3中展示了掩码区域扩散Transformer框架如何以统一方式解决三个具有挑战性的多层生成任务——文本到层、图像到层以及层到层。其核心思路是在区域扩散Transformer中,对全局图像token或参考token与现有层token的组合进行条件性掩码处理。掩码潜变量表示编码了预设条件的干净token,噪声注入和扩散监督仅应用于非掩码token。我们在掩码干净token与噪声token之间应用完全注意力机制,使模型能够自适应地学习不同任务下它们之间的关系。各任务的具体掩码机制描述如下:
文本到图层。文本到图层生成任务旨在根据文本提示词合成一个多层透明设计,包含一个画布层、一个半透明背景层以及多个前景层,这些前景层组合成最终图像并支持溢出。画布层定义了完整的设计尺寸以容纳溢出元素,并且默认是完全透明的。因此,我们对潜变量的拼接结果应用扩散过程,但不包括画布层,并以共享的文本嵌入作为条件。参照 [38],我们加入以确保图层一致性。由于不存在预先存在的图层,我们将掩码 token 设置为。详情见图 3(面板 1)。
设 表示所有未掩码干净潜变量的拼接, 表示噪声先验。流匹配框架学习一个向量场,该向量场通过连续时间插值路径将样本从噪声分布传输到数据分布。在时间步 处,插值后的潜变量由下式给出:
| (1) |
我们训练扩散模型,使其基于插值潜变量 、时间步 和文本提示词 预测流速度:。训练目标是最小化预测速度与真实速度之间的均方误差:
| (2) |
其中,沿插值路径的真实速度为 (),期望值在干净潜变量 、随机噪声 和均匀采样的时间步 上计算。
图像到图层。图像到图层任务已成为商业生成系统中的一项关键能力,Adobe Firefly 的分层图像编辑和 Lovart 的 Edit Elements 等产品近期已引入对此功能的支持。图像到图层任务旨在将一张光栅图像(或 )分解为包含一个画布层 、一个背景层 和多个前景层 的多层透明设计,其条件为指定每个图层空间位置的目标布局,以及一个用于语义引导的可选文本提示词。该任务本质上包含两个子任务:分割(通过精确的 alpha 蒙版识别图层区域)和补全(完成被遮挡区域)。我们使用人工标注或布局检测器从输入光栅图像中提取目标布局。
被掩码的干净 token 被设置为全局合成图像表示 ,该表示编码了待分解的条件图像。我们对未掩码 token 的拼接 添加噪声。通过区域扩散过程,扩散模型被训练为在给定全局图像和布局的条件下提取所有透明图层。由于要求用户提供带有溢出图层的设计不切实际,我们转而使用位于可见画布内的像素的潜变量编码。详情见图 3(面板 2)。
我们观察到,单个层往往存在结构模糊性,并且可以进一步分解。为了解决这个问题,我们提出了层分组增强方法,即在训练过程中随机对重叠或相邻的层进行分组。这种策略增加了结构多样性,提高了对模糊边界的鲁棒性,并增强了对具有杂乱布局的域外图像的泛化能力。
层到层。为了实现灵活、逐层的交互体验,我们将分层图像编辑任务定义为一个层到层的任务,涵盖两个关键场景:(i) 层添加——根据文本提示,在现有层的条件下生成新的连贯层,同时保持整个构图的空间和风格一致性;(ii) 层风格重设——专注于将任何用户提供的图像或透明层转换为风格对齐的层,使其与现有构图的外观和视觉特征相匹配。
为了对层到层任务进行建模,我们将现有的层潜变量保留为掩码干净 token,并仅对以下内容应用扩散:(i) 根据文本提示条件新添加的层,或 (ii) 根据视觉参考条件进行风格重设的指定层。考虑到为这些场景构建训练数据的挑战,我们从每个设计中随机选择一部分层作为条件现有层,并将剩余层视为生成目标。对于层风格重设训练,我们使用图像编辑模型来转换未选中层的风格,创建风格变换后的变体作为训练对。数据集构建流程的详细信息请参见附录。
形式上,在图层添加任务中,我们的目标是基于剩余图层及图层级文本描述,合成前景图层的子集。我们将扩散模型应用于潜在 token 序列,其中 编码了由背景及所有非目标图层构成的 Alpha 合成上下文。设 为待生成图层的索引(任意子集,不要求连续)。我们将掩码后的干净 token 设为 ,并将目标槽位视为需加噪与去噪的非掩码 token。文本条件来源于图层描述提示词,该提示词通过按图层顺序拼接所有 的 `<layer> </layer>` 构建而成,其中 为图层 的描述。训练时,我们对 添加噪声,并基于条件 优化流匹配目标;推理时,我们从噪声初始化 ,在相同条件下对其进行去噪,从而在原始索引位置生成新增图层。
在图层重风格化任务中,我们通过保留其余图层的同时,在额外外观条件下对选定图层进行重风格化,从而更新用户上传的分层设计。给定目标索引后,我们通过将背景与非目标原始图层合成来构建,并将 保留为掩码干净条件。对于每个 ,我们还额外提供一个条件潜变量,用于指定图层 的期望外观。我们将 作为额外条件 token 追加,并将其视为掩码 token,因此它们不是预测目标。为了明确这一角色,我们向追加的条件 token 添加了一个可学习的条件 token 嵌入。我们进一步将对应原始图层 token 的 RoPE 位置编码复制到其条件 token,确保两个 token 共享相同的空间位置线索。相应地,我们仅对非掩码的原始目标槽位 应用扩散,以 和固定指令提示词(例如“协调这些图层”)为条件。在训练期间,仅向 添加噪声,模型被训练为在条件潜变量下对原始目标槽位进行去噪。在推理期间,我们从噪声初始化 ,并在相同条件下对其进行去噪,从原始目标槽位读取最终重风格化的图层,同时从输出图层集合中排除追加的条件 token。
3.3 加速多层生成器
我们采用改进的分布匹配蒸馏(DMD)技术 [61, 60, 35, 8],将我们的多步扩散模型(教师模型)压缩为少步生成器(学生模型),同时保持教师模型与学生模型之间的分布一致性。设教师模型表示标准多步扩散模型的反向过程,学生模型则使用更少的去噪步骤来近似该过程。DMD 的目标是最小化教师模型与学生模型转移分布之间的 Kullback–Leibler(KL)散度:
| (3) |
在推理阶段,经过知识蒸馏的学生模型以更少的步骤执行生成,有效逼近教师模型的多步轨迹:其中我们设定 。我们证明,蒸馏后的模型在保持教师模型样本质量的同时,大幅减少了采样步数,从而实现更快、更高效的生成。我们还支持多种技术,例如 CacheDiT 以及跨多 GPU 的序列并行化,以进一步加速推理速度。
4 实验
4.1 实现细节
我们所有实验均以 Qwen-Image 作为基础架构,该架构包含 60 层,每层隐藏维度为 3584,并配备 24 个注意力头。我们从 HuggingFace 上开源预训练检查点初始化模型权重。与以往因资源限制仅微调 LoRA 权重的方法不同,我们采用 FSDP2 进行全参数微调,以探索模型的性能上限。考虑到标准平面图像生成与多层合成固有复杂性之间存在显著的分布偏移,这种方法十分必要。
在消融实验中,我们使用 H200 GPU,在分辨率为 的条件下,对精心筛选的 50 万条分层设计子集进行 4000 次迭代训练,每 GPU 批次大小为 16,全局批次大小为 128。我们采用 AdamW 优化器,学习率恒定为 。在系统级实验中,我们采用两阶段训练:首先在完整 1000 万数据集上以 分辨率进行 7 万次迭代,随后在 分辨率下进行 2 万次迭代。这种渐进式策略使模型能够先建立多层分解能力,再扩展到高分辨率。训练使用 H200 GPU,每 GPU 批次大小为 16,全局批次大小为 1024。
4.2 评估协议
基准测试。我们将我们的方法与先前的最先进方法在 ART [38] 提出的 Design-Multi-Layer-Bench 上进行了比较,该基准测试源自 VistaCreate 平面设计平台 [49]。然而,该评估数据集不包含溢出层。为弥补这一不足,我们构建了 overflowerflow-Design-Bench,以评估模型从完整布局生成完整图层的能力,这对于确保溢出层的可复用性至关重要。
评估指标。我们从多个角度评估模型性能。对于合并后的图像质量,我们报告 PSNR、SSIM、FID(衡量整体连贯性),并遵循 [38] 的方法计算 FID。由于我们的图层是带有透明度的 RGBA 图像,我们仅对非透明像素计算 PSNR 和 SSIM。在人工评估方面,我们在 Design-Multi-Layer-Bench 的一个子集上,针对文本到图层(T2L)任务和图像到图层(I2L)任务收集了多维度的用户偏好,以反映真实用户体验。评估协议和界面详见补充材料。
4.3 主要结果
4.3.1 文本到图层:与最先进方法的比较
我们在 Design-Multi-Layer-Bench 的一个子集上将我们的方法与 ART [38] 进行了比较。在图 5 所示的用户研究中,参与者在指令遵循、整体美学和图层质量方面始终更偏好我们的结果。这些发现表明提示词与分层构图之间的对齐更强,图 4 中展示的布局进一步说明了这一点,这些布局更好地保留了空间意图和风格一致性。
只有我们的方法原生支持在完整尺寸画布上生成超出背景边界的溢出 RGBA 图层,从而保留了可编辑性和复用性;先前的系统(例如 ART)将像素限制在背景区域内,导致内容被裁剪或缺失。可视化结果见图 6 和图 8。
4.3.2 图像到图层:与当前最优方法的比较
在一项比较最新工作 LayerD [45] 以及 RoboNeo 和 Lovart 等商业系统的图层分解能力的用户研究中,参与者在图层质量、内容完整性和分解粒度方面始终更偏好我们的方法。由于 I2L 评估假设存在图层布局(带有 Z 顺序的边界框),我们使用由 Z 顺序感知检测器提取的布局来评估我们的方法(详情见补充材料)。图 19 中的定性比较也显示,我们的方法能生成更完整、可复用的 RGBA 图层,且边界更清晰。我们还在图 23 中进一步展示了我们的模型在自然场景上的泛化能力。
4.3.3 图像到图层:与同期 Qwen-Image-Layered 的比较
近期,Qwen-Image-Layered [59] 自其在 Huggingface 上发布以来,因其在各种设计图像上强大的泛化能力而引起了社区的广泛关注。我们通过从质量、延迟和内存三个方面进行严格的比较,来展示我们方法的优势。
更优的质量。我们首先构建了一个由 100 个创意设计组成的域外测试集,这些设计来自三个来源:由最新的 Nano-Banana-Pro(以及 Ideogram 3.0)图像生成模型生成的图像,以及来自官方 Qwen-Image-Layered 仓库 [39] 的测试图像。我们在表 1 中报告了定量比较结果,显示我们的方法实现了显著更高的信噪比和结构相似性指数。我们根据图层数量将指标分为三组进行计算,我们的 MRT 在所有组别中均表现更优。
图9、图10、图11、图12、图13、图14、图15和图16提供了进一步的定性比较结果。我们通过实验发现,当需要将平面设计分解为数量越来越多的透明图层时,我们的方法表现显著更优;我们的方法持续表现良好,而Qwen-Image-Layered则难以将有意义的对象分配到每个图层。这些可视化结果不仅印证了上述发现,也表明即使我们的模型大幅优于Qwen-Image-Layered,仍有很大的改进空间。我们还在此测试集上进行了公平的用户研究,结果如图7所示。我们的方法在图层质量、完整性和粒度方面分别取得了____、____和____的胜率。
更低延迟。如图18所示,得益于我们的区域扩散Transformer架构,与Qwen-Image-Layered相比,我们实现了显著的加速——后者无论每个透明图层在画布中的实际面积大小,都使用相同数量的全分辨率模型token来建模每个透明图层。我们实现了与ART [38]中统计结果相似的延迟加速,并进一步应用了各种先进的缓存技术、模型蒸馏、低精度计算和并行推理,将模型延迟优化至在H100 GPU上运行时仅需____秒,在单张H100 GPU上将一张1K高分辨率图像分解为近20个透明图层时仅需____秒。
高效内存。与Qwen-Image-Layered需要更多视觉token来从平面图像中提取不同图层不同,我们的方法在内存效率上显著更优,将图像分解为多个透明图层所需的token数量少得多。图18展示了延迟与图层数量的关系、延迟与token数量的关系,以及峰值内存消耗与图层数量的关系。我们的方法在推理速度和内存使用方面均具有明显优势;例如,使用我们的MRT生成超过____个图层时,可实现超过____倍的加速。
挑战。我们识别出图像到图层分解任务中尚存的若干关键挑战:(一)对逼真图像的泛化能力有限,模型难以在多样化的真实场景中保持保真度与真实感;(二)图层粒度的模糊性,源于图层定义本身的不适定性以及缺乏明确的标准真值分离;(三)遮挡图层补全,当分层遮挡涉及半透明或复杂混合时,该任务仍然困难;(四)背景修复,在严重遮挡情况下,重建合理的不可见区域具有挑战性。我们在图17中可视化了代表性的失败案例。遮挡图层补全失败的主要原因有两个:一方面,布局检测器可能无法为遮挡图层预测准确的非模态边界区域;另一方面,图像到图层生成模型可能因缺乏足够的上下文线索和数据多样性,而无法忠实地重建复杂的被遮挡像素。这些局限性指明了未来研究的方向。
| PSNRmerged | SSIMmerged | |||||
|---|---|---|---|---|---|---|
| 图层(Layers) | ||||||
| MRT(我们的方法) | 27.3440 | 25.9068 | 25.7229 | 0.9034 | 0.8762 | 0.8485 |
| Qwen-Image-Layered | 25.8111 | 23.0645 | 22.1828 | 0.8706 | 0.8319 | 0.8065 |
4.3.4 图层到图层:分层编辑
据我们所知,此前没有研究工作涉及分层图像编辑这一任务。为了为此任务建立对比基准,我们使用支持多条件图像输入和透明 RGBA 图层输出的 GPT-Image-1 实例化了一个基线方法。我们报告了我们的方法在两个关键任务上的结果,详细说明了如何将 GPT-Image-1 配置为有竞争力的基线,并强调了我们的方法的独特属性。



图层添加。图层添加旨在根据逐层提示词,将新图层插入现有设计中。在此对比中,我们通过提供模板上的两个目标边界框及对应的逐层提示词来模拟用户操作。我们的模型并行预测所需图层,同时保持跨图层一致性。对于 GPT-Image-1,我们采用迭代生成流程:以当前合成图像为条件,在插入位置绘制红色边界框,并输入对应的逐层提示词给 GPT-Image-1,由其输出透明的 RGBA 图层。随后,我们将生成的图层插入指定位置,并对剩余图层重复该过程。由于我们的方法能一次性生成多个图层并以所有图层为条件,因此能更好地捕捉图层间关系,生成保持全局构图与风格的连贯插入结果(如图 21 所示),且性能优于 GPT-Image-1。
图层重风格化。对于目标图层的重风格化,用户提供要放置在画布上的素材;我们将这些素材重风格化为与整体构图相协调的图层。对于 GPT-Image-1,我们提供多图像输入:现有图层的合并图像,并用红色边界框标注插入位置,以及用户指定的素材。在预测一个图层后,我们将其插入指定位置,并对剩余目标进行迭代。我们的方法在单次处理中协调所有选定图层,而 GPT-Image-1 需要逐层生成,这会增加延迟,并可能在多次编辑中传播不一致性。图 21 显示,我们的编辑在适应目标风格外观的同时,能更好地保留几何形状。
4.4 消融研究与分析
更大的模型和数据集可提升质量。为证明模型和数据集规模的重要性,我们在相同的 0.5M 样本数据集上,使用 FLUX.1 [dev](13B)和 Qwen-Image(20B)训练文本到图层模型。仅模型规模提升就将 FID 从 降低至 。随后将数据集规模扩展到 10M 样本,在有限的训练预算下进一步将 FID 降低至 ,更长时间的训练预计会带来更多收益。这些结果证实,模型容量和数据集规模对于高质量生成都至关重要。
| 训练数据 | FIDmerged | PSNR | SSIM |
|---|---|---|---|
| 无溢出数据 | 15.68 | 21.81 | 0.8543 |
| 有溢出数据 | 16.15 | 22.75 | 0.8711 |
| 方法 | 任务混合比例 | FIDmerged | PSNR | SSIM |
|---|---|---|---|---|
| T2L | 100% / 0% / 0% | 16.15 | 22.75 | 0.8711 |
| T2L+I2L | 80% / 20% / 0% | 15.68 | 23.06 | 0.8924 |
| T2L+I2L+L2L | 70% / 15% / 15% | 17.06 | 21.97 | 0.8606 |
| 方法 | PSNR | SSIM | PSNR | SSIM |
|---|---|---|---|---|
| 无文本条件 | 21.27 | 0.8697 | 26.03 | 0.9794 |
| 有文本条件 | 21.65 | 0.8805 | 27.24 | 0.9846 |
| 方法 | PSNR | SSIM | PSNR | SSIM |
|---|---|---|---|---|
| 无合并增强 | 21.65 | 0.8805 | 27.24 | 0.9846 |
| 有合并增强 | 21.97 | 0.8864 | 26.96 | 0.9840 |
无性能损失的溢出支持。表 6 评估了溢出感知生成的影响。超过 60% 的设计包含溢出图层,而此前的工作均截断这些元素,严重限制了可编辑性和可复用性。使用溢出数据进行训练能够以极小的性能代价实现完整的图层生成:我们的模型在取得可比的 FID、PSNR 和 SSIM 分数的同时,独特地保留了溢出元素。
多任务训练与性能权衡。表 6 展示了采用随机任务采样的统一多任务训练。我们的框架整合了全部三个任务,无需多阶段微调,同时在各配置下保持了可比的性能,表明统一化带来的性能退化极小。我们观察到,引入图层到图层任务会略微降低整体性能,我们将其归因于图层到图层数据集的质量问题——这是留给未来工作的一个方向。
文本条件对于图像到图层并非必需。一个重要的问题是,全局描述对于图像到图层的分解是否必要。表 6 对描述条件进行了消融实验,结果显示各指标均有适度且一致的提升。这揭示了一个值得注意的发现:虽然文本引导有助于边界消歧,并为复杂的重叠构图提供语义线索,但它并非我们框架的必需条件。
层分组增强提升了鲁棒性。表6验证了层分组增强的效果。由于我们的框架需要布局输入,精确的训练布局标注与用户或检测器提供的含噪测试时布局之间存在分布差异。我们通过在训练过程中随机合并层来解决这一问题,以增加布局多样性。即使在具有高质量布局标注的Design-Multi-Layer-Bench上,该策略也带来了一致的改进,并且在含噪布局条件下预期会有更大的收益。
蒸馏式多层生成器带来了显著的加速。通过引入DMD2蒸馏[61, 60],我们将多层生成过程从多个去噪步骤加速到少量步骤,实现了速度提升且性能下降极小。表6中的FID分数保持可比,图22中的视觉质量也基本得以保留,这证明了蒸馏技术在多图层图像扩散模型中实现少步生成的有效性。
其他消融实验。我们在补充材料中提供了关于提示词长度、多语言设计生成以及使用PrismLayers数据进行微调的其他消融研究。
5 结论
在本文中,我们首次系统性地研究了大规模多层透明图像生成的性能边界。我们引入了掩码区域Transformer(Masked Region Transformer),这是一个大规模扩散框架,在共享的掩码区域范式下统一了文本到图层、图像到图层以及图层到图层的生成。该模型在超过1000万个多语言设计样本上训练,参数量达200亿,融合了多项关键技术革新:用于完整边界处理的溢出感知画布层,以及用于实时生成的分布匹配蒸馏。这些贡献共同实现了对高保真、半透明、完全可编辑视觉图层的高效合成。
参考文献
- [1] O. Bar-Tal, L. Yariv, Y. Lipman, and T. Dekel (2023) MultiDiffusion: fusing diffusion paths for controlled image generation. In ICML, 引用于§2.
- [2] C. Braunstein, H. Petekkaya, J. E. Lenssen, M. Toneva, and E. Ilg (2024) SLayR: scene layout generation with rectified flow. arXiv preprint arXiv:2412.05003. 引用于§2.
- [3] S. Chai、L. Zhuang 和 F. Yan (2023) 《LayoutDM:基于 Transformer 架构扩散模型的布局生成》。发表于 CVPR,引用自 §2。
- [4] J. Chen、R. Zhang、Y. Zhou、J. Healey、J. Gu、Z. Xu 和 C. Chen (2024) 《TextLap:定制语言模型实现文本到布局规划》。发表于 EMNLP Findings,引用自 §2。
- [5] J. Chen、H. Jiang、Y. Wang、K. Wu、J. Li、C. Zhang、K. Yanai、D. Chen 和 Y. Yuan (2025) 《PrismLayers:面向高质量多层透明图像生成模型的开放数据》。arXiv 预印本 arXiv:2505.22523。引用自 §1、§2、§3.1、§4.1。
- [6] C. Cheng、F. Huang、G. Li 和 Y. Li (2023) 《Play:基于参数条件化潜扩散模型的布局生成》。发表于 ICML,引用自 §2。
- [7] Y. Cheng、Z. Zhang、M. Yang、H. Nie、C. Li、X. Wu 和 J. Shao (2024) 《基于大型多模态模型的平面设计》。arXiv:2404.14368。引用自 §2。
- [8] Z. Dong、R. Zhao、S. Wu、J. Yi、L. Li、Z. Yang、L. Wang 和 A. J. Wang (2025) 《Glance:基于 1 个样本加速扩散模型》。外部链接:2512.02899,链接,引用自 §3.3。
- [9] P. Esser、S. Kulal、A. Blattmann、R. Entezari、J. Müller、H. Saini、Y. Levi、D. Lorenz、A. Sauer、F. Boesel 等人 (2024) 《扩展修正流 Transformer 架构以实现高分辨率图像合成》。发表于第四十一届国际机器学习大会,引用自 §1。
- [10] W. Feng、W. Zhu、T. Fu、V. Jampani、A. Akula、X. He、S. Basu、X. E. Wang 和 W. Y. Wang (2024) 《LayoutGPT:基于大语言模型的组合式视觉规划与生成》。发表于 NeurIPS,引用自 §2。
- [11] A. Fontanella、P. Tudosiu、Y. Yang、S. Zhang 和 S. Parisot (2024) 《通过文本到图像 RGBA 实例生成实现组合式场景生成》。arXiv 预印本 arXiv:2411.10913。引用自 §2。
- [12] K. Frans、D. Hafner、S. Levine 和 P. Abbeel (2024) 《通过捷径模型实现单步扩散》。arXiv 预印本 arXiv:2410.12557。引用自 §1。
- [13] Y. Gao、L. Gong、Q. Guo、X. Hou、Z. Lai、F. Li、L. Li、X. Lian、C. Liao、L. Liu 等人 (2025) 《Seedream 3.0 技术报告》。arXiv 预印本 arXiv:2504.11346。引用自 §1。
- [14] L. Gong, X. Hou, F. Li, L. Li, X. Lian, F. Liu, L. Liu, W. Liu, W. Lu, Y. Shi 等人 (2025) Seedream 2.0:原生中英双语图像生成基础模型。arXiv 预印本 arXiv:2503.07703。引用于 §1。
- [15] J. J. A. Guerreiro, N. Inoue, K. Masui, M. Otani 和 H. Nakayama (2024) LayoutFlow:用于布局生成的流匹配。ECCV 会议。引用于 §2。
- [16] E. J. Hu, Y. Shen, P. Wallis, Z. Allen-Zhu, Y. Li, S. Wang, L. Wang, W. Chen 等人 (2022) LoRA:大语言模型的低秩适配。ICLR 1(2),第 3 页。引用于 §4.1。
- [17] R. Huang, K. Cai, J. Han, X. Liang, R. Pei, G. Lu, S. Xu, W. Zhang 和 H. Xu (2024) LayerDiff:通过层协同扩散模型探索文本引导的多层可组合图像合成。ECCV 会议。引用于 §1, §2。
- [18] M. Hui, Z. Zhang, X. Zhang, W. Xie, Y. Wang 和 Y. Lu (2023) 利用解耦扩散模型统一布局生成。CVPR 会议。引用于 §2。
- [19] N. Inoue, K. Kikuchi, E. Simo-Serra, M. Otani 和 K. Yamaguchi (2023) LayoutDM:用于可控布局生成的离散扩散模型。CVPR 会议。引用于 §2。
- [20] N. Inoue, K. Kikuchi, E. Simo-Serra, M. Otani 和 K. Yamaguchi (2023) 面向灵活的多模态文档模型。CVPR 会议。引用于 §2。
- [21] N. Inoue, K. Masui, W. Shimoda 和 K. Yamaguchi (2024) OpenCOLE:迈向可复现的自动平面设计生成。CVPR 研讨会。引用于 §1, §2。
- [22] P. Jia, C. Li, Z. Liu, Y. Shen, X. Chen, Y. Yuan, Y. Zheng, D. Chen, J. Li, X. Xie 等人 (2023) COLE:面向平面设计的分层生成框架。arXiv 预印本 arXiv:2311.16974。引用于 §1, §2。
- [23] Z. Jiang, J. Guo, S. Sun, H. Deng, Z. Wu, V. Mijovic, Z. J. Yang, J. Lou 和 D. Zhang (2023) LayoutFormer++:通过约束序列化和解码空间限制实现条件式图形布局生成。CVPR 会议。引用于 §2。
- [24] Z. Jiang, S. Sun, J. Zhu, J. Lou 和 D. Zhang (2022) 面向图形布局的由粗到细生成式建模。AAAI 会议。引用于 §2。
- [25] K. Kikuchi, N. Inoue, M. Otani, E. Simo-Serra 和 K. Yamaguchi (2024) 用于平面设计补全的多模态标记文档模型。arXiv:2409.19051。引用于 §2。
- [26] Y. Kim, J. Lee, J. Kim, J. Ha, 和 J. Zhu (2023) 基于注意力调制的密集文本到图像生成。发表于 ICCV,引用自:§2。
- [27] X. Kong, L. Jiang, H. Chang, H. Zhang, Y. Hao, H. Gong, 和 I. Essa (2022) BLT:面向可控布局生成的双向布局 Transformer。发表于 ECCV,引用自:§2。
- [28] P. Li, Q. Huang, Y. Ding, 和 Z. Li (2023) Layerdiffusion:基于扩散模型的分层可控图像编辑。发表于 SIGGRAPH Asia 2023 技术通讯,第 1–4 页。引用自:§1。
- [29] Y. Li, H. Liu, Q. Wu, F. Mu, J. Yang, J. Gao, C. Li, 和 Y. J. Lee (2023) GLIGEN:开放集接地文本到图像生成。发表于 CVPR,引用自:§2。
- [30] Y. Lipman, R. T. Chen, H. Ben-Hamu, M. Nickel, 和 M. Le (2022) 生成建模中的流匹配。arXiv 预印本 arXiv:2210.02747。引用自:§1。
- [31] B. Liu, E. Akhgari, A. Visheratin, A. Kamko, L. Xu, S. Shrirao, C. Lambert, J. Souza, S. Doshi, 和 D. Li (2024) Playground v3:通过深度融合大语言模型改进文本到图像对齐。arXiv 预印本 arXiv:2409.10695。引用自:§1。
- [32] Z. Liu, W. Liang, Z. Liang, C. Luo, J. Li, G. Huang, 和 Y. Yuan (2024) Glyph-byt5:用于精确视觉文本渲染的定制文本编码器。发表于欧洲计算机视觉会议,第 361–377 页。引用自:§1。
- [33] C. Lu 和 Y. Song (2024) 简化、稳定并扩展连续时间一致性模型。arXiv 预印本 arXiv:2410.11081。引用自:§1。
- [34] W. Luo, Z. Huang, Z. Geng, J. Z. Kolter, 和 G. Qi (2024) 通过分数隐式匹配实现单步扩散蒸馏。神经信息处理系统进展 37,第 115377–115408 页。引用自:§1。
- [35] Y. Luo, T. Hu, J. Sun, Y. Cai, 和 J. Tang (2025) 通过轨迹分布匹配学习少步扩散模型。外部链接:2503.06674,链接。引用自:§3.3。
- [36] N. Ma, M. Goldstein, M. S. Albergo, N. M. Boffi, E. Vanden-Eijnden, 和 S. Xie (2024) Sit:利用可扩展插值 Transformer 探索基于流和扩散的生成模型。发表于欧洲计算机视觉会议,第 23–40 页。引用自:§1。
- [37] W. Peebles 和 S. Xie (2023) 基于 Transformer 的可扩展扩散模型。载于《IEEE/CVF 国际计算机视觉大会论文集》,第 4195–4205 页。引用于:§1。
- [38] Y. Pu、Y. Zhao、Z. Tang、R. Yin、H. Ye、Y. Yuan、D. Chen、J. Bao、S. Zhang、Y. Wang 等 (2025) ART:面向可变多层透明图像生成的匿名区域 Transformer。载于《计算机视觉与模式识别会议论文集》,第 7952–7962 页。引用于:§1、§1、§2、§3.1、§3.1、§3.2、§4.1、§4.2、§4.2、§4.3.1、§4.3.3。
- [39] Qwen (2025) Qwen-Image-Layered。注:https://github.com/QwenLM/Qwen-Image-Layered/tree/main/assets/test_images 引用于:§4.3.3。
- [40] V. Sarukkai、L. Li、A. Ma、C. Ré 和 K. Fatahalian (2024) 拼贴扩散。载于《WACV》。引用于:§2。
- [41] A. Sauer、D. Lorenz、A. Blattmann 和 R. Rombach (2024) 对抗性扩散蒸馏。载于《欧洲计算机视觉会议》,第 87–103 页。引用于:§1。
- [42] C. Schuhmann、R. Beaumont、R. Vencu、C. Gordon、R. Wightman、M. Cherti、T. Coombes、A. Katta、C. Mullis、M. Wortsman 等 (2022) LAION-5B:用于训练下一代图文模型的开源大规模数据集。《神经信息处理系统进展》35,第 25278–25294 页。引用于:§1。
- [43] T. Seedream、Y. Chen、Y. Gao、L. Gong、M. Guo、Q. Guo、Z. Guo、X. Hou、W. Huang、Y. Huang 等 (2025) Seedream 4.0:迈向下一代多模态图像生成。arXiv 预印本 arXiv:2509.20427。引用于:§1。
- [44] M. A. Shabani、Z. Wang、D. Liu、N. Zhao、J. Yang 和 Y. Furukawa (2024) 视觉布局合成器:面向设计布局生成的图像-向量双扩散模型。载于《CVPR》。引用于:§2。
- [45] T. Suzuki、K. Liu、N. Inoue 和 K. Yamaguchi (2025) LayerD:将栅格图形设计分解为图层。载于《IEEE/CVF 国际计算机视觉大会论文集》,第 17783–17792 页。引用于:§2、§4.3.2。
- [46] Z. Tang、C. Wu、J. Li 和 N. Duan (2023) LayoutNUWA:揭示大语言模型的隐藏布局专长。载于《ICLR》。引用于:§2。
- [47] O. Team (2024) Omost GitHub 页面。引用于:§2。
- [48] P. Tudosiu、Y. Yang、S. Zhang、F. Chen、S. McDonagh、G. Lampouras、I. Iacobacci 和 S. Parisot(2024)《MULAN:面向可控文本到图像生成的多层标注数据集》。收录于《IEEE/CVF 计算机视觉与模式识别会议论文集》,第 22413–22422 页。引用于:§1。
- [49] VistaCreate 团队(2025)《VistaCreate(原名 crello)平面设计平台》。注:https://create.vista.com/ 访问日期:2025-11-09 引用于:§4.2。
- [50] T. Wan、A. Wang、B. Ai、B. Wen、C. Mao、C. Xie、D. Chen、F. Yu、H. Zhao、J. Yang 等(2025)《Wan:开放且先进的大规模视频生成模型》。arXiv 预印本 arXiv:2503.20314。引用于:§3.1。
- [51] X. Wang、S. Fu、Q. Huang、W. He 和 H. Jiang(2024)《MS-Diffusion:基于布局引导的多主体零样本图像个性化》。arXiv:2406.07209。引用于:§2。
- [52] X. Wang、T. Darrell、S. S. Rambhatla、R. Girdhar 和 I. Misra(2024)《InstanceDiffusion:面向图像生成的实例级控制》。收录于 CVPR。引用于:§2。
- [53] Y. Wang、Z. Chen、L. Zhong、Z. Ding、Z. Sha 和 Z. Tu(2024)《Dolfin:无需自编码器的扩散布局 Transformer》。收录于 ECCV。引用于:§2。
- [54] H. Weng、D. Huang、Y. Qiao、Z. Hu、C. Lin、T. Zhang 和 C. Chen(2024)《Desigen:面向可控设计模板生成的流水线》。收录于 CVPR。引用于:§2。
- [55] C. Wu、J. Li、J. Zhou、J. Lin、K. Gao、K. Yan、S. Yin、S. Bai、X. Xu、Y. Chen 等(2025)《Qwen-Image 技术报告》。arXiv 预印本 arXiv:2508.02324。引用于:§1、§1、§3.1。
- [56] K. Yamaguchi(2021)《CanvasVAE:学习生成矢量图形文档》。arXiv 预印本 arXiv:2108.01249。引用于:§2。
- [57] L. Yang、Z. Yu、C. Meng、M. Xu、S. Ermon 和 B. Cui(2024)《掌握文本到图像扩散:利用多模态大语言模型进行重述、规划与生成》。收录于 ICML。引用于:§2。
- [58] T. Yang、Y. Luo、Z. Qi、Y. Wu、Y. Shan 和 C. W. Chen(2024)《PosterLLaVa:利用大语言模型构建统一的多模态布局生成器》。arXiv:2406.02884。引用于:§2。
- [59] S. Yin, Z. Zhang, Z. Tang, K. Gao, X. Xu, K. Yan, J. Li, Y. Chen, Y. Chen, H. Shum, L. M. Ni, J. Zhou, J. Lin, 和 C. Wu (2025) 《Qwen-image-layered:通过图层分解实现内在可编辑性》。外部链接:2512.15603,链接 被引用:§2, §4.3.3。
- [60] T. Yin, M. Gharbi, T. Park, R. Zhang, E. Shechtman, F. Durand, 和 B. Freeman (2024) 《改进的分布匹配蒸馏用于快速图像合成》。神经信息处理系统进展 37, 页码 47455–47487。被引用:§1, §3.3, §4.4。
- [61] T. Yin, M. Gharbi, R. Zhang, E. Shechtman, F. Durand, W. T. Freeman, 和 T. Park (2024) 《基于分布匹配蒸馏的单步扩散》。收录于 IEEE/CVF 计算机视觉与模式识别会议论文集,页码 6613–6623。被引用:§1, §3.3, §4.4。
- [62] L. Zhang 和 M. Agrawala (2024) 《利用潜在透明度实现透明图像图层扩散》。ACM 图形学交易 43 (4), 页码 1–15。外部链接:文献编号 被引用:§1, §2。
- [63] X. Zhang, L. Yang, G. Li, Y. Cai, J. Xie, Y. Tang, Y. Yang, M. Wang, 和 B. Cui (2024) 《IterComp:从模型库中迭代式组合感知反馈学习用于文本到图像生成》。arXiv:2410.07171。被引用:§2。
- [64] X. Zhang, W. Zhao, X. Lu, 和 J. Chien (2023) 《Text2layer:使用潜在扩散模型进行分层图像生成》。arXiv 预印本 arXiv:2307.09781。被引用:§1, §2。
- [65] K. Zheng, Y. Wang, Q. Ma, H. Chen, J. Zhang, Y. Balaji, J. Chen, M. Liu, J. Zhu, 和 Q. Zhang (2025) 《通过分数正则化连续时间一致性进行大规模扩散蒸馏》。arXiv 预印本 arXiv:2510.08431。被引用:§1。
- [66] Z. Zhou, D. Chen, C. Wang, C. Chen, 和 S. Lyu (2024) 《扩散模型的简单快速蒸馏》。神经信息处理系统进展 37, 页码 40831–40860。被引用:§1。
- [67] Y. Zhu, X. Wang, S. Lathuilière, 和 V. Kalogeiton (2025) 《Di[m]o:将掩码扩散模型蒸馏为单步生成器》。收录于 IEEE/CVF 国际计算机视觉会议论文集,页码 18606–18618。被引用:§1。
\thetitle
补充材料
1 额外的消融实验
| 训练描述长度 | FIDmerged | |
|---|---|---|
| 短描述 | 长描述 | |
| 短描述 | 17.64 | 18.56 |
| 长描述 | 17.95 | 16.15 |
| 混合(50% 短描述 + 50% 长描述) | 16.13 | 15.93 |
| 方法 | 去噪步数 | 延迟(秒) | 加速比 | FIDmerged |
|---|---|---|---|---|
| 基线 | 50 | 14.4 | - | 16.02 |
| + 蒸馏 | 16 | 4.5 | 3.2 倍 | 16.21 |
| + 蒸馏 | 8 | 2.3 | 6.26 倍 | 18.58 |
1.1 使用可变描述长度的混合训练
表 1 展示了训练过程中描述多样性的重要性。使用混合描述长度训练的模型实现了最佳泛化能力,在短描述上的 FID 为 16.13,在长描述上的 FID 为 15.93。仅使用一种描述类型进行训练会产生领域差距:仅使用短描述训练在长描述上的 FID 降至 18.56,而仅使用长描述训练的 FID 为 16.15,显示出更好的鲁棒性,但在短描述上仍非最优。
| 层数 | 27 | 811 | 1214 | 1550 |
|---|---|---|---|---|
| PSNR | 22.51 | 21.99 | 21.36 | 20.65 |
| SSIM | 0.8932 | 0.8869 | 0.8780 | 0.8610 |
1.2 层数对图像到图层的影响
表 3 展示了我们的方法在图像到图层任务中,针对不同层数的可扩展性。该模型能有效处理 2 到 50 层的构图范围,在此宽范围内保持稳定的性能。这种灵活性使得无需修改架构即可分解简单设计和复杂的多元素构图。
1.3 蒸馏模型分析
为了评估我们方法在实际应用中的效率,我们在单块 NVIDIA H200 GPU 上进行了推理速度基准测试。我们将标准基线方法(使用 50 步去噪)与经过蒸馏的 MRT 模型在减少推理步数(16 步和 8 步)的情况下进行了对比。如表 2 所示,基线模型完成生成过程需要 14.4 秒。相比之下,应用 DMD2 蒸馏显著加速了推理过程。具体来说,我们的模型在 16 步时实现了加速(4.5 秒),且生成质量几乎没有下降(FID 仅从 16.02 略微上升至 16.21)。此外,将推理预算降至仅 8 步,可实现大幅加速(2.3 秒),这表明我们的方法成功地在高保真生成与交互级延迟之间取得了平衡。我们还在图 1 中展示了生成的样本,并对原始模型与蒸馏模型进行了比较。
2 图像到图层模型的注意力分析
为了验证我们的模型学习的是有意义的语义表征,而不仅仅是记忆布局先验,我们可视化了分解过程中生成的逐像素注意力图。图 2 展示了生成的透明图层与其相关注意力激活之间的对应关系。可以观察到,注意力机制表现出强大的空间定位能力。对于每个预测的图层,注意力权重(以热力图形式可视化)与目标元素的语义边界高度相关。例如,在重建高频成分(如第二个案例中的“Bundle of Joy”、第三个案例中的“Love NEVER FELT…”等文本)或精细图形元素时,注意力紧密聚焦于相关的字符笔画和形状,有效抑制了背景噪声。相反,对于背景图案或较大的几何形状,注意力则更广泛地作用,以捕捉该区域的纹理和空间范围。这一可视化证实,模型通过关注由布局引导的不同视觉特征,成功地将合成图像解耦,确保生成的 RGBA 图层具有清晰的 Alpha 遮罩和连贯的纹理。
3 用户研究详情
3.1 文本到图层任务的用户研究
为了评估我们的模型在文本到图层任务上的生成质量,我们进行了一项用户研究,将我们的方法(MRT)与基线方法(ART)进行了比较。我们采用了盲测、成对比较的设置。对于每个样本,参与者首先看到输入文本提示,随后并排展示由 MRT 和 ART 生成的相应结果。为了消除位置偏差,这两个结果的显示顺序(左侧或右侧)在每次评估中都是随机分配的。参与者被要求根据四个不同的维度进行三选一的强制选择投票——“方法 A 更好”、“方法 B 更好”或“平局”:(1) 元素(布局),(2) 视觉吸引力(美学),(3) 文本的正确性(排版),以及 (4) 每个图层的连贯性和质量(协调性)。
基于网页的评估界面如图 33 所示,两个生成结果并排显示,文本说明位于右侧面板。
3.2 图像到图层任务的用户研究
对于图像到图层任务,我们进行了一项全面的用户研究,通过在我们的方法与三个最先进的基线方法之间分别进行三组成对比较:(1) 我们的方法 vs. LayerD,(2) 我们的方法 vs. Lovart,以及 (3) 我们的方法 vs. Roboneo。每次比较都作为独立的盲测进行。每项研究中的参与者会看到一个三图像布局:原始输入图像作为中心参考显示,而我们的方法的结果和相应基线方法的结果则并排展示。为了消除位置偏差,我们的结果和基线结果的显示顺序(左侧或右侧)在每次试验中都是完全随机的。参与者被要求根据三个关键指标进行三选一的强制选择投票(“方法 A 更好”、“方法 B 更好”或“平局”):(1) 粒度,(2) 图层完整性,以及 (3) 图层质量。
评估界面如图 34 所示,参考输入图像显示在中心,两种方法的分解结果显示在两侧。
4 局限性
尽管我们的模型在图像到图层任务中表现出色,但在应用于真实世界照片时仍面临挑战。具体来说,我们的方法通常无法正确处理阴影,导致分割出的对象图层排除了阴影区域,而将阴影留在背景图层上,从而造成视觉上的不一致。我们将这一局限性主要归因于训练数据:我们的模型仅在设计数据集上训练,这些数据集是平面化的,缺乏自然场景中常见的阴影、反射和折射等物理效果。尽管存在这一领域差距,我们惊喜地发现,即使没有任何真实世界多层数据的监督,我们的方法仍然能够相当好地泛化到真实图像上。如我们的示例所示,大多数对象都能被成功分离,我们认为这得益于从 Qwen-Image 主干继承而来的强大视觉理解能力,证明了我们方法的鲁棒性、适应性和可扩展性。在未来的工作中,我们计划通过收集并训练包含阴影和反射等真实视觉效果的数据集,将我们的方法扩展到真实世界图像场景。我们相信,这样的扩展将进一步提升模型生成连贯且物理上合理的图层分解的能力。
5 可视化与定性分析
5.1 多样化的文本到图层生成
我们在图3至图9中展示了文本到图层任务的定性结果。我们的掩码区域Transformer展现了卓越的通用性,能够仅凭文本描述生成高保真的多层设计。如图3至图8所示,该模型成功合成了一致性构图,范围从简单布局到包含超过25层甚至更多图层的复杂设计,同时保持了严格的空间一致性和风格和谐。我们方法的一个关键优势是对多样化排版的原生支持;图9展示了我们独特的溢出生成能力。与以往将内容截断在画布边缘的方法不同,我们的模型能够生成完整的、全尺寸的RGBA图层,这些图层延伸至可见背景边界之外,从而为下游合成任务保留了完整的可编辑性和可复用性。此外,图10突出了该模型在多种语言(包括中文)中渲染准确视觉文本的能力,确保了其在全球设计应用中的实用价值。
5.2 图像到图层的对比分析
在图11至图18中,我们提供了我们的方法与最先进基线(包括LayerD、Lovart和RoboNeo)之间的全面定性比较。结果一致表明,我们的方法为图层分解质量树立了新的标准。虽然像RoboNeo这样的商业系统常常引入视觉伪影或无法生成干净的透明度,而像LayerD这样的学术基线则倾向于生成过度分组的图层,限制了编辑灵活性,但我们的掩码区域Transformer实现了更优的平衡。我们的方法在生成精确的Alpha遮罩、保持语义完整性以及实现恰当的分割粒度(例如,分离不同的视觉元素而非合并它们)方面表现出色。这在复杂的重叠区域尤为明显,我们的模型成功解开了其他方法无法分离的元素。
5.3 图像到图层任务中图层数量的可扩展性
为评估我们框架的鲁棒性,我们在图19至图23中展示了从6层到16层不同复杂度下的图像到图层分解结果。这些可视化结果证实,我们的架构能够有效扩展且性能不会下降。在多种图层数量情况下,模型在边界检测和内容保留方面均保持了一致的质量。这种跨不同图层数量的稳定性验证了我们的掩码注意力机制的有效性,证明该模型能够处理专业级平面设计的结构复杂性。
5.4 上下文感知的图层添加
图24展示了我们的图层到图层任务的能力,特别聚焦于图层添加。在此,我们模拟了一个用户编辑工作流,其中新元素(如文本或装饰性对象)根据文本提示和指定的边界框被插入到现有设计中。结果表明,我们的模型并非简单地粘贴孤立对象;相反,它生成的新图层具有上下文感知能力,能够匹配现有图层的照明、透视和艺术风格。通过以完整构图作为条件,添加的图层与原始设计无缝融合,在满足用户语义需求的同时保持了整体美学效果。
5.5 图层重风格化与协调
在图25中,我们展示了图层重风格化能力,即用户提供的素材被转换以符合目标设计的视觉特征。我们的模型在保留输入素材几何结构的同时,有效地进行了风格迁移。可视化结果表明,我们的单次生成方法确保了跨图层的一致性,成功地将外部素材的调色板、纹理和艺术渲染效果适配到已有的构图中。这一能力对于将不同元素统一整合为连贯的平面设计至关重要。
5.6 文本到图层任务中的布局泛化
图 26 和图 27 展示了文本提示词与空间控制之间相互作用的分析。在这些实验中,文本提示词包含对元素位置的隐式或显式描述,同时我们提供了可能与这些文本描述相冲突的不同空间布局(边界框)。值得注意的是,结果表明我们的模型表现出对用户提供布局的强遵循性,有效覆盖了文本提示词中存在的空间偏差,同时保留了语义内容。这证实了我们的框架成功地将语义生成与空间排列解耦,允许用户强制执行任意布局——例如将标题从顶部移动到底部——而不会影响生成内容的质量或提示词的语义保真度。
5.7 布局引导的图像分解
针对图像到图层任务,图 28 至图 30 可视化了输入光栅图像及其在推理过程中使用的相应布局结构(边界框和 Z 轴顺序)。这些示例说明了模型如何利用布局信息——无论是来自自动检测器还是人工标注——作为结构先验来指导分解过程。可视化结果表明,模型通过利用提供的空间线索,准确解决了光栅图像中的歧义,从而生成严格符合指定边界、具有语义意义的图层。这突显了模型能够生成专业编辑工作流程所必需的可控且可预测的分解结果。
5.8 对自然场景的泛化
尽管我们的模型仅在平面设计数据集(海报、传单等)上训练,图 31 展示了其对真实世界自然图像的零样本泛化能力。该模型利用从 Qwen-Image 主干继承而来的强大视觉理解能力,成功将照片中的物体分割到透明图层中。然而,我们观察到由于领域差异带来的一个特定局限:与平面设计不同,真实场景包含复杂的物理光照效果。因此,模型常常无法将投影与其对应的物体关联起来,导致投影留在背景层而非物体层上。尽管存在这一关于物理光照效果的局限,但模型在域外数据上的结构分解能力仍然出奇地稳健。
5.9 失败案例
最后,我们在图 32 中分析了具有代表性的失败案例,以提供对我们方法当前局限性的平衡视角。我们观察到所有四个任务中存在一个共性问题:部分透明背景被解码为灰色,而非保持透明。这种歧义的产生是因为我们的 VAE 编码器目前使用 3 通道输入,将透明图层压缩为灰色表示,解码器有时会错误地解读这种表示。未来的工作可以通过采用 4 通道编码器或替代编码方案来解决这一问题。此外,我们还识别出特定任务的局限:1)对于文本生成任务,模型有时难以准确渲染非常小的字形;2)对于图层间任务,我们偶尔会观察到身份保持(IP)和指令遵循方面的失败,尤其是在需要复杂风格迁移或精确物体插入时。这些案例为多层生成建模领域的未来研究指明了关键方向。


indicates equal first contribution. Corresponding author:
ryanyuan@canva.com
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—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 faster inference and saving a activation GPU memory consumption during image-to-layer inference.
1 Introduction
Text-to-image generation has achieved remarkable quality improvements in recent years through various technological advances, including large-scale diffusion transformers [37, 9, 36], distributed training on billions of high-quality text-image pairs [55, 14, 13, 43], rectified flow matching [9, 30] that transforms simple prior distributions into complex data distributions via straight paths, distribution matching distillation [61, 60, 41, 66, 67, 12, 34, 33, 65] for accelerated inference, and advanced text encoder architectures [14, 31, 32]. In contrast, generative models for layered image generation [62, 48, 28, 17, 64, 21, 22, 38, 5] remain significantly underdeveloped. This gap primarily stems from two factors: the absence of large-scale, high-quality datasets comparable to LAION-5B [42], and limited exploitation of prior knowledge from state-of-the-art open-source text-to-image models. These constraints have hindered systematic exploration of critical research directions in layered image synthesis.
We address this fundamental research gap through a comprehensive study on a high-quality, large-scale multi-layer dataset comprising over million samples—an order of magnitude larger than recent work [38]. Our dataset spans diverse resolutions and aspect ratios, encompassing over million unique layers and over million unique oversized visual elements to support overflow layer generation. We employ GPT-5 mini to generate global captions for all graphic designs. For visual text layers, we utilize ground-truth typography attributes, ensuring comprehensive high-quality annotations. To fully leverage this dataset at scale, we build our multi-layer generative model by implementing the masked region transformer on Qwen-Image [55], the largest open-source text-to-image diffusion model with approximately B parameters.
To advance the efficiency of layered image generation and editing during both training and inference, we introduce the following key technical contributions: First, we propose a unified masked region transformer framework that handles three complementary tasks: text-to-layers, image-to-layers, and layers-to-layers generation and editing. The key innovation lies in our adaptive masking mechanism, which determines whether to initialize each layer from clean latents or noise based on the specific task requirements. Second, our masked region transformer operates directly on the full-size canvas by treating the background as a special transparent foreground layer and encapsulating overflow layers that extend partially beyond the background region. This architecture ensures that all foreground layers maintain full reusability and can be arbitrarily repositioned on the canvas, which is illustrated in Figure 2 and experimental section. Third, we further propose leveraging distribution matching distillation schema to develop a few-step multi-layer generator with minimal quality degradation.
We conduct thorough ablation experiments to study the effects of different components. We empirically demonstrate that scaling both the model and dataset elevates performance to a new level, and that joint multi-task training further enhances performance while improving the user experience. We show that our image-to-layers task generalizes exceptionally well to various out-of-domain design images and natural images. Our layers-to-layers task readily supports multi-image fusion, seamlessly integrating any given user image into an existing design. We hope our masked region transformer advances the understanding of this fundamentally challenging task at an unprecedented scale.
2 Related Work
Layered image generation and editing task follows two paradigms: simultaneous generation (Text2Layer [64], LayerDiff [17], ART [38], PrismLayer [5], Qwen-Image-Layered [59]) and sequential generation (LayerDiffuse [62], COLE [22], OpenCOLE [21], LayerD [45]). Related layout generation and control methods fall into two categories: (1) generating layouts from visual elements [7, 44, 25, 10, 56, 19, 3, 18, 27, 6, 46, 24, 23, 54, 53, 15, 58, 20, 4, 11, 2], and (2) controlling generation via spatial conditioning [29, 52, 51, 1, 57, 26, 47, 40, 63, 10, 4]. Compared to the most closely related work, ART [38] and Qwen-Image-Layered [59], our masked region transformer unifies three tasks: text-to-layers, image-to-layers, and layers-to-layers generation. We further introduce native support for overflow layers and enable few-step multi-layer generation through distillation.
3 Approach
3.1 Scaling-up Layered Data and Diffusion Model
Scaled Layered Dataset. The scarcity of large-scale, high-quality multi-layer transparent images presents a fundamental challenge for advancing multi-layer generative modeling. Rather than relying on noisy, uncurated internet sources, we construct a curated in-house dataset comprising over 10M multi-layer graphic designs from one of the world’s largest graphic design platforms. All designs are created by professional designers and fully licensed for generative model training. Figure 1 illustrates key dataset statistics, showing that our dataset spans diverse aspect ratios and resolutions while supporting multilingual visual text rendering and bilingual text prompts.
Scaled Region Transformer. To incorporate the generation of overflow layers, we follow ART [38] to perform the denoising diffusion process in a regional manner as follows: First, we represent a multi-layer transparent image as {, , }, where is the composed image on the full-size canvas, is a semi-transparent RGBA background layer, and are RGBA foreground layers. Second, we perform the diffusion process on a merged image that integrates the fully transparent canvas as the base layer and overlays and all layers according to a predefined layout. Third, we use the WAN-2.1-VAE [50] encoder to extract the regional cropped representations for all foreground layers, the representation of the background layer, and the representation of the composed full design. Last, we implement an anonymous regional diffusion transformer [38] with B parameters following Qwen-Image [55] to perform full attention jointly on these regional foreground layer tokens, background layer tokens, and composed full design image tokens.
Overflow Layer Support. Previous work [38, 5] generates foreground layers only within the visible canvas region, producing incomplete elements that extend beyond background boundaries. This limits layer reusability, as shown in the second row of Figure 2. However, we find that over of samples in our training set contain overflow layers, making this a critical practical concern. To address this, we introduce an additional full-size canvas layer that supports generation of complete semi-transparent backgrounds and overflowing elements. This is feasible since we have access to ground-truth complete layers for all samples in our dataset. This design is essential for practical editing workflows: without it, layers extending beyond the canvas would be cropped and rendered non-editable, severely limiting their usability in downstream compositional tasks. Figure 2 shows representative overflow layer examples from our dataset (first row) and compares layered samples with and without overflow layer support (second and third rows).
3.2 Masked Region Transformer
We illustrate how our masked region diffusion transformer framework addresses three challenging multi-layer generation tasks—Text-to-Layers, Image-to-Layers, and Layers-to-Layers—in a unified manner in Figure 3. The key insight is to conditionally mask either the global image tokens or the combination of reference tokens and existing layer tokens within the regional diffusion transformer. Masked latents denote clean tokens encoding pre-existing conditions, with noise injection and diffusion supervision applied exclusively to non-masked tokens. We apply full attention between masked clean tokens and noise tokens, enabling the model to adaptively learn their relationships across different tasks. The detailed masking mechanism for each task is described as follows:
Text-to-Layers. The text-to-layers generation task aims to synthesize a multi-layer transparent design from a text prompt , comprising a canvas layer , a semi-transparent background layer , and foreground layers that compose into with overflow support. The canvas layer defines the full design dimensions to accommodate overflowing elements and is fully transparent by construction. Thus we apply diffusion to the concatenation of latents , excluding the canvas layer, conditioned on shared text embeddings . Following [38], we include to ensure layer coherence. Since no pre-existing layers exist, we set masked token as . See Figure 3 (panel 1) for details.
Let denote the concatenation of all non-masked clean latents, and denote the noise prior. The flow matching framework learns a vector field that transports samples from the noise distribution to the data distribution through a continuous-time interpolation path. At time-step , the interpolated latent is given by:
| (1) |
We train the diffusion model predicts the flow velocity conditioned on the interpolated latent , time-step , and text prompt : . The training objective minimizes the mean squared error between the predicted and ground-truth velocity:
| (2) |
where the ground-truth velocity along the interpolation path is (), the expectation is taken over the clean latents , random noise , and uniformly sampled time-steps .
Image-to-Layers. The image-to-layers task has emerged as a critical capability in commercial generative systems, with products such as Adobe Firefly’s Layered Image Editing and Lovart’s Edit Elements recently introducing support for this functionality. The image-to-layers task aims to decompose a raster image (or ) into a multi-layer transparent design comprising a canvas layer , a background layer and foreground layers , conditioned on a target layout specifying each layer’s spatial location and an optional text prompt for semantic guidance. This task inherently involves two subtasks: segmentation to identify layer regions with accurate alpha masks and inpainting to complete occluded areas. We either use human annotations or a layout detector to extract the target layout from the input raster image.
The masked clean tokens are set to the global composed image representation , encoding the conditional image targeted for decomposition. We add noise to the concatenation of the non-masked tokens . Through the regional diffusion process, the diffusion model is trained to extract all transparent layers conditioned on the given global image and layout. Since requiring users to provide designs with overflow layers is impractical, we instead use the latent encoding of pixels located within the visible canvas. See Figure 3 (panel 2) for details.
We observe that individual layers often exhibit structural ambiguity and can be further decomposed. To address this, we propose layer grouping augmentation, which randomly groups overlapping or adjacent layers during training. This strategy increases structural diversity, improves robustness to ambiguous boundaries, and enhances generalization to out-of-domain images with noisy layouts.
Layers-to-Layers. To enable a flexible, layer-wise interaction experience, we frame the layered image editing task as a layer-to-layer task that covers two key scenarios: (i) layer addition, which generates new coherent layers from text prompts conditioned on existing layers while maintaining spatial and stylistic consistency across the composition; and (ii) layer restylization, which focuses on transforming any user-provided images or transparent layers into stylistically aligned layers that match the appearance and visual identity of the existing composition.
To model the layers-to-layers task, we retain existing layer latents as masked clean tokens and apply diffusion only to: (i) newly added layers conditioned on text prompts, or (ii) designated layers conditioned on visual references for restylization. Given the challenge of constructing training data for these scenarios, we randomly select a subset of layers from each design to serve as conditional existing layers, treating the remaining layers as generation targets. For layer restylization training, we use Image editing model to transfer the style of non-selected layers, creating style-transformed variants as training pairs. See the appendix for details on the dataset construction pipeline.
Formally, in the layer addition task, we aim to synthesize a subset of foreground layers conditioned on the remaining layers and layer-level textual descriptions. We apply diffusion to the latent token sequence , where encodes the alpha-composited context formed by the background and all non-target layers. Let denote the indices of layers to be generated (an arbitrary subset, not necessarily contiguous). We set the masked clean tokens as , and treat the target slots as the non-masked tokens to be noised and denoised. The text condition is derived from a layer-caption prompt constructed by concatenating <layer> </layer> for all in layer order, where is the caption of layer . During training, we add noise to and optimize the flow-matching objective conditioned on ; during inference, we initialize from noise and denoise it under the same conditions, yielding the added layers in their original indices.
In the layer restylization task, we update a user-uploaded layered design by restylizing selected layers under additional appearance conditions while preserving the remaining layers. Given target indices , we construct by compositing the background with the non-target original layers , and keep as masked clean conditions. For each , we are additionally given a conditional latent that specifies the desired appearance of layer . We append as extra conditioning tokens and treat them as masked, so they are not prediction targets. To make this role explicit, we add a learnable condition-token embedding to the appended conditional tokens. We further copy the RoPE positional encoding from the corresponding original layer token to its conditional token, ensuring that the two tokens share identical spatial positional cues. Accordingly, we apply diffusion only to the non-masked original target slots , conditioned on and a fixed instruction prompt such as Harmonize these layers. During training, noise is added only to and the model is trained to denoise the original target slots under the conditional latents. During inference, we initialize from noise and denoise it under the same conditions, reading the final restylized layers from the original target slots while excluding the appended conditional tokens from the output layer set.
3.3 Accelerated Multi-Layer Generator
We adopt the improved distribution matching distillation (DMD) technique [61, 60, 35, 8] to compress our multi-step diffusion model (teacher) into a few-step generator (student) while maintaining distributional consistency between the teacher and student models. Let the teacher model denote the reverse process of a standard multi-step diffusion model, and let the student model approximate it using fewer denoising steps. The objective of DMD is to minimize the Kullback–Leibler (KL) divergence between the teacher and student transition distributions:
| (3) |
During inference, the distilled student model performs generation in a reduced number of steps , effectively approximating the teacher’s multi-step trajectory: , where we set . We show that the distilled model preserves the sample quality of the teacher while substantially reducing the number of sampling steps, resulting in faster and more efficient generation. We also support various techniques, such as CacheDiT and sequence parallelization across multiple GPUs, to further accelerate inference speed.
4 Experiment
4.1 Implementation Details
We conduct all experiments using Qwen-Image as our base architecture, consisting of 60 layers with a hidden dimension of 3584 and 24 attention heads per layer. We initialize model weights from the open-source pretrained checkpoint available on HuggingFace. Unlike previous approaches [38, 5] that fine-tune only LoRA [16] weights due to resource constraints, we perform full-parameter fine-tuning with FSDP2 to explore the model’s performance upper bound. This approach is necessary given the significant distribution shift from standard flat image generation and the inherent complexity of multi-layer synthesis.
For ablation experiments, we train on a curated subset of 0.5M layered designs for 4,000 iterations at resolution using H200 GPUs with the batch size 16 per GPU and 128 globally. We use the AdamW optimizer with a constant learning rate of . For system-level experiments, we employ two-stage training: 70,000 iterations at on the full 10M dataset, followed by 20,000 iterations at . This progressive strategy allows the model to first establish multi-layer decomposition capabilities before scaling to high resolution. Training uses H200 GPUs with batch size 16 per GPU and 1,024 globally.
4.2 Evaluation Protocol
Benchmark. We compare our approach with previous state-of-the-art methods on Design-Multi-Layer-Bench, introduced by ART [38], which is curated from the VistaCreate graphic design platform [49]. However, this evaluation dataset does not include overflow layers. To address this gap, we construct overflowerflow-Design-Bench to evaluate the model’s ability to generate complete layers from full layouts, which is essential for ensuring overflow layer reusability.
Metrics. We evaluate model performance from multiple perspectives. For merged image quality, we report PSNR, SSIM, PSNR, SSIM, FID (measuring overall coherence), and FID following [38]. Since our layer is RGBA images with transparency, we only compute on non-transparent pixels as PSNR and SSIM. For human evaluation, we collect multi-dimensional user preferences on a subset of Design-Multi-Layer-Bench for the text-to-layers (T2L) task and image-to-layers (I2L) task, reflecting real user experience. The evaluation protocol and interface are described in the supplementary material.
4.3 Main Results
4.3.1 Text-to-Layers: Comparison with SoTAs
We compare our method with ART [38] on a subset of Design-Multi-Layer-Bench. In our user study illustrated in Fig. 5, participants consistently preferred our results over ART in instruction following, overall aesthetics, and layer quality. These findings indicate stronger alignment between prompts and layered compositions, further illustrated in Fig. 4 by layouts that better preserve spatial intent and stylistic consistency.
Only our method natively supports generating overflow RGBA layers that extend beyond the background boundary on a full-size canvas, preserving editability and reuse; prior systems (e.g., ART) restrict pixels to the background region, leading to cropped or missing content. See Fig. 6 and Fig. 8 for a visual results.
4.3.2 Image-to-Layers: Comparison with SoTAs
In a user study comparing the layer decomposition capabilities of the latest work LayerD [45] and commercial systems like RoboNeo and Lovart, participants consistently preferred our method for layer quality, content integrity, and decompose granularity. Since I2L evaluation assumes a layer layout (bounding boxes with Z-order), we evaluate our method with the layout extracted by a z-order-aware detector (details in the supplementary). Qualitative comparisons in Fig. 19 also show that our method produces more complete, reusable RGBA layers with sharper boundaries. We further demonstrate the generalization of our model to natural scenes in Fig. 23.
4.3.3 Image-to-Layers: Comparison with con-current Qwen-Image-Layered
Recently, Qwen-Image-Layered [59] has attracted significant interest from the community since its release on Huggingface, due to its strong generalization capability on various design images. We demonstrate the advantages of our approach by conducting rigorous comparisons from three aspects: quality, latency, and memory.
Better Quality. We first construct an out-of-domain test set consisting of 100 creative designs obtained from three sources: images generated by the latest Nano-Banana-Pro (and Ideogram 3.0) image generation model and test images from the official Qwen-Image-Layered repository [39]. We report the quantitative comparison results in Table 1, which shows that our approach achieves significantly higher SNR and SSIM. We calculate the metrics across three groups based on the number of layers, and our MRT consistently performs better across all groups.
Fig. 9, Fig. 10, Fig. 11, Fig. 12, Fig. 13, Fig. 14, Fig. 15, and Fig. 16 provide further qualitative comparison results. We empirically find that our approach performs substantially better when required to decompose flat designs into an increasing number of transparent layers; our approach continues to perform well, while Qwen-Image-Layered struggled to assign meaningful objects to each layer. These visual results not only echo the above findings but also show that significant room for improvement remains, even though our model substantially outperforms Qwen-Image-Layered. We also conduct an apple-to-apple user study on this test set, with results reported in Fig. 7. Our approach achieves win rates of , , and for layer quality, integrity, and granularity, respectively.
Lower Latency. As shown in Fig. 18, due to our regional diffusion transformer architecture, we achieve significant speedup compared to Qwen-Image-Layered, which uses the same number of full-resolution tokens to model each transparent layer regardless of their actual area within the canvas. We achieve similar latency speed-up as the statistics shown in ART [38] and we further applied various advanced cache techniques, model distillation, lower-precision, parallel inference to optimize the latency of our model to within seconds when running with H100 GPUs and seconds on a single H100 GPU when required to decompose a single 1K high-resolution image into nearly 20 transparent layers.
Efficient Memory. Unlike Qwen-Image-Layered, which requires more visual tokens to extract different layers from a flat image, our approach is significantly more memory efficient, requiring far fewer tokens to decompose an image into many transparent layers. Fig. 18 shows latency vs. number of layers, latency vs. number of tokens, and peak memory consumption vs. number of layers. Our method achieves clear advantages in both inference speed and memory usage; for example, generating more then layers with our MRT results in over acceleration.
Challenges. We identify several remaining key challenges in the image-to-layer decomposition task: (i) limited generalization to photorealistic images, where models struggle to maintain fidelity and realism on diverse real-world scenes; (ii) ambiguity in layer granularity, arising from the ill-posed nature of layer definitions and the absence of clear ground-truth separation; (iii) occluded layer completion, which remains difficult when layered occlusions involve semi-transparent or complex blending; and (iv) background inpainting, where reconstructing plausible unseen regions is challenging under severe occlusion. We visualize representative failure cases in Fig. 17. The principal causes of failures in occluded layer completion are twofold: on the one hand, the layout detector may fail to predict accurate amodal bounding regions for occluded layers; on the other hand, the image-to-layer generation model may not faithfully reconstruct complex occluded pixels due to insufficient contextual cues and data diversity. These limitations highlight avenues for future research.
| PSNRmerged | SSIMmerged | |||||
|---|---|---|---|---|---|---|
| Layers | ||||||
| MRT (Ours) | 27.3440 | 25.9068 | 25.7229 | 0.9034 | 0.8762 | 0.8485 |
| Qwen-Image-Layered | 25.8111 | 23.0645 | 22.1828 | 0.8706 | 0.8319 | 0.8065 |
4.3.4 Layers-to-Layers: Layered Editing
To the best of our knowledge, no prior work has studied the task of layered image editing. To establish a comparison for this task, we instantiate a baseline using GPT-Image-1, which supports multi-conditional image inputs and transparent RGBA layer outputs. We report results for our approach on two key tasks, detail how GPT-Image-1 is configured as a competitive baseline, and highlight the distinctive properties of our method.



Layer Addition. Layer Addition aims to insert new layers into an existing design conditioned on layer-wise captions. In this comparison, we simulate the user by providing two target bounding boxes on the template together with the corresponding layer-wise captions. Our model predicts the requested layers in parallel while maintaining cross-layer consistency. For GPT-Image-1, we adopt an iterative generation procedure. We condition on the current composite image, draw red bounding boxes at the insertion locations, and input the corresponding layer-wise caption to GPT-Image-1, which outputs a transparent RGBA layer. We then insert the generated layer at the specified position and iterate the process for the remaining layers. By generating multiple layers in single pass and conditioning on all layers, our method better captures inter-layer relationships and produces coherent insertions that preserve global composition and style in Fig. 21 and outperforms GPT-Image-1.
Layer Restylization. For restylizing target layers, the user provides assets to be placed on the canvas; we restylize these assets into layers that harmonize with the overall composition. For GPT-Image-1, we provide multi-image inputs: the merged image of existing layers annotated with a red bounding box to indicate the insertion location, together with the user-specified asset. After predicting one layer, we insert it at the specified position and iterate for the remaining targets. Our method harmonizes all selected layers in a single pass, whereas GPT-Image-1 requires layer-by-layer generation, which increases latency and may propagate inconsistencies across multiple edits. Fig. 21 shows that our edits better preserve geometry while adapting appearance to the target style.
4.4 Ablation Study and Analaysis
Larger models and dataset improve quality. To demonstrate the importance of model and dataset scaling, we train text-to-layers models using FLUX.1 [dev] (13B) and Qwen-Image (20B) on the same 0.5M-sample dataset. Model scaling alone reduces FID from to . Subsequently scaling the dataset to 10M samples further reduces FID to under a limited training budget, with additional gains expected from extended training. These results confirm that both model capacity and dataset scale are essential for high-quality generation.
| Training Data | FIDmerged | PSNR | SSIM |
|---|---|---|---|
| w/o overflow data | 15.68 | 21.81 | 0.8543 |
| w/ overflow data | 16.15 | 22.75 | 0.8711 |
| method | task mix ratio | FIDmerged | PSNR | SSIM |
|---|---|---|---|---|
| T2L | 100% / 0% / 0% | 16.15 | 22.75 | 0.8711 |
| T2L+I2L | 80% / 20% / 0% | 15.68 | 23.06 | 0.8924 |
| T2L+I2L+L2L | 70% / 15% / 15% | 17.06 | 21.97 | 0.8606 |
| method | PSNR | SSIM | PSNR | SSIM |
|---|---|---|---|---|
| w/o text condition | 21.27 | 0.8697 | 26.03 | 0.9794 |
| w/ text condition | 21.65 | 0.8805 | 27.24 | 0.9846 |
| method | PSNR | SSIM | PSNR | SSIM |
|---|---|---|---|---|
| w/o merge aug. | 21.65 | 0.8805 | 27.24 | 0.9846 |
| w/ merge aug. | 21.97 | 0.8864 | 26.96 | 0.9840 |
| method | Denoise steps | FIDmerged |
|---|---|---|
| Baseline | 50 | 16.02 |
| + DMD2 Distillation | 16 | 16.21 |
| + DMD2 Distillation | 8 | 18.58 |
Overflow support w/o performance loss. Table 6 evaluates the impact of overflow-aware generation. Over 60% of designs contain overflow layers while previous works all truncate these elements, severely limiting editability and reusability. Training with overflow data enables complete layer generation with minimal performance cost: our model achieves comparable FID, PSNR, and SSIM scores while uniquely preserving overflow elements.
Multi-task training and performance trade-offs Table 6 shows unified multi-task training with random task sampling. Our framework integrates all three tasks without multi-stage fine-tuning while maintaining comparable performance across configurations, demonstrating minimal degradation from unification. We observe that introducing the layers-to-layers task slightly reduces overall performance, which we attribute to layer-to-layer dataset quality issues—a direction we leave for future work.
Textual conditioning is not essential for image-to-layers. An important question is whether global captions are necessary for image-to-layers decomposition. Table 6 ablates caption conditioning and shows modest but consistent improvements across metrics. This reveals a noteworthy finding: while textual guidance aids boundary disambiguation and provides semantic cues for complex overlapping compositions, it is not essential for our framework.
Layer grouping augmentation improves robustness. Table 6 validates layer grouping augmentation. Since our framework requires layout inputs, a distribution gap exists between precise training layout annotations and noisy test-time layouts from users or detectors. We address this by randomly merging layers during training to increase layout diversity. This strategy yields consistent improvements even on Design-Multi-Layer-Bench with high-quality layout annotations, with larger gains expected under noisy layout conditions.
Distilled multi-layer generator brings significant acceleration. By incorporating DMD2 distillation [61, 60], we accelerate our multi-layer generation from to denoising steps, achieving a speedup with minimal performance degradation. FID scores remain comparable in Table 6 and visual quality is largely preserved in Fig. 22, demonstrating the effectiveness of distillation for few-step generation in multi-layer image diffusion models.
Additional ablations. We provide additional ablation studies on caption length, multilingual design generation, and fine-tuning with PrismLayers data in the supplementary material.
5 Conclusion
In this paper, we have presented the first systematic study examining the performance frontier of multi-layer transparent image generation at scale. We introduced the Masked Region Transformer, a large-scale diffusion framework that unifies text-to-layers, image-to-layers, and layers-to-layers generation within a shared masked region paradigm. Trained on over 10M multilingual design samples, our 20B-parameter model incorporates key technical innovations: an overflow-aware canvas layer for complete boundary handling, and distribution matching distillation for real-time generation. Together, these contributions enable efficient synthesis of high-fidelity, semi-transparent, fully editable visual layers.
References
- [1] O. Bar-Tal, L. Yariv, Y. Lipman, and T. Dekel (2023) MultiDiffusion: fusing diffusion paths for controlled image generation. In ICML, Cited by: §2.
- [2] C. Braunstein, H. Petekkaya, J. E. Lenssen, M. Toneva, and E. Ilg (2024) SLayR: scene layout generation with rectified flow. arXiv preprint arXiv:2412.05003. Cited by: §2.
- [3] S. Chai, L. Zhuang, and F. Yan (2023) LayoutDM: transformer-based diffusion model for layout generation. In CVPR, Cited by: §2.
- [4] J. Chen, R. Zhang, Y. Zhou, J. Healey, J. Gu, Z. Xu, and C. Chen (2024) TextLap: customizing language models for text-to-layout planning. In EMNLP Findings, Cited by: §2.
- [5] J. Chen, H. Jiang, Y. Wang, K. Wu, J. Li, C. Zhang, K. Yanai, D. Chen, and Y. Yuan (2025) PrismLayers: open data for high-quality multi-layer transparent image generative models. arXiv preprint arXiv:2505.22523. Cited by: §1, §2, §3.1, §4.1.
- [6] C. Cheng, F. Huang, G. Li, and Y. Li (2023) Play: parametrically conditioned layout generation using latent diffusion. In ICML, Cited by: §2.
- [7] Y. Cheng, Z. Zhang, M. Yang, H. Nie, C. Li, X. Wu, and J. Shao (2024) Graphic design with large multimodal model. arXiv:2404.14368. Cited by: §2.
- [8] Z. Dong, R. Zhao, S. Wu, J. Yi, L. Li, Z. Yang, L. Wang, and A. J. Wang (2025) Glance: accelerating diffusion models with 1 sample. External Links: 2512.02899, Link Cited by: §3.3.
- [9] P. Esser, S. Kulal, A. Blattmann, R. Entezari, J. Müller, H. Saini, Y. Levi, D. Lorenz, A. Sauer, F. Boesel, et al. (2024) Scaling rectified flow transformers for high-resolution image synthesis. In Forty-first international conference on machine learning, Cited by: §1.
- [10] W. Feng, W. Zhu, T. Fu, V. Jampani, A. Akula, X. He, S. Basu, X. E. Wang, and W. Y. Wang (2024) LayoutGPT: compositional visual planning and generation with large language models. In NeurIPS, Cited by: §2.
- [11] A. Fontanella, P. Tudosiu, Y. Yang, S. Zhang, and S. Parisot (2024) Generating compositional scenes via text-to-image rgba instance generation. arXiv preprint arXiv:2411.10913. Cited by: §2.
- [12] K. Frans, D. Hafner, S. Levine, and P. Abbeel (2024) One step diffusion via shortcut models. arXiv preprint arXiv:2410.12557. Cited by: §1.
- [13] Y. Gao, L. Gong, Q. Guo, X. Hou, Z. Lai, F. Li, L. Li, X. Lian, C. Liao, L. Liu, et al. (2025) Seedream 3.0 technical report. arXiv preprint arXiv:2504.11346. Cited by: §1.
- [14] L. Gong, X. Hou, F. Li, L. Li, X. Lian, F. Liu, L. Liu, W. Liu, W. Lu, Y. Shi, et al. (2025) Seedream 2.0: a native chinese-english bilingual image generation foundation model. arXiv preprint arXiv:2503.07703. Cited by: §1.
- [15] J. J. A. Guerreiro, N. Inoue, K. Masui, M. Otani, and H. Nakayama (2024) LayoutFlow: flow matching for layout generation. In ECCV, Cited by: §2.
- [16] E. J. Hu, Y. Shen, P. Wallis, Z. Allen-Zhu, Y. Li, S. Wang, L. Wang, W. Chen, et al. (2022) Lora: low-rank adaptation of large language models.. ICLR 1 (2), pp. 3. Cited by: §4.1.
- [17] R. Huang, K. Cai, J. Han, X. Liang, R. Pei, G. Lu, S. Xu, W. Zhang, and H. Xu (2024) LayerDiff: exploring text-guided multi-layered composable image synthesis via layer-collaborative diffusion model. In ECCV, Cited by: §1, §2.
- [18] M. Hui, Z. Zhang, X. Zhang, W. Xie, Y. Wang, and Y. Lu (2023) Unifying layout generation with a decoupled diffusion model. In CVPR, Cited by: §2.
- [19] N. Inoue, K. Kikuchi, E. Simo-Serra, M. Otani, and K. Yamaguchi (2023) LayoutDM: discrete diffusion model for controllable layout generation. In CVPR, Cited by: §2.
- [20] N. Inoue, K. Kikuchi, E. Simo-Serra, M. Otani, and K. Yamaguchi (2023) Towards flexible multi-modal document models. In CVPR, Cited by: §2.
- [21] N. Inoue, K. Masui, W. Shimoda, and K. Yamaguchi (2024) OpenCOLE: towards reproducible automatic graphic design generation. In CVPR Workshops, Cited by: §1, §2.
- [22] P. Jia, C. Li, Z. Liu, Y. Shen, X. Chen, Y. Yuan, Y. Zheng, D. Chen, J. Li, X. Xie, et al. (2023) COLE: a hierarchical generation framework for graphic design. arXiv preprint arXiv:2311.16974. Cited by: §1, §2.
- [23] Z. Jiang, J. Guo, S. Sun, H. Deng, Z. Wu, V. Mijovic, Z. J. Yang, J. Lou, and D. Zhang (2023) LayoutFormer++: conditional graphic layout generation via constraint serialization and decoding space restriction. In CVPR, Cited by: §2.
- [24] Z. Jiang, S. Sun, J. Zhu, J. Lou, and D. Zhang (2022) Coarse-to-fine generative modeling for graphic layouts. In AAAI, Cited by: §2.
- [25] K. Kikuchi, N. Inoue, M. Otani, E. Simo-Serra, and K. Yamaguchi (2024) Multimodal markup document models for graphic design completion. arXiv:2409.19051. Cited by: §2.
- [26] Y. Kim, J. Lee, J. Kim, J. Ha, and J. Zhu (2023) Dense text-to-image generation with attention modulation. In ICCV, Cited by: §2.
- [27] X. Kong, L. Jiang, H. Chang, H. Zhang, Y. Hao, H. Gong, and I. Essa (2022) BLT: bidirectional layout transformer for controllable layout generation. In ECCV, Cited by: §2.
- [28] P. Li, Q. Huang, Y. Ding, and Z. Li (2023) Layerdiffusion: layered controlled image editing with diffusion models. In SIGGRAPH Asia 2023 Technical Communications, pp. 1–4. Cited by: §1.
- [29] Y. Li, H. Liu, Q. Wu, F. Mu, J. Yang, J. Gao, C. Li, and Y. J. Lee (2023) GLIGEN: open-set grounded text-to-image generation. In CVPR, Cited by: §2.
- [30] Y. Lipman, R. T. Chen, H. Ben-Hamu, M. Nickel, and M. Le (2022) Flow matching for generative modeling. arXiv preprint arXiv:2210.02747. Cited by: §1.
- [31] B. Liu, E. Akhgari, A. Visheratin, A. Kamko, L. Xu, S. Shrirao, C. Lambert, J. Souza, S. Doshi, and D. Li (2024) Playground v3: improving text-to-image alignment with deep-fusion large language models. arXiv preprint arXiv:2409.10695. Cited by: §1.
- [32] Z. Liu, W. Liang, Z. Liang, C. Luo, J. Li, G. Huang, and Y. Yuan (2024) Glyph-byt5: a customized text encoder for accurate visual text rendering. In European Conference on Computer Vision, pp. 361–377. Cited by: §1.
- [33] C. Lu and Y. Song (2024) Simplifying, stabilizing and scaling continuous-time consistency models. arXiv preprint arXiv:2410.11081. Cited by: §1.
- [34] W. Luo, Z. Huang, Z. Geng, J. Z. Kolter, and G. Qi (2024) One-step diffusion distillation through score implicit matching. Advances in Neural Information Processing Systems 37, pp. 115377–115408. Cited by: §1.
- [35] Y. Luo, T. Hu, J. Sun, Y. Cai, and J. Tang (2025) Learning few-step diffusion models by trajectory distribution matching. External Links: 2503.06674, Link Cited by: §3.3.
- [36] N. Ma, M. Goldstein, M. S. Albergo, N. M. Boffi, E. Vanden-Eijnden, and S. Xie (2024) Sit: exploring flow and diffusion-based generative models with scalable interpolant transformers. In European Conference on Computer Vision, pp. 23–40. Cited by: §1.
- [37] W. Peebles and S. Xie (2023) Scalable diffusion models with transformers. In Proceedings of the IEEE/CVF international conference on computer vision, pp. 4195–4205. Cited by: §1.
- [38] Y. Pu, Y. Zhao, Z. Tang, R. Yin, H. Ye, Y. Yuan, D. Chen, J. Bao, S. Zhang, Y. Wang, et al. (2025) Art: anonymous region transformer for variable multi-layer transparent image generation. In Proceedings of the Computer Vision and Pattern Recognition Conference, pp. 7952–7962. Cited by: §1, §1, §2, §3.1, §3.1, §3.2, §4.1, §4.2, §4.2, §4.3.1, §4.3.3.
- [39] Qwen (2025) Qwen-Image-Layered. Note: https://github.com/QwenLM/Qwen-Image-Layered/tree/main/assets/test_images Cited by: §4.3.3.
- [40] V. Sarukkai, L. Li, A. Ma, C. Ré, and K. Fatahalian (2024) Collage diffusion. In WACV, Cited by: §2.
- [41] A. Sauer, D. Lorenz, A. Blattmann, and R. Rombach (2024) Adversarial diffusion distillation. In European Conference on Computer Vision, pp. 87–103. Cited by: §1.
- [42] C. Schuhmann, R. Beaumont, R. Vencu, C. Gordon, R. Wightman, M. Cherti, T. Coombes, A. Katta, C. Mullis, M. Wortsman, et al. (2022) Laion-5b: an open large-scale dataset for training next generation image-text models. Advances in neural information processing systems 35, pp. 25278–25294. Cited by: §1.
- [43] T. Seedream, Y. Chen, Y. Gao, L. Gong, M. Guo, Q. Guo, Z. Guo, X. Hou, W. Huang, Y. Huang, et al. (2025) Seedream 4.0: toward next-generation multimodal image generation. arXiv preprint arXiv:2509.20427. Cited by: §1.
- [44] M. A. Shabani, Z. Wang, D. Liu, N. Zhao, J. Yang, and Y. Furukawa (2024) Visual Layout Composer: image-vector dual diffusion model for design layout generation. In CVPR, Cited by: §2.
- [45] T. Suzuki, K. Liu, N. Inoue, and K. Yamaguchi (2025) LayerD: decomposing raster graphic designs into layers. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 17783–17792. Cited by: §2, §4.3.2.
- [46] Z. Tang, C. Wu, J. Li, and N. Duan (2023) LayoutNUWA: revealing the hidden layout expertise of large language models. In ICLR, Cited by: §2.
- [47] O. Team (2024) Omost github page. Cited by: §2.
- [48] P. Tudosiu, Y. Yang, S. Zhang, F. Chen, S. McDonagh, G. Lampouras, I. Iacobacci, and S. Parisot (2024) MULAN: a multi layer annotated dataset for controllable text-to-image generation. In Proceedings of the IEEE/CVF Conference on Computer Vision and Pattern Recognition, pp. 22413–22422. Cited by: §1.
- [49] VistaCreate Team (2025) VistaCreate (formerly crello) graphic design platform. Note: https://create.vista.com/Accessed: 2025-11-09 Cited by: §4.2.
- [50] T. Wan, A. Wang, B. Ai, B. Wen, C. Mao, C. Xie, D. Chen, F. Yu, H. Zhao, J. Yang, et al. (2025) Wan: open and advanced large-scale video generative models. arXiv preprint arXiv:2503.20314. Cited by: §3.1.
- [51] X. Wang, S. Fu, Q. Huang, W. He, and H. Jiang (2024) MS-Diffusion: multi-subject zero-shot image personalization with layout guidance. arXiv:2406.07209. Cited by: §2.
- [52] X. Wang, T. Darrell, S. S. Rambhatla, R. Girdhar, and I. Misra (2024) InstanceDiffusion: instance-level control for image generation. In CVPR, Cited by: §2.
- [53] Y. Wang, Z. Chen, L. Zhong, Z. Ding, Z. Sha, and Z. Tu (2024) Dolfin: diffusion layout transformers without autoencoder. In ECCV, Cited by: §2.
- [54] H. Weng, D. Huang, Y. Qiao, Z. Hu, C. Lin, T. Zhang, and C. Chen (2024) Desigen: a pipeline for controllable design template generation. In CVPR, Cited by: §2.
- [55] C. Wu, J. Li, J. Zhou, J. Lin, K. Gao, K. Yan, S. Yin, S. Bai, X. Xu, Y. Chen, et al. (2025) Qwen-image technical report. arXiv preprint arXiv:2508.02324. Cited by: §1, §1, §3.1.
- [56] K. Yamaguchi (2021) CanvasVAE: learning to generate vector graphic documents. arXiv preprint arXiv:2108.01249. Cited by: §2.
- [57] L. Yang, Z. Yu, C. Meng, M. Xu, S. Ermon, and B. Cui (2024) Mastering text-to-image diffusion: recaptioning, planning, and generating with multimodal LLMs. In ICML, Cited by: §2.
- [58] T. Yang, Y. Luo, Z. Qi, Y. Wu, Y. Shan, and C. W. Chen (2024) PosterLLaVa: constructing a unified multi-modal layout generator with LLM. arXiv:2406.02884. Cited by: §2.
- [59] S. Yin, Z. Zhang, Z. Tang, K. Gao, X. Xu, K. Yan, J. Li, Y. Chen, Y. Chen, H. Shum, L. M. Ni, J. Zhou, J. Lin, and C. Wu (2025) Qwen-image-layered: towards inherent editability via layer decomposition. External Links: 2512.15603, Link Cited by: §2, §4.3.3.
- [60] T. Yin, M. Gharbi, T. Park, R. Zhang, E. Shechtman, F. Durand, and B. Freeman (2024) Improved distribution matching distillation for fast image synthesis. Advances in neural information processing systems 37, pp. 47455–47487. Cited by: §1, §3.3, §4.4.
- [61] T. Yin, M. Gharbi, R. Zhang, E. Shechtman, F. Durand, W. T. Freeman, and T. Park (2024) One-step diffusion with distribution matching distillation. In Proceedings of the IEEE/CVF conference on computer vision and pattern recognition, pp. 6613–6623. Cited by: §1, §3.3, §4.4.
- [62] L. Zhang and M. Agrawala (2024) Transparent image layer diffusion using latent transparency. ACM Transactions on Graphics 43 (4), pp. 1–15. External Links: Document Cited by: §1, §2.
- [63] X. Zhang, L. Yang, G. Li, Y. Cai, J. Xie, Y. Tang, Y. Yang, M. Wang, and B. Cui (2024) IterComp: iterative composition-aware feedback learning from model gallery for text-to-image generation. arXiv:2410.07171. Cited by: §2.
- [64] X. Zhang, W. Zhao, X. Lu, and J. Chien (2023) Text2layer: layered image generation using latent diffusion model. arXiv preprint arXiv:2307.09781. Cited by: §1, §2.
- [65] K. Zheng, Y. Wang, Q. Ma, H. Chen, J. Zhang, Y. Balaji, J. Chen, M. Liu, J. Zhu, and Q. Zhang (2025) Large scale diffusion distillation via score-regularized continuous-time consistency. arXiv preprint arXiv:2510.08431. Cited by: §1.
- [66] Z. Zhou, D. Chen, C. Wang, C. Chen, and S. Lyu (2024) Simple and fast distillation of diffusion models. Advances in Neural Information Processing Systems 37, pp. 40831–40860. Cited by: §1.
- [67] Y. Zhu, X. Wang, S. Lathuilière, and V. Kalogeiton (2025) Di [m] o: distilling masked diffusion models into one-step generator. In Proceedings of the IEEE/CVF International Conference on Computer Vision, pp. 18606–18618. Cited by: §1.
\thetitle
Supplementary Material
1 Additional ablation experiments
| Training Caption Length | FIDmerged | |
|---|---|---|
| Short Cap. | Long Cap. | |
| Short Cap. | 17.64 | 18.56 |
| Long Cap. | 17.95 | 16.15 |
| Mixed (50% short + 50% long) | 16.13 | 15.93 |
| method | Denoise steps | Latency(s) | Speed up | FIDmerged |
|---|---|---|---|---|
| Baseline | 50 | 14.4 | - | 16.02 |
| + Distill | 16 | 4.5 | 3.2x | 16.21 |
| + Distill | 8 | 2.3 | 6.26x | 18.58 |
1.1 Mixed Training with Variable Caption Length
Table 1 demonstrates the importance of caption diversity during training. Models trained with mixed caption lengths achieve the best generalization, with FID of 16.13 on short captions and 15.93 on long captions. Training exclusively on one caption type creates a domain gap: short-caption-only training degrades to 18.56 FID on long captions, while long-caption-only training achieves 16.15 FID, showing better robustness but still suboptimal on short captions.
| #layer numbers | 27 | 811 | 1214 | 1550 |
|---|---|---|---|---|
| PSNR | 22.51 | 21.99 | 21.36 | 20.65 |
| SSIM | 0.8932 | 0.8869 | 0.8780 | 0.8610 |
1.2 Effect of Layer Numbers on Image-to-layer
Table 3 demonstrates our method’s scalability across different layer counts for the image-to-layers task. The model handles compositions ranging from 2 to 50 layers effectively, maintaining stable performance across this wide range. This flexibility enables decomposition of both simple designs and complex multi-element compositions without architectural modifications.
1.3 Analysis of Distilled Models
To evaluate the real-world efficiency of our approach, we conducted inference speed benchmarks on a single NVIDIA H200 GPU. We compared the standard baseline method (operating at 50 denoising steps) against our distilled MRT model at reduced inference steps (16 and 8 steps). As shown in Table 2, the baseline model requires 14.4 seconds to complete the generation process. In contrast, applying DMD2 distillation significantly accelerates inference. Specifically, our model achieves a speed-up (4.5s) at 16 steps with negligible degradation in generation quality (FID increases only slightly from 16.02 to 16.21). Furthermore, reducing the inference budget to just 8 steps yields a massive speed-up (2.3s), showing that our method successfully balances high-fidelity generation with interactive-level latency. We also present the generated samples and compare the original and distilled models in Fig. 1.
2 Attention Analysis of Image-to-Layer Model
To validate that our model learns meaningful semantic representations rather than merely memorizing layout priors, we visualize the pixel-wise attention maps generated during the decomposition process. Fig. 2 illustrates the correspondence between the generated transparent layers and their associated attention activations. As observed, the attention mechanism exhibits strong spatial localization capabilities. For each predicted layer, the attention weights (visualized as heatmaps) highly correlate with the semantic boundaries of the target elements. For instance, when reconstructing high-frequency components such as text (e.g., “Bundle of Joy” in the second case, “Love NEVER FELT…” in the third one) or fine-grained graphical elements, the attention is tightly focused on the relevant character strokes and shapes, effectively suppressing background noise. Conversely, for background patterns or larger geometric shapes, the attention acts more broadly to capture the texture and spatial extent of the region. This visualization confirms that the model successfully disentangles the composite image by attending to distinct visual features guided by the layout, ensuring that the resulting RGBA layers possess clean alpha mattes and coherent textures.
3 User study details
3.1 User Study on Text-to-Layer Task
To evaluate the generation quality of our models on the text-to-layer task, we conducted a user study comparing our method (MRT) with the baseline (ART). We employed a blind, pairwise comparison setup. For each sample, participants were first shown the input text prompt, followed by the corresponding results generated by MRT and ART displayed side-by-side. To eliminate positional bias, the display order (left or right) of these two results was randomized for each evaluation. Participants were asked to cast a three-way forced-choice vote—”Method A is better,” ”Method B is better,” or ”Tie”—across four distinct dimensions: (1) elements (layout), (2) visual appeal (aesthetics), (3) correctness of the text (typography), and (4) coherence and quality of each layer (harmonization).
The web-based evaluation interface is shown in Fig. 33, where two generated results are displayed side-by-side with the text caption provided on the right panel.
3.2 User Study on Image-to-Layer Task
For the image-to-layers task, we conducted a comprehensive user study by performing three separate pairwise comparisons between our method and three state-of-the-art baselines: (1) Ours vs. LayerD, (2) Ours vs. Lovart, and (3) Ours vs. Roboneo. Each comparison was run as an independent blind test. Participants in each study were presented with a three-image layout: the original input image was displayed as a central reference, while our method’s result and the corresponding baseline’s result were shown side-by-side. To eliminate positional bias, the display order (left or right) of our result and the baseline’s result was fully randomized in every trial. Participants were asked to make a three-way forced-choice vote (”Method A is better,” ”Method B is better,” or ”Tie”) based on three key metrics: (1) granularity, (2) layer integrity, and (3) layer quality.
The evaluation interface is illustrated in Fig. 34, where the reference input image is shown at the center with decomposition results from two methods displayed on both sides.
4 Limitations
Although our model demonstrates strong performance in the image-to-layer task, it faces challenges when applied to real-world photographs. Specifically, our method often fails to correctly handle shadows, resulting in segmented object layers that exclude shadow regions and leaving the shadows on the background layer, which leads to visual inconsistency. We attribute this limitation primarily to our training data: our model was trained exclusively on design datasets, which are planar and lack physical effects such as shadows, reflections, and refractions that commonly appear in natural scenes. Despite this domain gap, we were pleasantly surprised to find that our method can still generalize reasonably well to real images, even without any supervision on real-world multi-layer data. As shown in our illustrations, most objects are successfully separated, which we believe stems from the strong visual understanding capability inherited from the Qwen-Image backbone, demonstrating the robustness, adaptability, and scalability of our approach. In future work, we plan to extend our method to real-world image scenarios by collecting and training on datasets that include realistic visual effects such as shadows and reflections. We believe such extensions will further enhance the model’s ability to produce coherent and physically plausible layer decompositions.
5 Visualizations and Qualitative Analysis
5.1 Diverse Text-to-Layer Generation
We visualize the qualitative results of our Text-to-Layer task in Fig. 3 through Fig. 9. Our Masked Region Transformer demonstrates exceptional versatility in generating high-fidelity multi-layer designs solely from textual descriptions. As shown in Fig. 3 through Fig. 8, the model successfully synthesizes coherent compositions ranging from simple layouts to complex designs with over 25 layers and even more, maintaining strict spatial consistency and stylistic harmony. A key advantage of our approach is the native support for diverse typography; Fig. 9 illustrates our unique overflow generation capability. Unlike prior methods that truncate content at the canvas edge, our model generates complete, full-size RGBA layers that extend beyond the visible background boundary, thereby preserving full editability and reusability for downstream compositional tasks. Furthermore, Fig. 10 highlights the model’s capability to render accurate visual text across multiple languages, including Chinese, ensuring practical utility for global design applications.
5.2 Comparative Analysis of Image-to-Layer
In Fig. 11 through Fig. 18, we provide a comprehensive qualitative comparison between our approach and state-of-the-art baselines, including LayerD, Lovart, and RoboNeo. The results consistently demonstrate that our method establishes a new standard for layer decomposition quality. While commercial systems like RoboNeo often introduce visual artifacts or fail to produce clean transparency, and academic baselines like LayerD tend to produce overly grouped layers that limit editing flexibility, our Masked Region Transformer achieves a superior balance. Our method excels in generating precise alpha mattes, maintaining semantic integrity, and achieving appropriate decomposition granularity (e.g., separating distinct visual elements rather than merging them). This is particularly evident in complex overlapping regions, where our model successfully disentangles elements that other methods fail to separate.
5.3 Scalability on Layer Counts in Image-to-Layer
To evaluate the robustness of our framework, we visualize image-to-layers decomposition results across varying degrees of complexity in Fig. 19 through Fig. 23, ranging from 6 layers up to 16 layers. These visualizations confirm that our architecture scales effectively without performance degradation. The model maintains consistent quality in boundary detection and content preservation in cases of a wide range of layer counts. This stability across diverse layer counts validates the efficacy of our masked attention mechanism, proving that the model can handle the structural complexity of professional-grade graphic designs.
5.4 Context-Aware Layer Addition
Fig. 24 demonstrates the capabilities of our layers-to-layers task, specifically focusing on layer addition. Here, we simulate a user editing workflow where new elements—such as text or decorative objects—are inserted into an existing design based on text prompts and specified bounding boxes. The results show that our model does not merely paste isolated objects; instead, it generates new layers that are contextually aware, matching the lighting, perspective, and artistic style of the existing layers. By conditioning on the full composition, the added layers harmonize seamlessly with the original design, preserving the global aesthetic while fulfilling the user’s semantic requirements.
5.5 Layer Restylization and Harmonization
In Fig. 25, we showcase the layer restylization capability, where user-provided assets are transformed to align with a target design’s visual identity. Our model effectively transfers style while preserving the geometric structure of the input asset. The visualization demonstrates that our single-pass generation approach ensures cross-layer consistency, successfully adapting the color palette, texture, and artistic rendering of external assets to match the pre-existing composition. This capability is essential for unifying disparate elements into a cohesive graphic design.
5.6 Layout Generalization in Text-to-Layer
Fig. 26 and Fig. 27 present an analysis of the interplay between text prompts and spatial controls. In these experiments, the text prompt contains implicit or explicit descriptions of element positions, while we simultaneously provide varying spatial layouts (bounding boxes) that may conflict with these textual descriptions. Remarkably, the results demonstrate that our model exhibits strong adherence to the user-provided layout, effectively overriding the spatial biases present in the text prompt while retaining the semantic content. This confirms that our framework successfully disentangles semantic generation from spatial arrangement, allowing users to enforce arbitrary layouts—such as moving a title from the top to the bottom—without compromising the generated content’s quality or the prompt’s semantic fidelity.
5.7 Layout-Guided Image Decomposition
For the Image-to-Layer task, Fig. 28 through Fig. 30 visualize the input raster images alongside their corresponding layout structures (bounding boxes and Z-order) used during inference. These examples illustrate how the model utilizes layout information—whether derived from automatic detectors or manual annotation—as a structural prior to guide the decomposition process. The visualizations show that the model accurately resolves ambiguities in the raster image by leveraging the provided spatial cues, resulting in semantically meaningful layers that strictly conform to the specified boundaries. This highlights the model’s ability to produce controllable and predictable decompositions essential for professional editing workflows.
5.8 Generalization to Natural Scenes
Although our model is trained exclusively on graphic design datasets (posters, flyers, etc.), Fig. 31 demonstrates its zero-shot generalization capability to real-world natural images. The model successfully segments objects from photographs into transparent layers, leveraging the strong visual understanding inherited from the Qwen-Image backbone. However, we observe a specific limitation due to the domain gap: unlike flat graphic designs, real-world scenes contain complex physical lighting effects. Consequently, the model often fails to associate cast shadows with their respective objects, leaving shadows on the background layer rather than the object layer. Despite this limitation regarding physical lighting effects, the structural decomposition remains surprisingly robust for out-of-domain data.
5.9 Failure Cases
Finally, we analyze representative failure cases in Fig. 32 to provide a balanced view of our method’s current limitations. We observe a common issue across all four tasks: some transparent backgrounds are decoded into gray instead of remaining transparent. This ambiguity arises because our VAE encoder currently uses a 3-channel input, which compresses transparent layers into a gray representation that the decoder sometimes misinterprets. Future work could address this by adopting a 4-channel encoder or alternative encoding schemes. Additionally, we identify task-specific limitations: 1) for text generation, the model sometimes struggles with rendering very small glyphs accurately; and 2) for layer-to-layer tasks, we occasionally observe failures in identity preservation (IP) and instruction following, particularly when complex style transfer or precise object insertion is required. These cases outline critical directions for future research in multi-layer generative modeling.

