AI productsLuma AI
Mass Production: AI Pipeline for E-commerce Imagery
An end-to-end AI pipeline turns factory photos into editable e-commerce imagery through generation, product-detail preservation, and spec-driven post-processing. I designed the batch API with the customer to track progress and support human review across SKUs.
- Role
- Built the single-image pipeline and the internal batch tool; agreed the batch API design with the customer.
- Problem
- A good-looking generated image isn’t a delivery. The customer needs editable files with accurate product pixels, layers and placement to spec.
- Outcome
- Single-image pipeline running; internal batch tool in use; customer batch API agreed in design.
- When · stack
- 2026 · Matting, Deterministic compositing, Temporal, API design
Impact
It starts from what counts as a delivery: not a pretty generated image, but an e-commerce asset the customer can keep editing, with the product looking exactly like the product and layers and placement to their spec.
Then from one image to a batch of SKUs: teammates submit a set of images, get the successful results back and retry the failures on their own.
My contribution
The judgment that mattered: a generative model helps find the contours that are hard to segment, but the final product pixels always come from the original photo.
- Deterministic processing then separates product, shadow and background into layers and sets margins and placement.
- That draws the line between where AI helps and where the output has to be exact.
From one photo to a delivery
Generation and post-processing each do half the job

01 · Input
Factory reference photo
What the factory can give: the right product, shot on a workbench.

02 · Generation
Generated product shot
A clean studio image of the same shoe: the look the storefront needs.
03 · Post-processing
Layered, spec-compliant asset
Product pixels from the original, then shadow, background and placement done deterministically.
Generation gets the look the storefront needs; it is not allowed to redraw the product. A model helps find the contours that are hard to segment, the product’s pixels come from the original, and deterministic steps do the layers, background and placement. Either half alone isn’t a delivery.
When a check fails
Checking every item, and letting a person decide

Automatic check · failed
The shoe meets the margin rule, but scaling it there pushed the wider shadow past both edges. The check caught the violation, but the reason shown to the operator wasn’t clear enough to act on.

A reason someone can act on
“Shadow clipped at the left and right edges after scaling to the margin. Fit the product and shadow together, or widen the canvas.” A reviewer can act on that, and the same rule fixes the item.
In a batch, a check has to run on every item, and its reason has to be specific enough to act on. Some calls still need a person: the reviewer sees the produced asset and accepts it or sends it back. That is why the batch API includes approval, not only progress.
At batch scale
Many SKUs, many angles, some of them failing
6 done1 failed check2 awaiting approval
SKU 1White leather sneaker



SKU 2Slate knit runner



SKU 3Brown suede loafer



Illustration with product photos made with Luma; the states are an example, not a real batch.
- Single-image pipeline
- Running end to end
- Internal Temporal tool
- Batches, retries of failed items, and delivery of partial results
- Formal Batch API
- Progress queries and the approve/reject contract agreed with the customer
Educational demo · synthetic data
A batch: the item is the unit of retry
Context
The input is what a factory has: reference photos of each product. The output has to be what a storefront needs: every product, every angle, as an editable file. A generated image that looks right but changes the product, or can’t be edited, can’t be used.
So the pipeline has two halves: getting one image to a real deliverable, and then running that for a whole batch without anyone babysitting it.
What I built
- A single-image pipeline: model-assisted contours for hard edges, original pixels for the product, and deterministic layering of product, shadow and background with spec margins.
- An internal batch tool on Temporal: each image is its own durable step that can retry, fail or finish independently, and finished outputs stay retrievable.
- A batch API, agreed with the customer in design, for tracking progress per SKU and approving or rejecting results, built to be reused by other generation workflows.
How it works
Illustrative pattern · not the production pipeline
One image: AI for the edge, the original for the pixels
Decisions
01
AI for the contour, the original for the pixels
The model is good at deciding where a hard edge is; it should not get to redraw the product. Taking the product pixels from the source keeps it exact.
02
The item is the unit of retry
A failure retries one image. Everything that already succeeded stays done and isn’t paid for again.
03
Partial success is a result
A batch with a few failures returns the finished outputs and clear errors, not one failure.
What this page shows
The shoes and their layers were made with Luma for this page; they are not customer products. The diagrams show the general pattern, not the production system.


