How to Edit AI-Generated Designs Without Regenerating Them Imgly published a guide and open-source demo app, editable-ai-ads, that turns a single text prompt into an ad composed of four separate layers — generated background, product cutout, real text headline, and locked logo — so marketers can retype headlines, drag products, swap logos, and resize to 1:1, 9:16 or 16:9 without another generation call. The guide reports that regenerating a whole image costs 1 model call and 22 to 26 seconds per attempt with low brand consistency, while layer editing costs 0 model calls and milliseconds for text, layout, logo and size changes and 26 to 38 seconds to regenerate a single layer, with Ideogram V3 used for four parallel full-ad generations in the test. What You Will Build: AI-Generated Ads as Editable Layers This guide will show you how to create layered images with a web app that turns a single prompt into an ad made of four separate layers. You’ll have a generated background, a product cutout, a real text headline, and a locked logo. In the app, you can retype the headline, drag the product, swap the logo for another approved version, and resize the ad to the ratio you’re after, like 1:1, 9:16 or 16:9. The surprise is that none of that needs another generation call. When the background isn’t quite right, the app regenerates only that layer and leaves the rest alone. Demo: labs.imgly.dev/p/r24dbfde editable-ai-ads https://labs.imgly.dev/p/r24dbfde editable-ai-ads Repository: github.com/imgly/editable-ai-ads https://github.com/imgly/editable-ai-ads This article is for anyone that builds their own marketing tools, or who are adding AI image generation to their apps and SaaS platforms. If you already have image generation in place but are tired of generating entire images when all you need is a few tweaks here and there then you’ve come to the right place. Why “Regenerate With a Better Prompt” Is the Wrong Answer for Marketers An image model generally gives you one flat picture with a single layer, which means that the headline, product, logo and backdrop are all pixels in the same bitmap. Making small changes with regular image generation tools means you roll the dice and hope that the next image makes the right changes without flipping the script and changing everything else. For this article, the same full-ad prompt went to Ideogram V3 four times. This is a useful way to explore designs in parallel, letting you focus on your initial idea until you find the perfect starting point. From here, what you really want is to be able to edit your idea and tweak it, not get a completely different picture. Using the demo app, you can move the headline or change a word while keeping everything else exactly as it was. The first round of generation produces layers, so the user can change specific elements of the design piece by piece, and the export keeps everything else exactly as it was except for the edit. Editing AI Output: Regenerate, Inpaint, or Generate Layers Into a Scene The table below shows you all of the generation options for your next ad, and how it all fits together. | Property | Regenerate the whole image | Inpaint a region | Generate layers into a scene | |---|---|---|---| | Cost per iteration model calls | 1 per attempt | 1 per attempt | 0 for text, layout, logo and size changes; 1 to regenerate one layer | | Time per iteration | 22 to 26 s per attempt in the test run | Not tested with a mask; one image-to-image edit of the flat ad took 21 s | Milliseconds for layout, logo and size changes; 26 to 38 s to regenerate one layer | | Brand consistency across iterations | Low: product, logo and layout changed between attempts | Medium: pixels outside the mask are kept, pixels inside are redrawn | High: layers you do not edit do not change | | Text stays real text | No, it is pixels | No, it is pixels | Yes, it is a text block | | User can move and resize elements | No | No | Yes, block by block | | One-click resize to other formats | No, one generation per format | No, one generation per format | Yes, the layout runs again on the same blocks | | Logo stays exact | No, the model draws it | Only if the mask leaves it out | Yes, it is a file from the brand kit | | Works with any image model | Yes | Only models that support inpainting | Any text-to-image model to generate; an image-to-image model to regenerate a layer | | What you have to build | A prompt form | A prompt form and a masking tool | A generation step, a scene composer and an editor | The first two approaches spend a model call on every change, which is perfect for prototyping your ideas until you find the design that you are looking for. They don’t keep the logo or the layout the same, so you will get variations until you’re happy with the general look and feel. The cool feature is that layers only use model calls where new pixels are needed, and every other change is an ordinary edit that only changes when you decide. Step 1: Generate the Parts, Not the Picture generateParts in src/generate.ts asks for four parts instead of one ad. Each of these parts comes from a different source, but the three that take time run in parallel. Instead of waiting for three separate generations, it only takes as long as the slowest render. // src/generate.ts export async function generateParts client: GatewayClient, brief: AdBrief : Promise