{"course":{"slug":"image-editing","title":"Editing an Image","url":"https://addaly.com/learn/image-editing","level":"beginner","track":"create"},"lesson":{"slug":"generative-fill-in-practice","title":"Getting a usable result in three attempts instead of thirty","url":"https://addaly.com/learn/image-editing/generative-fill-in-practice","position":60,"of":78,"minutes":9,"answer":"Leave the prompt empty when removing and describe the light and material when adding, generate three variations and composite the good parts onto a masked layer rather than accepting a whole result, and fix grain.","keyIdea":"Leave the prompt empty when removing and describe the light and material when adding, generate three variations and composite the good parts onto a masked layer rather than accepting a whole result, and fix grain, geometry and black point afterwards."},"body":{"format":"markdown","text":"## Decide what you are asking for\n\nThree different jobs, three different approaches.\n\n**Removing something.** Leave the prompt **empty**. An empty prompt tells the model to continue what surrounds the mask, which is exactly what you want. Typing \"grass\" when removing a bin from a lawn often makes things worse, because it biases the generation towards a generic idea of grass rather than towards *this* lawn.\n\n**Adding something.** Describe it, including the light and the material. \"A terracotta plant pot, soft window light from the left, shallow depth of field\" produces a more usable result than \"plant pot\", because those words also steer the rendering rather than only the object.\n\n**Changing something.** Use a moderate denoising strength if the tool exposes one, so the existing shape constrains the result. Changing a shirt's pattern while keeping its folds is this case.\n\n## The practical settings\n\n- **Mask expansion of 10 to 30 pixels and a feather of 5 to 15.** As the previous lesson explained, this is the setting that matters most.\n- **Work in passes.** Fill the largest region first, then run smaller fills over the parts that came out wrong. Each subsequent pass sees the previous one as context, so the result converges.\n- **Generate three variations, always.** They are cheap and the spread is large.\n- **Composite rather than accept.** Put the generated result on its own layer, mask it, and keep the parts that worked. You are not obliged to take the whole thing.\n\nThat last point is the one that separates people who get good results from people who conclude the tool does not work. A generation that is 70 per cent right and 30 per cent wrong is a useful layer, not a failure.\n\n## A worked example\n\nA photograph of a table with a coffee cup, and the client wants the cup gone and the wooden surface continuous.\n\n1. Select the cup with a rough lasso, expand by 20 pixels.\n2. Empty prompt. Generate three.\n3. Two produce plausible wood; one has a ghost of a shadow. Take the best.\n4. Put it on a layer, mask it to just the cup area plus a small margin, and check the wood grain lines against the real ones either side. They probably do not continue.\n5. Fix the grain: clone a strip of real grain from elsewhere on the table, transform it to the right angle, and mask it over the discontinuity.\n6. Add grain and match the black point across the whole image, as in the compositing block.\n\nSteps 4 to 6 are what make it invisible, and they are the steps the demonstration videos leave out.\n\n## Resolution, and the two-pass technique\n\nMost implementations generate at a fixed internal resolution and scale the result to fit your selection. On a large file that means a soft patch.\n\nThe workaround: **crop, fill, and composite back.** Copy a region around the area you want to fill into a new document at a size close to the model's native resolution, do the fill there, then bring the result back and blend it in. More steps, considerably sharper.\n\nOr fill at the original resolution and then sharpen the filled region locally to match, which is cruder and often enough.\n\n## Where it beats manual work, and where it does not\n\n**Faster than manual:** organic textures: foliage, gravel, water, sky, crowds, grass, clouds. Extending a background. Removing a person from a complex scene. Filling a corner of a badly-shot frame.\n\n**Slower than manual, or worse:** anything with text. Anything with regular geometry: brickwork, tiling, panelling, windows. Small faces. Hands. Product surfaces, where the result must be the actual product. Repeated patterns where a copy-and-transform is exact and a generation is approximate.\n\n**Do not use at all:** where the content matters as a record. A document, a number plate, a medical image, a news photograph, a forensic exhibit.\n\n## Prompting notes that are actually useful\n\n- **Describe the photograph, not the object.** \"Shot on 50 mm, overcast light, slight film grain\" steers the rendering towards something that will composite.\n- **Negative prompts**, where available, are for the recurring failures: \"text, watermark, extra limbs, duplicate\".\n- **Short and specific beats long and elaborate.** Long stacked prompts of style words dilute the conditioning rather than compounding it.\n- **The surrounding pixels dominate.** For an inpaint, the context is a far stronger constraint than the prompt, which is why an empty prompt works so well for removals.\n\n## The free routes\n\nAdobe's Generative Fill is in Photoshop and requires a subscription and generative credits. The free equivalents run locally:\n\n- **ComfyUI** or **AUTOMATIC1111's web UI** with an inpainting model. Both free, both run Stable Diffusion variants locally. With a graphics card they are fast; on a CPU an inpaint takes one to several minutes, which is slow but workable for a handful of fills.\n- **Fooocus** is a much simpler front end with an inpaint mode and sensible defaults, aimed at people who do not want to learn a node graph.\n- **Krita** has an AI diffusion plugin that puts local inpainting directly into the editor, on a layer, with masks, which is the most integrated free option there is.\n- **GIMP** has several plugin routes of varying maintenance quality.\n\nThe hardware reality is covered later in this module. The short version: 8 GB of video memory runs these comfortably, 4 GB runs them slowly, and no graphics card runs them very slowly but does run them.\n\n## The limitation to keep in front of you\n\nA generative fill produces something that looks right. Whether it *is* right is a question the tool cannot answer and does not attempt to.\n\nFor a lawn, nobody cares. For a shopfront, a label, a face or a road sign, the difference between looking right and being right is the entire content of the picture. The practical habit is to ask, before each fill: if this region were wrong, would anyone be misled? If yes, do it by hand or leave it."},"check":{"question":"An editor removing a bin from a lawn types the prompt \"green grass\" and gets a patch that looks like grass but does not match the lawn's mowing stripes or colour. Why does an empty prompt usually work better here?","options":[{"text":"An empty prompt disables the text encoder, which halves the computation and leaves more capacity for detail.","correct":false,"tempting":"Invents a resource trade: the compute cost is essentially unchanged, and the difference lies in what the generation is being steered towards."},{"text":"With no prompt, the generation is steered only by the surrounding pixels, so it continues this lawn rather than a generic idea of grass.","correct":true},{"text":"Text prompts are only supported for adding objects, and using one for a removal produces undefined behaviour.","correct":false,"tempting":"Claims a functional restriction that does not exist: prompts work for removals and simply bias the result, which is the problem being described."},{"text":"The prompt should have been more detailed, describing the stripes and the light, which would have matched the lawn precisely.","correct":false,"tempting":"Assumes more description converges on this specific lawn, when the surrounding context already contains that information and a prompt competes with it."}]},"prev":{"slug":"what-a-diffusion-model-does-to-your-photo","title":"Noise in, picture out: inpainting explained","url":"https://addaly.com/learn/image-editing/what-a-diffusion-model-does-to-your-photo"},"next":{"slug":"generative-expand-and-outpainting","title":"Making a photograph bigger than it was taken","url":"https://addaly.com/learn/image-editing/generative-expand-and-outpainting"},"authorship":"Founder and series editor: Dr Mustafa Mun. Written by AI models to a written standard. Exam keys checked blind by a second model: 3,665 of 3,666 agreed. Academic review invited.","review":{"status":"Draft, open for academic review"},"cite":"Addaly (2026) 'Getting a usable result in three attempts instead of thirty', in Editing an Image. Edited by M. Mun. Addaly. Available at: https://addaly.com/learn/image-editing/generative-fill-in-practice (Accessed: 13 October 2026).","licence":{"name":"CC BY-NC-SA 4.0","url":"https://creativecommons.org/licenses/by-nc-sa/4.0/"},"reader":{"schema":1,"title":"Getting a usable result in three attempts instead of thirty","courseTitle":"Editing an Image","module":{"index":7,"slug":"ai-inside-the-image-editor","title":"AI inside the image editor"},"answer":null,"keyIdea":"Leave the prompt empty when removing and describe the light and material when adding, generate three variations and composite the good parts onto a masked layer rather than accepting a whole result, and fix grain, geometry and black point afterwards.","hero":{"kind":"plate","image":null,"alt":null,"caption":null},"blocks":[{"t":"h2","id":"decide-what-you-are-asking-for","runs":[{"text":"Decide what you are asking for"}]},{"t":"p","runs":[{"text":"Three different jobs, three different approaches."}]},{"t":"p","runs":[{"text":"Removing something.","b":true},{"text":" Leave the prompt "},{"text":"empty","b":true},{"text":". An empty prompt tells the model to continue what surrounds the mask, which is exactly what you want. Typing “grass” when removing a bin from a lawn often makes things worse, because it biases the generation towards a generic idea of grass rather than towards "},{"text":"this","i":true},{"text":" lawn."}]},{"t":"p","runs":[{"text":"Adding something.","b":true},{"text":" Describe it, including the light and the material. “A terracotta plant pot, soft window light from the left, shallow depth of field” produces a more usable result than “plant pot”, because those words also steer the rendering rather than only the object."}]},{"t":"p","runs":[{"text":"Changing something.","b":true},{"text":" Use a moderate denoising strength if the tool exposes one, so the existing shape constrains the result. Changing a shirt’s pattern while keeping its folds is this case."}]},{"t":"h2","id":"the-practical-settings","runs":[{"text":"The practical settings"}]},{"t":"ul","items":[[{"text":"Mask expansion of 10 to 30 pixels and a feather of 5 to 15.","b":true},{"text":" As the previous lesson explained, this is the setting that matters most."}],[{"text":"Work in passes.","b":true},{"text":" Fill the largest region first, then run smaller fills over the parts that came out wrong. Each subsequent pass sees the previous one as context, so the result converges."}],[{"text":"Generate three variations, always.","b":true},{"text":" They are cheap and the spread is large."}],[{"text":"Composite rather than accept.","b":true},{"text":" Put the generated result on its own layer, mask it, and keep the parts that worked. You are not obliged to take the whole thing."}]]},{"t":"p","runs":[{"text":"That last point is the one that separates people who get good results from people who conclude the tool does not work. A generation that is 70 per cent right and 30 per cent wrong is a useful layer, not a failure."}]},{"t":"h2","id":"a-worked-example","runs":[{"text":"A worked example"}]},{"t":"p","runs":[{"text":"A photograph of a table with a coffee cup, and the client wants the cup gone and the wooden surface continuous."}]},{"t":"ol","start":1,"items":[[{"text":"Select the cup with a rough lasso, expand by 20 pixels."}],[{"text":"Empty prompt. Generate three."}],[{"text":"Two produce plausible wood; one has a ghost of a shadow. Take the best."}],[{"text":"Put it on a layer, mask it to just the cup area plus a small margin, and check the wood grain lines against the real ones either side. They probably do not continue."}],[{"text":"Fix the grain: clone a strip of real grain from elsewhere on the table, transform it to the right angle, and mask it over the discontinuity."}],[{"text":"Add grain and match the black point across the whole image, as in the compositing block."}]]},{"t":"p","runs":[{"text":"Steps 4 to 6 are what make it invisible, and they are the steps the demonstration videos leave out."}]},{"t":"h2","id":"resolution-and-the-two-pass-technique","runs":[{"text":"Resolution, and the two-pass technique"}]},{"t":"p","runs":[{"text":"Most implementations generate at a fixed internal resolution and scale the result to fit your selection. On a large file that means a soft patch."}]},{"t":"p","runs":[{"text":"The workaround: "},{"text":"crop, fill, and composite back.","b":true},{"text":" Copy a region around the area you want to fill into a new document at a size close to the model’s native resolution, do the fill there, then bring the result back and blend it in. More steps, considerably sharper."}]},{"t":"p","runs":[{"text":"Or fill at the original resolution and then sharpen the filled region locally to match, which is cruder and often enough."}]},{"t":"h2","id":"where-it-beats-manual-work-and-where-it-does-not","runs":[{"text":"Where it beats manual work, and where it does not"}]},{"t":"p","runs":[{"text":"Faster than manual:","b":true},{"text":" organic textures: foliage, gravel, water, sky, crowds, grass, clouds. Extending a background. Removing a person from a complex scene. Filling a corner of a badly-shot frame."}]},{"t":"p","runs":[{"text":"Slower than manual, or worse:","b":true},{"text":" anything with text. Anything with regular geometry: brickwork, tiling, panelling, windows. Small faces. Hands. Product surfaces, where the result must be the actual product. Repeated patterns where a copy-and-transform is exact and a generation is approximate."}]},{"t":"p","runs":[{"text":"Do not use at all:","b":true},{"text":" where the content matters as a record. A document, a number plate, a medical image, a news photograph, a forensic exhibit."}]},{"t":"h2","id":"prompting-notes-that-are-actually-useful","runs":[{"text":"Prompting notes that are actually useful"}]},{"t":"ul","items":[[{"text":"Describe the photograph, not the object.","b":true},{"text":" “Shot on 50 mm, overcast light, slight film grain” steers the rendering towards something that will composite."}],[{"text":"Negative prompts","b":true},{"text":", where available, are for the recurring failures: “text, watermark, extra limbs, duplicate”."}],[{"text":"Short and specific beats long and elaborate.","b":true},{"text":" Long stacked prompts of style words dilute the conditioning rather than compounding it."}],[{"text":"The surrounding pixels dominate.","b":true},{"text":" For an inpaint, the context is a far stronger constraint than the prompt, which is why an empty prompt works so well for removals."}]]},{"t":"h2","id":"the-free-routes","runs":[{"text":"The free routes"}]},{"t":"p","runs":[{"text":"Adobe’s Generative Fill is in Photoshop and requires a subscription and generative credits. The free equivalents run locally:"}]},{"t":"ul","items":[[{"text":"ComfyUI","b":true},{"text":" or "},{"text":"AUTOMATIC1111’s web UI","b":true},{"text":" with an inpainting model. Both free, both run Stable Diffusion variants locally. With a graphics card they are fast; on a CPU an inpaint takes one to several minutes, which is slow but workable for a handful of fills."}],[{"text":"Fooocus","b":true},{"text":" is a much simpler front end with an inpaint mode and sensible defaults, aimed at people who do not want to learn a node graph."}],[{"text":"Krita","b":true},{"text":" has an AI diffusion plugin that puts local inpainting directly into the editor, on a layer, with masks, which is the most integrated free option there is."}],[{"text":"GIMP","b":true},{"text":" has several plugin routes of varying maintenance quality."}]]},{"t":"p","runs":[{"text":"The hardware reality is covered later in this module. The short version: 8 GB of video memory runs these comfortably, 4 GB runs them slowly, and no graphics card runs them very slowly but does run them."}]},{"t":"h2","id":"the-limitation-to-keep-in-front-of-you","runs":[{"text":"The limitation to keep in front of you"}],"role":"limit"},{"t":"p","runs":[{"text":"A generative fill produces something that looks right. Whether it "},{"text":"is","i":true},{"text":" right is a question the tool cannot answer and does not attempt to."}]},{"t":"p","runs":[{"text":"For a lawn, nobody cares. For a shopfront, a label, a face or a road sign, the difference between looking right and being right is the entire content of the picture. The practical habit is to ask, before each fill: if this region were wrong, would anyone be misled? If yes, do it by hand or leave it."}]}],"check":{"question":[{"text":"An editor removing a bin from a lawn types the prompt “green grass” and gets a patch that looks like grass but does not match the lawn’s mowing stripes or colour. Why does an empty prompt usually work better here?"}],"options":[{"text":[{"text":"An empty prompt disables the text encoder, which halves the computation and leaves more capacity for detail."}],"correct":false,"tempting":[{"text":"Invents a resource trade: the compute cost is essentially unchanged, and the difference lies in what the generation is being steered towards."}]},{"text":[{"text":"With no prompt, the generation is steered only by the surrounding pixels, so it continues this lawn rather than a generic idea of grass."}],"correct":true,"tempting":null},{"text":[{"text":"Text prompts are only supported for adding objects, and using one for a removal produces undefined behaviour."}],"correct":false,"tempting":[{"text":"Claims a functional restriction that does not exist: prompts work for removals and simply bias the result, which is the problem being described."}]},{"text":[{"text":"The prompt should have been more detailed, describing the stripes and the light, which would have matched the lawn precisely."}],"correct":false,"tempting":[{"text":"Assumes more description converges on this specific lawn, when the surrounding context already contains that information and a prompt competes with it."}]}],"order":[3,1,2,0],"why":null},"prev":{"slug":"what-a-diffusion-model-does-to-your-photo","title":"Noise in, picture out: inpainting explained","minutes":10},"next":{"slug":"generative-expand-and-outpainting","title":"Making a photograph bigger than it was taken","minutes":8}}}