Editing Images into Reusable Layers via Compositional Edit-Prior Distillation
Organizations: South China University of Technology · Tsinghua University · University of Science and Technology of China · Peng Cheng Laboratory
Abstract
High-quality image editing requires precise modification of target regions while preserving the content of unrelated regions. Existing editing models produce flattened outputs that limit precise local manipulation and layer reuse, while decomposition methods typically optimize layer recovery separately from instruction-driven editing. To this end, we introduce LayerEditor, a unified framework that couples instruction-guided image editing with controllable generation of reusable RGBA layers. At its core, In-Context RGB-Alpha Token Modeling jointly represents the edited canvas and an ordered sequence of RGB-Alpha layers within a single token sequence, enabling semantic edits and explicit control over individual layer content. To retain the pretrained model's editing capability during adaptation to layered outputs, we propose Compositional Edit-Prior Distillation, which transfers its editing prior to both the edited canvas and the image composed from the predicted layers. To support training and evaluation, we construct LayerEditor-100K, a large-scale paired image-editing dataset with ordered RGBA layer annotations, and introduce dedicated benchmarks for layered editing. Extensive experiments demonstrate that LayerEditor maintains strong editing fidelity while generating accurate RGBA layers, supporting both flexible layer-level manipulation and multi-layer decomposition.
Figures & tables
Appendix figures & tables6 assets
Supplementary material from the paper’s appendix.
Appendix
| Parameter | Value | Parameter | Value |
| LoRA rank | 256 | Maximum pixel budget | |
| Flow-matching warm-up | 2 epochs | Post-training budget | 3 epochs |
| Optimizer | AdamW | Learning rate | |
| LR schedule | Cosine | Minimum learning rate | |
| LR warm-up | 200 updates | Maximum C-EPD weight | 0.1 |
| Main-model batch size | 64 | C-EPD interval | 5 updates |
| 1 | for do |
| 2 | for do |
| 3 | Sample and . |
| 4 | Construct and . |
| 5 | Predict from the joint noisy state and . |
| 6 | Compute the joint flow-matching loss using Equation 5 . |
| 7 | . If , set . |
Image Editing
Image editing changes selected visual content while preserving the parts of an image that should remain unchanged.
See all 302 papers