Sub topic 5
Removing and Replacing Objects, Including Empty Prompts
This chapter covers using Generative Fill to take things out of an image and to swap them for something else. It assumes you can make selections (Lasso, Marquee, Object Selection), you understand layers and layer masks, and you have a Photoshop version with generative AI features and an Adobe account that has generative credits. The previous chapters covered how Generative Fill works and how to write prompts. This one applies both to two common jobs: removal and replacement.
Removal and replacement are one operation
Generative Fill does not have a separate "remove" mode. You select an area, optionally type a prompt, and click Generate. The model fills the selection with new pixels that match the surrounding image. What changes between removal and replacement is only what you ask the model to put in that area.
- Removal: you want the area to look as if the object was never there. You leave the prompt empty, or describe the background.
- Replacement: you want a different object in that area. You describe the new object in the prompt.
An empty prompt tells the model to use only the surrounding pixels as context and to invent whatever plausibly belongs there. A written prompt adds a second instruction: what to draw in the selection.
Removing an object with an empty prompt
The empty prompt is the fastest way to remove something simple, such as a stray person on a beach, a sign on a wall, or a blemish on a sky.
- Open the image. Work on a copy or keep the original layer, so you can always return to it.
- Select the object with the Lasso tool, Object Selection tool, or Quick Selection tool.
- Expand the selection so it includes a margin of a few pixels around the object. Use Select > Modify > Expand with a value of about 5 to 15 pixels for a typical photo. Higher-resolution images need larger values.
- In the Contextual Task Bar, click Generative Fill.
- Leave the prompt field empty and click Generate.
- Review the variations in the Properties panel and choose one.
Why the margin matters
If your selection hugs the object's edge exactly, the original object's anti-aliased edge pixels (the soft, blended pixels along its outline) stay outside the selection. The model then treats them as part of the scene and often builds around them. The result is a faint halo or ghost outline of the removed object. Expanding the selection so those pixels fall inside it prevents this.
Shadows and reflections are part of the object for removal purposes. If a person casts a shadow on the ground and you select only the person, the shadow stays and the result looks wrong. Include the shadow in the selection.
How much context to leave
The model reads the pixels around your selection to decide what to generate. Very tight selections give it little to work with, and very loose ones can make it invent too much. A margin that covers the object, its edge and its shadow, with plenty of untouched image around it, is the usual balance.
Replacing an object with a prompt
For replacement, select the object (again with a margin) and describe what you want in its place. The prompt guidance from the previous chapter applies. Name the subject, then add the details that matter: color, material, state, and lighting.
| Goal | Example prompt | Notes |
|---|---|---|
| Swap a car | `a red vintage bicycle leaning against the wall` | Name the object and its relationship to the scene |
| Change a sign | `a wooden sign with no text` | Text rendering is unreliable, so avoid asking for specific words |
| Replace a sky | `overcast sky with soft grey clouds` | Describe the lighting you want to match |
| Swap clothing | `a navy wool coat` | Material and color give the model concrete detail |
| Fill a gap | `green grass` | Short prompts work well for plain surfaces |
Three habits improve replacements:
- Match the scene's light. If the sun is low and from the left, say so, or choose a prompt that implies it, such as
warm evening light. The model reads the image, but it does not always get the light direction right. - Match scale and perspective by shaping the selection. A tall narrow selection produces a tall narrow object. Draw the selection in the size and shape you want the new object to occupy.
- Keep prompts short and concrete. Long, abstract prompts tend to produce results that ignore parts of the request.
When an empty prompt fails
An empty prompt can fail in predictable ways. Each has a fix.
| Symptom | Likely cause | Fix |
|---|---|---|
| The object comes back in a new form | The selection is small and the object is large or distinctive | Enlarge the selection and add a prompt such as `empty street` |
| A smeared or blurry patch | The surrounding area is complex, such as foliage or crowds | Use a smaller selection and remove the object in stages |
| A ghost outline or halo | The selection was too tight | Expand the selection and regenerate |
| Leftover shadow | The shadow was not selected | Add the shadow to the selection |
| Unrelated new content appears | The model has little context and invents something | Add a background prompt that names what should be there |
| Repeating patterns | The model copies a nearby texture | Generate again, or make a smaller selection |
A short background prompt often rescues a failed empty-prompt removal. Describe the thing you want to see, not the thing you want gone. Prompts such as remove the person or no people do not work reliably, because the model responds to the objects named in a prompt and may draw them. Write empty sandy beach instead.
Working in stages
Large or complex removals go better in steps. Suppose a power line crosses a sky and runs behind a building.
- Remove the part over the sky first. This is a simple area, so an empty prompt usually works.
- Remove the part crossing the building edge in a separate selection. Use a narrow Lasso selection that follows the edge and add a short prompt such as
brick wall. - Check each result before moving to the next.
Working in stages also keeps each generative layer small and easy to mask or discard. Each generation becomes its own layer, so if step 2 fails, step 1 is unaffected.
Generative layers and non-destructive removal
Every Generative Fill run creates a generative layer, a layer that holds the generated pixels and is linked to the selection and prompt that made it. The original pixels stay below. This is what makes removal safe to experiment with.
- To compare before and after, toggle the visibility of the generative layer (the eye icon).
- To discard a bad result, delete the layer. The original image is intact.
- To restrict a result to part of the area, add or paint on the layer's mask. The generative layer already has a mask built from your selection.
A layer mask is also the main tool for fixing partial successes. If the removal worked on the left of the selection but left an artifact on the right, paint black on the mask over the artifact to hide it, then run a second, smaller fill there.
Generative layers can't be edited with some pixel tools until they are rasterized or merged. Keep this in mind if you plan to use the Clone Stamp or Healing Brush on them. Either work on a new empty layer with Sample: Current & Below set, or accept the result and finish on a separate layer.
Alternatives for simple removals
Generative Fill is not always the right tool. For small, simple jobs, other tools are faster, cost no credits, and give you more control.
| Task | Better tool | Reason |
|---|---|---|
| Dust spots, small blemishes | Spot Healing Brush | Instant, no credits |
| Small objects on plain backgrounds | Remove tool | Works by painting over the object |
| Matching an exact texture | Clone Stamp | You choose the source pixels |
| Large objects in complex scenes | Generative Fill | Can invent plausible new content |
| Replacing an object with something new | Generative Fill | Needs generation |
Generative Fill earns its place on large areas, complex backgrounds, and replacement. Use the smaller tools first when they will do.
Reviewing the result
After generating, Photoshop shows several variations in the Properties panel. Click through all of them, because quality differs between them. Zoom to 100% and check the edges of the filled area, the continuation of lines (horizons, edges, fences), repeated textures, and the grain or noise level. A fill that looks clean at fit-to-screen can show visible softness at full size, especially when the surrounding photo has film grain or sensor noise.
If none of the variations is right, click Generate again for more. Each run uses credits, so adjust the selection or prompt between runs instead of regenerating without changing anything.
A complete example: removing a tourist, then adding a replacement
Imagine a photo of a stone bridge with a tourist standing at the center and a bin on the right.
- Use Object Selection on the tourist. Expand the selection by 10 pixels and include the shadow on the bridge surface with Shift-Lasso.
- Click Generative Fill, leave the prompt empty, and click Generate. Choose the cleanest variation.
- Select the bin with a margin and generate with an empty prompt. If a bin-like shape reappears, regenerate with the prompt
stone wall. - Add a new subject: draw a small selection at the left of the bridge, enter the prompt
a small white sailboat on calm water, and generate. Shape the selection to match the sailboat's expected size and perspective. - Zoom to 100%. Mask any stray artifacts on each generative layer.
- Name the three generative layers clearly (
remove tourist,remove bin,add sailboat) so you can toggle each one later.
The result keeps three separate, reversible edits above the untouched original.
Summary of practices
- Select the object plus a margin and its shadow or reflection.
- Use an empty prompt first for removal. If it fails, describe the background.
- Describe what should be present, not what should be absent.
- Remove complex items in stages, one generative layer each.
- Compare all variations at 100% zoom.
- Use simpler tools for tiny jobs to save credits.
Exercise
You select a person standing on a pavement and run Generative Fill with an empty prompt. The person disappears, but a faint outline of their shape remains and their shadow is still visible. Name the two selection mistakes that likely caused this and the fix for each.
Show answer
The outline remains because the selection was too tight: the object's soft edge pixels were left outside the selection, and the model built around them. Fix it by expanding the selection (Select > Modify > Expand, roughly 5 to 15 pixels). The shadow remains because it was not part of the selection, so the model kept it as scene content. Fix it by adding the shadow to the selection, for example with Shift plus the Lasso tool, and then regenerating.
Exercise
An empty-prompt removal of a lamp post keeps producing a new lamp post. You want a clear sky and brick wall behind it. What prompt do you try, and what prompt do you avoid?
Show answer
Try a short background prompt that describes the wanted result, such as brick wall and clear blue sky. Avoid prompts like no lamp post or remove the lamp post, because naming the object can cause the model to draw it.