MILD: Multi-Layer Diffusion Strategy for Complex and Precise Multi-IP Aware Human Erasing

Jinghan Yu, Junhao Xiao, Zhiyuan Ma, Y. Ma, Kaiqi Liu, Yuhan Wang, Daizong Liu, Xianghao Meng, Jianjun Li · DOI

Abstract

Recent years have witnessed the success of diffusion models in image customization tasks. However, existing mask-guided human erasing methods still struggle in complex scenarios such as human-human occlusion, human-object entanglement, and human-background interference. This is primarily due to the lack of large-scale multi-instance datasets and effective spatial decoupling to separate foreground from background. To bridge these gaps, we propose Multi-Layer Diffusion (MILD), which decomposes the generation process into independent denoising pathways. We introduce the Cross-Domain Attention Gap (CAG) to quantify semantic leakage and present Spatially-Modulated Attention (SMA) to minimize boundary artifacts. Experiments show that MILD significantly outperforms existing methods in precision and structural awareness.

The Challenge of Semantic Leakage

Removing a person from a photograph is a complex task for AI when the subject is entangled with the environment or other people. Current state-of-the-art diffusion models often suffer from semantic leakage: because the model processes the entire image as a single layer, features from the person being erased "leak" into the background synthesis. This results in blurry human-shaped ghosts or distorted textures.

Figure 1: A complex scenario involving human-object entanglement, where the target for removal is highlighted with a red mask.

This problem is particularly acute in "Multi-IP" (Multi-Interactive-Person) scenarios, characterized by:

  1. Human-Human Occlusion: Erasing one person while reconstructing the individual standing behind them.
  2. Human-Object Entanglement: Removing a person holding an object without damaging the object itself.
  3. Human-Background Interference: Distinguishing between complex foreground textures and the environment.

The MILD Framework

MILD moves away from the "unified generation" approach, treating human erasing as a decoupled, layered process. The architecture is built on four key pillars:

  • Layered Denoising Pathways: MILD uses a shared UNet backbone with domain-specific LoRA adapters, allowing the model to generate independent layers for each foreground instance and a clean background layer.
  • Cross-Domain Attention Gap (CAG): This metric quantifies information flow between foreground and background. Maximizing this gap is theoretically proven to eliminate semantic leakage.
  • Spatially-Modulated Attention (SMA): SMA injects learnable biases into self-attention layers, instructing the model to ignore pixels inside the erasure mask when synthesizing the background.
  • Human Morphology Guidance (HMG): A plug-and-play module that incorporates pose keypoints and semantic parsing to provide a structural "blueprint" for reconstructing hidden limbs or occluded features.

Experimental Results

To support this research, the authors introduced the MILD Dataset, containing 10,000 image pairs featuring diverse poses and complex occlusions. In quantitative evaluations, MILD achieved a 54.5% reduction in FID and a 61.6% improvement in LPIPS compared to the SDXL baseline.

Figure 2: The result of the MILD process, showing precise removal of the background figure while maintaining the integrity of the foreground subject and the central object.

Qualitatively, MILD is uniquely capable of removing individuals from "tangled" groups without leaving behind distorted artifacts. In perceptual studies, MILD achieved an 82% success rate according to AI evaluators (GPT-4o) and a 78% success rate from human raters, significantly outperforming existing models like PowerPaint and LaMa.

Conclusion

By shifting from unified generation to a multi-layer strategy, MILD provides a mathematically grounded solution to semantic leakage. While challenges remain in scenarios of extreme occlusion where background context is limited, MILD represents a significant leap forward in high-precision image editing and compositional flexibility.

Summary updated

BibTeX
@misc{yu2025mild,
  author = {Jinghan Yu and Junhao Xiao and Zhiyuan Ma and Y. Ma and Kaiqi Liu and Yuhan Wang and Daizong Liu and Xianghao Meng and Jianjun Li},
  title = {{MILD: Multi-Layer Diffusion Strategy for Complex and Precise Multi-IP Aware Human Erasing}},
  year = {2025},
  eprint = {2508.06543},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2508.06543},
}
Figure