Inpainting lets you mask a specific area of an image and have the AI regenerate only that area while keeping the rest untouched. The classic use cases are removing an unwanted object, swapping a face, changing a background or fixing a single broken hand on an otherwise good generation. Nano Banana 2 does this conversationally ('change the cup to a glass'). Stable Diffusion and Flux do it through dedicated inpainting models and brush UIs in tools like ComfyUI and Automatic1111.
Inpainting
Editing a specific region of an existing image