Sub topic 6
Generative layers and non-destructive editing
This chapter assumes you can open images, work in the Layers panel, make selections, and use layer masks. It covers what Photoshop creates when you run Generative Fill or Generative Expand, how to keep those edits reversible, and the mistakes that cause lost work.
What a generative layer is
Each time you generate, Photoshop adds a new layer above your current layer. This is a generative layer. It holds only the new pixels, so your original image stays untouched underneath.
A generative layer differs from an ordinary pixel layer in these ways:
- It has a layer mask built from your selection. The mask limits where the new pixels show.
- It stores the prompt and the set of variations, which you can reopen in the Properties panel.
- It is tied to the Firefly service, so regenerating needs an internet connection and uses generative credits.
- It carries provenance data that feeds Content Credentials (covered in a later chapter).
Because the result sits on its own layer, you can hide it, delete it, reorder it, or change its blend mode without touching the photo below.
Anatomy of the result
A generative layer is a pixel layer plus a mask. The mask is not always a simple copy of your selection. Photoshop usually generates content slightly beyond the selection edge so it can blend into the surroundings, then uses the mask to control what is visible.
Where the layer appears in the stack
The new layer is placed above the layer that was active when you generated. This has a practical effect. If you have several layers and one is selected, the generation sees what is visible beneath the selection, and the result lands directly above the active layer.
Watch for two cases:
- Active layer is a lower layer. The new layer is inserted just above it, so layers above it can still cover the result.
- Nothing visible in the selected area. If the area is transparent or hidden, the generation has little context and results are weaker.
If a result seems missing, check whether another layer is covering it before you assume the generation failed.
Reading the Properties panel
Select a generative layer and open Window > Properties. The panel shows the controls for that layer:
| Control | What it does |
|---|---|
| Prompt field | Shows the text used. Edit it and select Generate to try a new version. |
| Generate button | Creates more variations from the same selection. |
| Variations thumbnails | Lets you switch between the generated results. |
| Layer mask controls | Adjust the density and feather of the mask. |
The variations stay attached to the layer. You can return later and pick a different one, as long as the layer has not been rasterized or merged.
Generating more without stacking layers
When you select Generate again from the Properties panel, Photoshop adds more variations to the same layer. It does not create a new layer. This keeps the Layers panel tidy and lets you compare options in one place.
A new layer is created only when you make a fresh selection and run Generative Fill again. Use this on purpose:
- Use one generative layer per distinct change, such as one for removing a sign and one for adding a tree.
- Name each layer after its purpose, for example "Remove sign" or "Add tree".
- Keep related variations on the same layer by regenerating from the Properties panel.
Mask behavior and editing the mask
The mask on a generative layer works like any layer mask. White shows the generated pixels and black hides them. You can paint on it to adjust the result.
# A conceptual model of how a generative layer is composited.
# This is not Photoshop's API. It only shows the idea of a mask.
def composite(original, generated, mask):
"""Blend per pixel. mask is 0.0 (hide) to 1.0 (show)."""
return [
o * (1 - m) + g * m
for o, g, m in zip(original, generated, mask)
]
original = [100, 100, 100, 100]
generated = [200, 200, 200, 200]
mask = [0.0, 0.5, 1.0, 1.0]
print(composite(original, generated, mask))
# [100.0, 150.0, 200.0, 200.0]The soft value 0.5 in the example is why feathered edges blend well. Painting the mask with a soft brush gives the same result in Photoshop.
To refine the mask:
- Click the mask thumbnail on the generative layer.
- Choose the Brush tool with a soft edge.
- Paint black to hide generated pixels, or white to bring them back.
- Use a low opacity for subtle changes.
Painting on the mask does not delete anything. You can always paint it back.
Non-destructive habits that matter
A generative layer is non-destructive by default, but several actions remove that safety. Keep these in mind.
Actions that preserve editability
- Hiding the layer with the eye icon.
- Changing the layer's opacity or blend mode.
- Adding adjustment layers above it.
- Painting on its mask.
- Clipping an adjustment layer to it.
Actions that lock in the result
- Rasterizing or merging the layer. This removes the link to the prompt and variations.
- Flattening the image. All layers become one, and you lose separate control.
- Merge Visible or Stamp Visible used carelessly, since you may bake in changes you meant to keep separate.
If you must merge, save a copy first. A layered PSD or PSB file keeps the generative layers and their variations.
Building on a generative layer
You often need a second pass, such as a color match or a sharper edge. Instead of regenerating, work above the generative layer.
- Color and tone. Add a Curves or Hue/Saturation adjustment layer and clip it to the generative layer (Alt-click or Option-click between the two layers). It then affects only the generated pixels.
- Grain and sharpness. Generated areas can look cleaner than the photo around them. Add a grain layer set to Overlay or Soft Light, clipped to the generative layer.
- Selective edits. Use the mask to paint away parts that do not fit.
Clipping keeps each fix separate, so you can turn any of them off.
Generating from a merged view
Generative Fill reads what is visible in the document, not only the active layer. If you want it to consider everything you see, including adjustments and other layers, make sure those layers are visible when you generate.
Some users create a stamped copy of the visible image to generate from. To do this, press Ctrl+Alt+Shift+E (Windows) or Cmd+Option+Shift+E (Mac). This creates a new merged layer on top. Generating on it gives the model the full picture, and your original layers stay intact below. Delete or hide the stamped layer if you no longer need it.
Common problems and fixes
| Problem | Likely cause | Fix |
|---|---|---|
| Variations are gone after reopening the file | The layer was rasterized, merged, or saved to a flat format | Keep the layered file and avoid merging until you are done |
| Generate button is unavailable | No connection, no credits, or no active selection | Check your network, credit balance, and selection |
| The new content is hidden | Another layer is above it, or the mask is black | Check layer order and the mask thumbnail |
| Edges look harsh | The mask edge is hard | Feather the mask in the Properties panel or paint with a soft brush |
| Color does not match | The generated content has a different tone | Add a clipped adjustment layer |
Working with Smart Objects and groups
Generative layers behave well inside groups. You can place related layers in a group, such as "Sky edits", and toggle the whole group. You can also apply a group mask to hide several generative layers at once.
Be careful with Smart Objects. If you convert a generative layer into a Smart Object, you can still scale and filter it without loss, but you lose access to the variations in the Properties panel. Choose your variation first, then convert.
A worked workflow
Suppose you have a street photo and want to remove a bin and add a lamp post.
- Duplicate nothing. Keep the original as the bottom layer.
- Select the bin with the Object Selection tool and expand the selection by a few pixels.
- In the Contextual Task Bar, choose Generative Fill and leave the prompt empty. Generate. Rename the new layer "Remove bin".
- Review the variations in the Properties panel and choose one.
- Select an empty patch of pavement where the lamp post should stand. Type "a black cast iron street lamp" and generate. Rename the layer "Add lamp".
- If the lamp is too bright, add a Curves layer clipped to "Add lamp".
- Save as a layered PSD.
You now have two separate, reversible edits on top of an unchanged photo.
Exercise
You ran Generative Fill, chose a variation, and then used Merge Down on the generative layer. Later you want to try a different variation. What happened, and what should you have done?
Show answer
Merging down rasterized the generative layer into the layer below, which removed its prompt and stored variations. You should have chosen your final variation, kept the generative layer separate while you worked, and saved a layered PSD or PSB master (or a copy before merging) so the variations stayed available.
Exercise
A generated patch looks slightly too bright compared to the photo. Name a non-destructive way to fix it without regenerating.
Show answer
Add an adjustment layer such as Curves or Brightness/Contrast above the generative layer and clip it to that layer (Alt-click or Option-click between them). The adjustment then affects only the generated pixels, and you can turn it off at any time.