Editing an ImageLesson 59 of 78

Module 7 · AI inside the image editor

Noise in, picture out: inpainting explained

In this lesson

  • 10 min read
  • 8 reading sections
  • Knowledge check
  • Lesson 1 of 9 in this chapter

This chapter’s goalUse generative fill, outpainting, upscaling, denoising and colourising deliberately (predicting each one’s characteristic failures from its mechanism, running free local equivalents where confidentiality or cost requires it) and state for a given image whether generated content is permissible and what has to be disclosed.

This chapter’s media

The film explains chapter ideas. The audiobook narrates the complete teaching text.

FormatEnglishहिंदी
Chapter filmNot availableNot available
Full audiobookNot availableNot available
What an inpaint is actually givenThe maskedregion,initialisedwith noiseNothing of theoriginalsurvives at fulldenoisingstrength. Around0.4 the shapeunderneath stillconstrains theresult, which ishow a texture ischanged and afold kept.The surroundingpixels,re-imposed atevery stepThis is whatpulls thegenerated areatowards agreeingwith its edges,and it is thewhole reason anempty promptcontinues yourwall rather thaninventing ageneric one.Your prompt, asa vectorShort andspecific beatslong andelaborate. Longstacked stylewords dilute theconditioningrather thancompounding it.Twenty to fiftydenoisingsteps, atone-eighthscaleDiffusionhappens in alatent grideight timessmaller in eachdirection. Finedetail isdecoded ratherthan generated,which is theresolutionceiling.A decoded patchthat is cleanerthan yourphotographLikely imagesare not grainy,so the fill hasno noise floor.Match grain overthe wholepictureafterwards, andexpect text andbrick courses tobe wrong.The surroundings are a far stronger constraint than anything you type, which is why an empty prompt isright for a removal and why a mask drawn tight to the object leaves a seam. Expand the selection by 10to 30 pixels and feather 5 to 15, and most of the complaints about the tool disappear.
The surroundings are a far stronger constraint than anything you type, which is why an empty prompt is right for a removal and why a mask drawn tight to the object leaves a seam. Expand the selection by 10 to 30 pixels and feather 5 to 15, and most of the complaints about the tool disappear.

Figure 7.1

A little at a time

Explore an idea, try it, then check what stays.

Step 1 of 9Free · no account needed
Lesson steps

The training idea, in one paragraph

A diffusion model is trained by taking real images and adding noise to them in steps until nothing remains but static. The model learns to predict, at any noise level, what noise was added, which is equivalent to learning how to remove a little of it. Run that prediction repeatedly starting from pure static and you get an image, because each step nudges the static towards something the model considers image-like.

Text conditioning steers the nudging. A text encoder turns your prompt into a vector, and the denoising network is trained so that its predictions depend on that vector. “A ceramic bowl” pushes each step towards arrangements the model associates with those words.

Your place and first choices stay on this browser. Classroom credit is recorded separately.

Every lesson here is open. Your progress is recorded once you pass the Design, before Any Software exam.

Stuck on something?Ask Neema, your AI tutor

How to cite: Addaly (2026) ‘Noise in, picture out: inpainting explained’, in Editing an Image. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/image-editing/what-a-diffusion-model-does-to-your-photo (Accessed: 29 November 2026).