CircleAI
Back to blog

Tutorial

How to Edit One Part of a Photo With AI

Learn how to change one selected area of a photo with AI while preserving the composition, lighting, texture, and details around it.

A full-image prompt is useful when you want a new scene. It is the wrong tool when the photo is already good and only one detail needs attention. Selective AI editing combines a marked area with a written instruction so the editor has both location and intent.

Why local edits need a different workflow

When an AI receives only a text prompt, it has to guess what should change. That uncertainty can alter faces, backgrounds, product shapes, or colors that were already correct. Marking the target area narrows the job and makes the instruction easier to evaluate.

The goal is not to make the selection as tiny as possible. The goal is to include the object and enough nearby context for the new pixels to match the scene. A useful selection usually contains the visible edge, part of the surrounding surface, and any shadow that should change with the object.

Start with a source photo that gives the AI enough evidence

Sharp edges, visible textures, and consistent lighting give the editor better clues. Heavy blur, crushed shadows, extreme compression, and objects hidden behind other objects make a precise edit harder. If the source is too small or unclear, a reshoot may be faster than repeated generations.

Keep an untouched copy of the original. It gives you a reference for color, proportions, and small details, and it lets you compare whether the edit improved the actual problem without quietly damaging something else.

Circle the object, its edge, and the affected shadow

For a color change, include the full visible object but avoid unrelated skin, text, or background. For a replacement, include the object, its contact point, and the shadow it casts. For removal, include the distraction and a narrow ring of the background that should continue behind it.

A loose circle can give the model helpful context, but a very large selection gives it permission to redesign too much. If the first result changes nearby details, undo it and make the marked area tighter.

Use a prompt with change, constraints, and continuity

A strong local-edit prompt has three parts: state the change, name the details that must stay fixed, and describe how the new area should match the original image. This is more reliable than adjectives such as "better," "professional," or "amazing."

For example: "Replace the selected mug with a clear glass tumbler. Keep the hand position and table unchanged. Match the warm window light, camera angle, reflections, and depth of field."

  • Change the selected jacket to dark green wool; keep the fit, folds, face, and background unchanged.
  • Remove the cable; continue the wall texture and preserve the baseboard shadow.
  • Replace the selected chair with a black metal chair at the same angle and scale.
  • Clean the selected corner of the table; keep the product label and reflections untouched.

Review the boundary before judging the whole image

Look closely at hair, fingers, transparent materials, printed text, straight architectural lines, and contact shadows. These are the places where a plausible edit often reveals itself. Zoom out as well: the object can look convincing up close but still feel too large, too bright, or too sharp for the scene.

If most of the result works, make a second, smaller edit around the specific error. Do not keep expanding the selection and asking the model to repair everything at once. Small corrections preserve more of the successful first pass.

Know when a precise edit is the wrong solution

Selective AI editing is useful for cleanup, exploration, and visual variations. It is not a substitute for an accurate product photo when the change would misrepresent what a buyer receives. It is also a poor fit for identity documents, evidence, medical images, or any situation where authenticity matters more than appearance.

For ordinary creative work, the best result is usually the one that solves the visible problem and leaves the rest of the photo boringly unchanged.