← Latest papers
🤖 AI

VIPaint: Image Inpainting with Pre-Trained Diffusion Models via Variational Inference

The paper proposes VIPaint, a hierarchical variational inference algorithm that enables high-quality, diverse image inpainting and other inverse problems on pre-trained latent diffusion models by optimizing a non-Gaussian Markov approximation of the true diffusion posterior.

Original authors: Sakshi Agarwal, Gabriel Hope, Jimin Heo, Erik B. Sudderth

Published 2026-05-01
📖 5 min read🧠 Deep dive

Original authors: Sakshi Agarwal, Gabriel Hope, Jimin Heo, Erik B. Sudderth

Original paper licensed under CC BY 4.0 (http://creativecommons.org/licenses/by/4.0/). This is an AI-generated explanation of the paper below. It is not written or endorsed by the authors. For technical accuracy, refer to the original paper. Read full disclaimer

Imagine you have a beautiful, high-resolution photograph, but someone has taken a giant pair of scissors and cut out a huge chunk of it—maybe a whole person, a building, or a landscape. Your goal is to fill in that missing hole with something that looks real, fits the style of the rest of the photo, and makes sense contextually. This is called image inpainting.

For a long time, computers have struggled with this, especially when the missing piece is large. They often guess things that look blurry, inconsistent, or just plain weird.

This paper introduces a new method called VIPaint (Variational Inference for Painting) that acts like a super-smart, intuitive artist to solve this problem. Here is how it works, explained simply:

The Problem: The "Guessing Game"

Think of modern AI image generators (called Diffusion Models) as a master painter who learned to create art by starting with a bucket of static noise (like TV snow) and slowly cleaning it up, step-by-step, until a clear image appears.

When we ask this AI to fill in a missing hole in an existing photo, we are asking it to work backward. However, most existing methods try to do this by taking a "best guess" at every single step.

  • The Flaw: If the AI makes a small mistake early on (like guessing the wrong color for a sky), it gets stuck. Because it doesn't have a way to "go back and fix" that early mistake, the final result often looks blurry or disconnected from the rest of the photo. It's like trying to build a house where you lay the bricks, realize the wall is crooked, but you can't move the foundation, so you just keep building a crooked house.

The VIPaint Solution: The "Architect's Blueprint"

VIPaint changes the strategy. Instead of just guessing one path forward, it builds a flexible blueprint first.

  1. The Hierarchical Map: Imagine the AI doesn't just look at the final picture. Instead, it looks at the "skeleton" of the image at different stages of clarity. It picks a few key moments (called keypoints) along the way from "total noise" to "clear image."

    • Analogy: Think of it like a sculptor. Instead of chipping away stone randomly, the sculptor first sketches the rough shape of the statue (the global structure), then the muscles (mid-level details), and finally the facial features (fine details). VIPaint does this mathematically by checking the image at these specific "checkpoints."
  2. The "What If" Engine (Variational Inference):

    • Most methods try to find the one perfect answer. VIPaint admits, "I don't know exactly what goes in the hole, but I know a range of things that could fit."
    • It creates a probability map (a distribution) that says, "The sky here is likely blue, but it could be a little purple or gray depending on the lighting."
    • It optimizes this map to ensure that whatever it guesses matches the parts of the photo we can see (the unmasked pixels) while still looking like something the AI's "master painter" would create.
  3. The Two-Step Process:

    • Step 1: Optimization (The Planning Phase): The AI spends a little time calculating the best possible "blueprint" for that specific missing hole. It adjusts its internal settings to make sure the global structure (like the horizon line or a building's shape) is perfect before it even starts drawing the details.
    • Step 2: Sampling (The Painting Phase): Once the blueprint is set, it generates the final image. Because the blueprint was so good, the final image is sharp, realistic, and diverse. It can even generate different valid versions of the missing part (e.g., a cat could be black, white, or orange) without breaking the rules of the photo.

Why It's Better

  • No Retraining: You don't need to teach the AI a new trick for every new photo. It uses the "master painter" it already knows and just changes the blueprint for the specific hole. It's "zero-shot," meaning it works immediately on new images.
  • Handles Big Holes: While other methods fail when the missing piece is huge (like 50% of the image), VIPaint excels at it because it plans the "big picture" first.
  • Works on High-End Models: It works with the most advanced, text-to-image models (like Stable Diffusion) that create millions of pixels, which previous methods struggled to adapt.

The Results

The paper tested VIPaint on thousands of images.

  • Visuals: When other methods produced blurry blobs or mismatched edges, VIPaint produced sharp, realistic images that fit perfectly.
  • Versatility: It didn't just fix holes; it also worked well at removing blur and making low-resolution images sharp (super-resolution).
  • Speed: It is fast enough to be practical, often faster than other high-quality methods because it optimizes the "plan" efficiently before generating the image.

In short, VIPaint is like giving the AI a moment to think and plan the structure of the missing piece before it starts painting, ensuring the final result is not just a guess, but a coherent, high-quality reconstruction.

Drowning in papers in your field?

Get daily digests of the most novel papers matching your research keywords — with technical summaries, in your language.

Try Digest →