Img2Layers

Turn any flat image into editable PSD layers with AI

Visit Website
September 1, 2026 The hard part of "image to layers" isn't cutting things out. It's what's behind them.

I shipped img2layers.com recently. Small tool, narrow job: you give it a flat image, it gives you back a layered PSD.

The reason I built it is boring. A client sent me a JPG of a banner made two years earlier by an agency that no longer existed, and asked if I could change the price to $49. No source file. I spent forty minutes cloning out the old number, patching the gradient behind it, guessing at the font, rebuilding a drop shadow by eye. Four characters, forty minutes.

What I want to write about is the part that surprised me during the build.

I thought this was a segmentation problem

Going in, my mental model was: segmentation models are good now, point one at the image, get objects out, done. Maybe two weeks.

Segmentation was genuinely the easy half. It works. You can pull the product, the text block, the subject out of a poster with pretty good boundaries, and most of the work there is plumbing rather than research.

Then you switch off the product layer and there's a product-shaped hole in your background.

That's the actual product. Nobody wants a cutout — they already have five tools that do cutouts. They want the background layer to be a complete background, so the thing that was sitting on it can move. Which means every object you lift out leaves a region you have to invent.

I ended up with two paths depending on what's behind the hole. Flat colour, simple gradients, repeating texture — a fast classical inpainting pass handles it and costs almost nothing. Anything structured behind the object, and it has to go to a diffusion-based fill, which is slower and more expensive but is the only thing that produces a plausible answer.

Most of my time went into deciding which of the two to use, per region, without asking the user.

The specific thing that kept breaking

Shadows.

You remove a product from a poster and the inpaint comes back clean. Looks great. Then you drag the product two hundred pixels left and its shadow is still sitting there on the background, perfectly intact, pointing at nothing.

Segmentation doesn't catch shadows, and I understand why — a soft-edged darkening of the surface underneath isn't the object, and no model trained on object boundaries is going to include it. But to a human looking at the result it's the single most obvious tell that the file is fake.

My first attempt was a brightness threshold near the object edge. Terrible. It ate dark parts of the actual background and left shadows on light surfaces untouched.

Second attempt was dilating the object mask by a fixed margin before inpainting — just erase a generous ring around everything. That fixed the shadow and destroyed everything else in the ring.

What I do now is dilate the mask anisotropically: estimate the light direction from the image, expand the mask further on the shadow side than the others, and let the inpainter fill it. It's not principled and it fails on images with multiple light sources, but it works on the flat-lit product and marketing imagery that most of this tool's input actually is.

I'm still not fully happy with it. It's good enough that most people don't notice, which is a lower bar than "correct" and I'm aware of the difference.

What it's bad at

Saying this up front because you'll find it in thirty seconds anyway.

Heavily compressed files break it. A JPG that's been screenshotted and re-saved twice has artifacts that read as real edges, and you get layer boundaries in strange places.

Text comes back as pixels, not live type. It isolates text onto its own layer so you can move or delete it cleanly, but you don't get an editable text object in the right font. That's a separate problem and I haven't touched it.

Tightly stacked objects merge. Three products overlapping can come back as two layers.

It takes you from "flat file, unusable" to "editable file, mostly right." The last ten percent is still you in Photoshop.

Where it actually is

It's live and it's early. Not enough usage yet to tell you anything meaningful about retention or willingness to pay, so I'm not going to pretend otherwise. Free right now while I find out where it breaks.

Two things I'd take from anyone reading:

If you've built anything on top of generative fill or inpainting, how did you decide it was good enough to ship? I don't have a metric for it. I have my own eyes and they're biased.

And if you deal with inherited flat assets — old marketing collateral, files from a designer who left — send me your worst one. Right now the failures are worth more to me than the wins.

Comment

About

Flat images can't be edited and the original PSD is almost never available. Img2Layers uses AI segmentation to split a flat image back into editable layers, exported as PSD or transparent PNGs.