Pinco: Position-induced Consistent Adapter for Diffusion Transformer in Foreground-conditioned Inpainting

Guangben Lu, Yuzhen Du, Yizhe Tang, Zhimin Sun, Ran Yi, Yifan Qi, Tianyi Wang, Lizhuang Ma, Fangyuan Zou

TL;DR

This paper introduces Pinco, a novel adapter for diffusion transformers that significantly improves foreground-conditioned inpainting. Pinco addresses the challenges of preserving foreground subject integrity and ensuring text-background consistency by introducing a Self-Consistent Adapter, a Decoupled Image Feature Extractor, and a Shared Positional Embedding Anchor.

What Problem Does This Paper Address?

Foreground-conditioned inpainting aims to fill in the background of an image while keeping a specified foreground subject intact, guided by a text description. Existing methods, often based on text-to-image (T2I) diffusion models, struggle with this task. They can lead to issues like the foreground subject expanding or distorting, or the generated background not aligning well with the text description. This results in visually inconsistent and unnatural images. The core challenge is to effectively inject foreground information into the diffusion process without disrupting the model's ability to generate a coherent background that matches the text prompt and preserves the subject's shape.

Methods

Pinco is a plug-and-play adapter designed to be integrated with existing Diffusion Transformer (DiT) models. It comprises three key novel modules:

  • Self-Consistent Adapter: This module innovatively injects subject-aware attention directly into the self-attention layers of the DiT model. Unlike previous methods that might add subject and text features in a way that causes conflicts, this approach ensures that the model considers foreground subject characteristics while processing the overall image layout, leading to better alignment and reduced conflicts.
  • Decoupled Image Feature Extraction: To accurately capture both the semantic meaning and the precise shape of the foreground subject, Pinco employs a novel strategy. It uses separate architectures to extract semantic features (from the subject image) and shape features (from the subject's mask, depth, and Sobel images). This decoupling ensures that fine details of the subject's shape are preserved, preventing expansion or distortion.
  • Shared Positional Embedding Anchor: This module helps to focus the subject-aware attention specifically on the foreground subject region. It combines positional embeddings with the subject features before the attention calculation. This mechanism effectively decays attention weights for areas further from the subject, concentrating the model's focus and improving its understanding of subject features and training efficiency.

Datasets

The paper mentions using a dataset of 88K real-world photography images for training, with 19K of these being high-quality images with clear foreground-background relationships. For evaluation, they collected images of 300 everyday items, each paired with three scene descriptions generated by GPT-40 and two random seeds, resulting in 1,800 generation tasks.

Key Insights and Ideas

  • Self-attention is key for spatial consistency: The paper highlights that self-attention layers are more inherently aligned with image layout than cross-attention, making them a better place to inject subject information for preserving spatial characteristics.
  • Decoupling shape and semantics is crucial: Simply using standard feature extractors like CLIP or VAE is insufficient for precise shape preservation. Separating the extraction of semantic and detailed shape information is vital for high-quality inpainting.
  • Positional information guides attention: Without proper positional guidance, attention can become scattered. A shared positional embedding anchor effectively directs attention to the subject region, improving focus and efficiency.
  • Plug-and-play efficiency: Pinco's design as an adapter means it can be integrated with existing DiT models with minimal training parameters and negligible inference latency, making it practical for real-world applications.

Key Results

Pinco demonstrates superior performance across multiple metrics compared to state-of-the-art methods.

  • Quantitative: Pinco achieves leading results in foreground consistency (OER scores) and text alignment (VQAScore), significantly outperforming previous methods. For example, HY-Pinco shows a higher VQA-Score and lower FV2Score compared to ControlNet on the same backbone.
  • Qualitative: Visual comparisons show Pinco generating more coherent, detailed, and rational backgrounds that accurately reflect the text prompts. It effectively mitigates subject expansion and misplacement issues that plague other methods.
  • User Study: A user study with 31 participants showed that Pinco-generated images were consistently preferred over those from competitor methods, indicating better overall image quality, foreground consistency, and text alignment.

Limitations and Future Work

  • Limitations: The paper acknowledges that while Pinco significantly improves foreground consistency, there's still room for further enhancement. The quantitative comparison table shows that while Pinco excels, some metrics still have room for improvement.
  • Future Work: The paper doesn't explicitly detail future work directions, but the success of the plug-and-play adapter approach suggests potential for extending it to other diffusion model architectures or different image editing tasks. The focus on improving text alignment and subject preservation also points towards continued research in these areas.

Summary updated

BibTeX
@inproceedings{lu2025pinco,
  author = {Guangben Lu and Yuzhen Du and Yizhe Tang and Zhimin Sun and Ran Yi and Yifan Qi and Tianyi Wang and Lizhuang Ma and Fangyuan Zou},
  title = {{Pinco: Position-induced Consistent Adapter for Diffusion Transformer in Foreground-conditioned Inpainting}},
  booktitle = {IEEE/CVF International Conference on Computer Vision},
  year = {2025},
}
Figure