Inpainting: How to Edit One Part of an Image Without Touching the Rest

May 20, 2026
A practical guide to the Inpainting tool β€” how region-based editing differs from regenerating a whole image, how to prompt it, and when to reach for it instead of Image to Image.
image-editing
inpainting
tutorial
guide

The problem inpainting solves

You have a shot that's 95% right. Maybe there's a stranger walking through the background of an otherwise perfect product photo, or the sky is flat and grey when it should be dramatic, or a logo needs swapping. The tempting move is to regenerate the whole image and hope the good 95% survives β€” but every regeneration is a fresh roll of the dice on composition, lighting and pose. You usually lose more than you fix.

Inpainting exists for exactly this situation. It edits only the region you describe and leaves every other pixel of the image untouched β€” not "mostly the same," but pixel-identical outside the edited area. On this platform, the tool enforces that automatically: your instruction is combined with a fixed constraint that tells the model to change only what you asked for and preserve everything else.

How it works, step by step

  1. Upload the image that's almost right.
  2. Describe the region and the change in one instruction β€” name what's being replaced and what it becomes: "replace the sky with dramatic storm clouds" or "remove the person standing behind the car."
  3. Generate and download. One region changes; the rest of the image survives exactly as it was.

There's no mask to draw and no layer panel β€” the region is defined by how precisely you describe it in words, which is the biggest difference from traditional inpainting tools in Photoshop-style editors.

Prompting tips that actually matter

  • Name the region unambiguously. "The sky," "the logo on the shirt," "the person on the left," "the background behind the bottle" β€” all specific enough for the model to locate. "The bad part" is not.
  • Describe the end state, not the process. Say what should be there when you're done ("a clear blue sky with soft clouds"), not the mechanical steps to get there.
  • One change per generation is more reliable than several. If you need to remove a person and change the sky and swap a logo, run three focused passes rather than one crowded prompt β€” each one is easier for the model to localize correctly, and you can review each edit before moving to the next.
  • Keep the rest of your prompt out of it. Since inpainting already preserves everything outside your named region, redescribing the whole scene just adds noise the model has to ignore.

Common use cases

  • Removing unwanted elements β€” photobombers, stray objects, sensor dust artifacts, distracting background clutter
  • Swapping or adding products, logos and text β€” put a different can in someone's hand, change a label, add a badge
  • Fixing small flaws in an otherwise-final generated or photographed image
  • Background edits that keep the subject locked β€” change weather, time of day or setting behind a product or person without regenerating the subject itself
  • Producing campaign variations from one base shot β€” same product, same composition, different seasonal backdrop for each region or holiday

Inpainting vs. the other editing tools

It's easy to reach for the wrong tool if you're not sure what "region-based" actually means in practice:

  • Image to Image applies one instruction to the whole image β€” good for changes like "make it golden hour" that plausibly affect everything (lighting, shadows, color), but composition can drift slightly since the whole frame is being reconsidered.
  • Inpainting locks everything except the named region β€” use it whenever "everything else must stay exactly the same" is a hard requirement, not a nice-to-have.
  • Remove Background is a specialized case of region editing focused entirely on isolating the subject from its background β€” reach for it directly instead of writing an inpainting prompt to do the same job.
  • Style Transfer re-renders the entire image in a new aesthetic while keeping subject and composition β€” the opposite goal of inpainting, which changes one thing and preserves the aesthetic.

What it costs

Inpainting runs on Nano Banana 2 by default, the same standard-tier model behind most of the image tools, at 4 credits per generation β€” see the credits guide for the full pricing picture across every tool.

Inpainting: How to Edit One Part of an Image Without Touching the Rest | Nano Banana