← All posts

How to Use Nano Banana With Layers and Masks in Your Browser

Generate an image direction with Nano Banana, then keep control with editable layers, masks and adjustments in PhotoFresco's browser-based editor.

The quickest way to make AI image editing frustrating is to ask one prompt to do everything. Generate the scene, preserve the product, retain the type, fix the edge, match the lighting, and make it ready to ship. That is not one task. It is a stack of tasks, and the last few need an editor.

This workflow uses Nano Banana for the broad visual move, then layers and masks for the precise part. It works in PhotoFresco in a browser and keeps every decision editable.

1. Start with an image worth protecting

Open the original image and duplicate its layer. The duplicate is your working copy; the original stays below it as your reference and safety net.

Before generating, decide what must not change. A product's logo? A person's face? The silhouette of a shoe? Write those constraints down in the prompt. A model responds better to “keep the red shoe, logo and side profile unchanged; replace only the studio background with a sunny city sidewalk” than “make this look better.”

2. Generate the big change

Choose the Nano Banana route in the AI generator and describe the scene, lighting and mood you want. Keep the request focused on the broad change: background, environment, styling or a compositional variation.

Do not flatten the result. Place it above the original as its own layer. Now you can compare it, lower its opacity, and see exactly where the model helped versus where it wandered.

3. Mask instead of erase

Add a layer mask to the generated layer. Paint with black on the mask to hide the generated pixels and reveal the original underneath; paint with white to bring the generated version back.

This is the useful trick: a model might create a great new setting but slightly warp a product handle or a face. Mask back the original handle or face. You keep the scene change without accepting the mistake.

For a clean cutout first, follow the background-removal tutorial, then put the generated scene below the masked subject.

4. Match the image instead of prompting again

Most of the “this looks AI-generated” feeling comes from mismatched basics: contrast, saturation, shadow direction, grain and edge color. Use adjustment layers to bring the two layers together. A small curves adjustment or a slight hue/saturation correction is more predictable than another full generation.

At this stage, zoom in. Check type, logos, hands, hair, transparent material and the edge where the original meets the generated background. Those are the areas where a convincing full image can break down.

5. Save the editable version

Export a JPEG or PNG for delivery, but save a PSD too. The PSD preserves the original, the generated layer and the mask that joins them. When you need a second campaign size or the client wants a different background, you can adjust the file instead of starting from zero.

Pick the model after you know the task

Use a lighter, faster Nano Banana tier to explore several visual directions. Use a more deliberate route when the final output itself needs to carry a lot of detail. In both cases, layers reduce the risk: the model has to solve the broad idea, not every pixel in your document.

See the Nano Banana guide for the tiering logic, and the PhotoFresco Model Lab for completed model outputs and their actual run costs.