Sub topic 2
Preparing selections that guide the result
This chapter assumes you can open an image, work in the Layers panel, and use the Lasso, Marquee, and Object Selection tools. It also assumes you know what a layer mask is. The focus here is on how the selection you make shapes what Generative Fill produces.
What the selection does for the model
Generative Fill does not read your mind or your whole file in the abstract. It receives two things: the pixels it is allowed to change, and the surrounding pixels it can use as context. The selection defines the first. The area around the selection supplies the second.
That has three practical consequences:
- Anything outside the selection is preserved. Generated content is confined to the selected area, apart from a soft blend at the boundary.
- The shape and size of the selection suggest what belongs there. A tall, narrow selection invites a tall, narrow object.
- The pixels that touch the selection edge control lighting, color, perspective, and texture. If those pixels are wrong or missing, the result tends to look pasted in.
Treat the selection as a brief to the model. A careless selection gives a careless brief.
Choosing a selection tool
Any selection method works as input. Pick the one that gives the cleanest boundary for the job.
| Tool | Best for | Watch out for |
|---|---|---|
| Rectangular Marquee | Backgrounds, skies, flat areas, and canvas regions | Rigid edges that cut through objects |
| Lasso | Quick freehand areas around an object to remove | Jagged edges if you draw too fast |
| Object Selection | Isolating a person, product, or other distinct object | Misses shadows and reflections |
| Quick Selection or Select Subject | Subjects with clear contrast | Hair and semi-transparent edges |
| Select and Mask or Select Sky | Complex edges, skies | Extra steps, and soft results if you over-feather |
For adding new content to an open area, a rough shape is usually enough. For removing or replacing an existing object, edge quality matters much more, because leftover pieces of the old object stay in the image and confuse the result.
Give the model room to work
Select slightly beyond the object
When you remove or replace something, select a little more than the object itself. Include its shadow, its reflection, and any halo or fringe around the edge. If you select tightly, a thin outline of the original object can remain, and the model may try to rebuild the object from those fragments.
A reliable method for removal:
- Select the object with Object Selection or the Lasso.
- Choose Select > Modify > Expand and enter a small value, such as 5 to 15 pixels depending on image resolution.
- Add the shadow or reflection with Shift-drag in the Lasso tool.
- Run Generative Fill with an empty prompt (covered in a later chapter).
Avoid selections that are too large
A huge selection gives the model many pixels to invent and little context to anchor them. Quality usually drops, and results can drift in style or detail. If you need to change a large area, work in stages. Fill one part, then select an adjacent part that overlaps the already-filled area.
Avoid selections that are too small
A very small selection can produce unpredictable output, because there is little room for a coherent object. Generated content may look blurry or generic. If a tiny region keeps failing, enlarge the selection so it includes more of the neighboring area.
Overlap context on purpose
Include a thin strip of good, representative pixels inside the selection when you want a smooth transition. For example, if you extend a wall texture, start your selection a few pixels inside the existing wall. The blend at the boundary is then handled inside the generated area rather than along a hard seam.
Edge behavior: feathering and anti-aliasing
Selection edges affect how the generated content meets the original image.
- A hard, tight edge can produce a visible seam or a faint outline, especially on smooth gradients such as sky.
- A selection that is feathered a little lets the new content blend into its surroundings.
- Too much feather spreads the change into pixels you wanted to keep, and can leave a smeared band.
Use the Select and Mask workspace or Select > Modify > Feather for small, deliberate adjustments. A value of 1 to 3 pixels is a common starting point for typical screen-resolution images. High-resolution print files may tolerate more.
Because the result is placed on a generative layer with a mask, you can fix edge problems afterward. Still, a clean selection saves editing time.
Selections that carry composition information
The geometry of a selection is a form of instruction, even before you type a prompt.
- Shape. If you want a window, a rectangular selection helps. If you want a person standing, a tall selection fits.
- Position. An object near the bottom of the frame tends to be generated as if sitting on the ground. An object near the top may appear as if floating or hanging.
- Scale. The selection's size sets the generated object's apparent size relative to the scene. If a generated chair looks too big, shrink the selection, then regenerate.
- Perspective. Draw the selection so it follows the perspective lines in the scene. A selection on a floor should be shaped like the floor plane, not a flat rectangle.
When a generated object has the wrong size or placement, change the selection before you rewrite the prompt. In most cases the selection is the faster fix.
Building complex selections
Combine selection modes to reach the shape you need.
- Make the first selection with any tool.
- Hold Shift to add to it, or Alt (Windows) / Option (macOS) to subtract.
- Use Select > Modify > Expand, Contract, Smooth, or Border to adjust it.
- Save it with Select > Save Selection if you plan to return to it.
Saved selections are useful when you iterate. You can reload the same region, try a different prompt, and compare the results without redrawing.
Multiple separate regions
You can select more than one area at once, but Generative Fill treats them as a single operation with a single prompt. If the regions need different content, run them separately. A common mistake is selecting a window and a door together, then typing a prompt that describes only one of them.
Selecting for common tasks
The right selection depends on the goal.
| Goal | Selection approach |
|---|---|
| Remove a person from a crowd | Select the person plus shadow and any overlapping parts of their body, expanded a few pixels |
| Replace a sky | Select Sky, then refine edges around trees or buildings |
| Add an object to open ground | Rough shape where the object should sit, sized to the intended scale |
| Change clothing color or pattern | Select only the garment, using Object Selection or Quick Selection, then clean up with Select and Mask |
| Extend a background behind a subject | Select the background area, deselecting the subject, with an overlap into existing background |
| Remove text or a watermark | Lasso loosely around the letters, expanded enough to cover antialiased edges |
A worked example: removing a lamp post
Suppose a photo shows a street scene with a lamp post that interrupts a brick wall. The post has a visible shadow on the pavement.
- Pick the Object Selection tool and drag a box around the lamp post. Photoshop outlines the post.
- With the Lasso tool and Shift held, add the shadow on the pavement.
- Choose Select > Modify > Expand, enter 8 pixels, and confirm. The selection now covers the thin fringe of the post as well.
- Check the base of the post. If the contact point with the ground is excluded, add it.
- Click Generative Fill in the Contextual Task Bar and leave the prompt empty.
The model reads the brick wall on both sides and the pavement below, then fills the selection to match. If a thin vertical line remains, the original selection was too tight. Undo, expand a few more pixels, and run again.
Common errors
- A ghost outline of the object remains. The selection was too tight. Expand it and include shadows and reflections.
- The new content looks pasted in. The selection included too little surrounding context, or the boundary was harsh. Extend the selection into similar areas and use a small feather.
- The result ignores part of the area. The selection may have a gap, or a tiny unselected island. Zoom in and check for holes, or use Select > Modify > Smooth.
- The generated object is the wrong size. The selection's size and position set the scale. Resize the selection instead of changing the prompt first.
- Results change style across a large fill. The selection was too large. Work in smaller, overlapping stages.
- The Contextual Task Bar does not show Generative Fill. There may be no active selection, or the layer may be locked or unsuitable. Make sure a pixel layer is active and a selection exists, and that you are signed in to an account that includes generative features.
A quick checklist before you generate
- The selection includes the object, its shadow, and its reflection.
- Edges have no holes, stray islands, or tight outlines.
- The selection's shape, position, and size suggest the intended result.
- Some good surrounding pixels are available for context.
- The area is not so large that quality will suffer.
- Feathering is small, usually 1 to 3 pixels.
Exercise
You select a parked car with Object Selection and run Generative Fill with an empty prompt to remove it. The car disappears, but a dark patch under where it stood and a faint outline of the roof edge remain. What two changes to the selection would you try first, and why?
Show answer
Expand the selection by several pixels so it covers the thin fringe of the car's edge, which removes the faint outline. Then add the shadow on the ground to the selection with a Lasso in add mode, so the dark patch is inside the area that gets regenerated. Both problems come from the selection being too tight. The model cannot remove pixels that are outside it.
Exercise
You want to add a tall floor lamp beside a sofa, but the generated lamp appears small and looks like it floats above the floor. You have not changed the prompt. How could you fix this by adjusting only the selection?
Show answer
Make the selection taller and wider to raise the lamp's apparent scale, and lower its bottom edge so it reaches the floor where the lamp base should sit. The size and position of the selection set the generated object's scale and where it rests in the scene.