TL;DR
NÜWA-LIP introduces a novel framework for language-guided image inpainting that prevents texture bleeding and detail loss in unmasked regions. By combining a Defect-Free VQGAN (DF-VQGAN) with a Multi-Perspective Sequence-to-Sequence (MP-S2S) model, it achieves state-of-the-art results across three new open-domain benchmarks, ensuring that edited images look seamless and strictly follow textual instructions.
What Problem Does This Paper Address?
Language-guided image inpainting allows users to alter specific parts of an image using natural language prompts (e.g., "add a red balloon in the sky") while leaving the rest of the image untouched.
However, state-of-the-art autoregressive models (like DALL-E or the original NÜWA) suffer from two major flaws during this process:
- Receptive Spreading: When an image with a masked (defective) region is processed through standard convolutional or attention layers, the corrupted pixels pollute the features of the clean, non-defective regions. This leads to unwanted color casts and artifacts around the edited boundaries.
- Information Loss: Compressing an image into discrete tokens often discards fine-grained details. As a result, when the model decodes the image back to pixels, it inadvertently modifies the unmasked parts of the image that should have remained identical to the original.
Methods
To solve these issues, the authors propose NÜWA-LIP, which decouples the inpainting process into two specialized components:
1. Defect-Free VQGAN (DF-VQGAN)
Instead of using a standard VQGAN, the authors introduce two architectural modifications to safeguard unmasked pixels:
- Relative Estimation: A modified normalization layer that dynamically adjusts mean and variance calculations to ignore masked pixels. This prevents the "defect" from bleeding into clean areas during downsampling.
- Symmetrical Connections: Skip-like connections that pass original, uncorrupted features directly from the encoder to the decoder, ensuring that the background details are perfectly preserved.
2. Multi-Perspective Sequence-to-Sequence (MP-S2S)
For the generative part, the authors use an autoregressive transformer decoder. To make the text-guided generation as accurate as possible, the model is conditioned on three distinct perspectives simultaneously:
- Text perspective: The language prompt guiding the edit.
- Low-level pixel perspective: Raw image patches processed via a Vision Transformer (ViT) style encoder.
- High-level token perspective: Discrete visual tokens from the DF-VQGAN encoder.
Datasets
Because standard inpainting datasets lack text descriptions or diverse open-domain layouts, the authors introduced three new benchmarks derived from existing computer vision datasets:
- MaskCOCO: 5,000 image-text pairs based on MSCOCO (average mask ratio: 31.5%).
- MaskFlickr: 1,000 image-text pairs based on Flickr30k (average mask ratio: 48.3%).
- MaskVG: 10,000 image-text pairs based on Visual Genome (average mask ratio: 14.6%).
In each dataset, the defective regions were generated using either object bounding boxes or random irregular shapes.
Key Insights and Ideas
- Decoupling via Normalization: Standard layer or group normalization implicitly spreads the influence of masked regions across the entire feature map. Explicitly adjusting normalization statistics based on the mask ratio is a simple yet highly effective way to isolate corrupted regions.
- Autoregressive Safety Nets: While autoregressive token generation is excellent for synthesizing new content, it is notoriously bad at exact replication. Symmetrical skip connections act as a crucial safety net, ensuring the model doesn't hallucinate new details over perfectly fine background pixels.
- Multi-Perspective Synergy: High-level discrete tokens provide semantic structure, while low-level pixel patches preserve fine-grained textures. Combining both allows the transformer to generate highly realistic completions that blend seamlessly with the original image.
Key Results
NÜWA-LIP achieved state-of-the-art Frechet Inception Distance (FID) scores across all three benchmarks, comfortably outperforming strong diffusion and autoregressive baselines like GLIDE and standard NÜWA.
- MaskCOCO: Achieved an FID of 12.0 (compared to GLIDE's 13.5 and NÜWA's 21.4). Fine-tuning the model on MSCOCO pushed the FID down to 10.5.
- MaskFlickr: Achieved an FID of 42.5 (outperforming GLIDE by 9.4 points).
- MaskVG: Achieved an FID of 8.5 (outperforming GLIDE's 9.0).
Human evaluations also overwhelmingly favored NÜWA-LIP, with annotators judging its outputs as significantly better in both visual quality and semantic consistency with the text prompts.
Limitations and Future Work
Not discussed in the paper.
Summary updated