2
1 Comment

Building an AI Memorial Portrait Generator: Architecture, Trade-offs and Lessons

For the past few weeks I’ve been building a small web app called Memento AI — a service that turns 2–8 photos of a person (or pet) into a single memorial-style portrait in about 30 seconds.

You can try it here: https://mementoai.net

This isn’t a general “AI art playground”. It’s very specific: combine multiple photos into one gentle, dignified portrait that families can use for funerals, memorials and tribute gifts. In this post I’ll walk through the architecture, why I chose it, and a few things that went wrong along the way.

Problem and constraints

The original problem was simple:

“I want a good memorial portrait of someone I love, but commissioning an artist is expensive and slow, and generic filters feel impersonal.”

Manually compositing faces in Photoshop is also a skill and takes time. AI is relatively good at blending and stylizing images, so it felt like a good candidate.

From the beginning I set some constraints:

  • End-to-end latency: aim for ≤ 30 seconds from “Generate” to preview.

  • Zero GPU hosting: I did not want to run my own inference servers.

  • Respectful UX: no aggressive upsells, no “meme generator” aesthetic.

  • Privacy: don’t keep images forever and don’t use them for training.

Those constraints drove most of the technical decisions.

High-level architecture

At a high level, Memento AI looks like this:

  1. Frontend (Next.js 15, TypeScript, Tailwind, shadcn/ui)

  2. API routes in Next.js for upload, job creation and callbacks

  3. Workflow engine using n8n (Docker) to orchestrate the image generation

  4. AI model via OpenRouter, using a Gemini 2.5 image “blend” endpoint

  5. Object storage for uploads + outputs

  6. Payment provider (Creem/Stripe-like) for unlocking HD downloads

Things that went wrong

A few mistakes / surprises along the way:

1. Unexpected subjects and weird proportions

Blending multiple photos of a person or pet turned out to fail in different ways than I expected. I didn’t get many “two faces” artifacts, but I did see things like:

  • An extra stranger in the background

  • The pet disappearing entirely from a family + pet photo

  • Wild proportions (e.g. a giant baby next to normal-sized adults)

Most of this was improved by:

  • Tightening the prompt around who should appear:e.g. “Only include the people and pets from all input photos, no extras.”

  • Being clearer in the UI that users should upload a coherent set of photos

There’s still work to do here, especially around identity preservation and size consistency. I’d love ideas from anyone who has tackled multi-image identity and mixed human/pet scenes.

2. Wrestling a generic starter kit into a focused product

On the frontend side, I started from a generic SaaS starter pack. That saved time on auth, billing and layout, but also created friction:

  • The default IA assumed a “dashboard + settings” app, not a single-page wizard.

  • Checkout and pricing components were built for plans and seats, not “buy this one portrait”.

  • I spent non-trivial time ripping out marketing sections, unused components and routes.

In hindsight, I probably should have started from a much thinner template and only copied over the specific pieces I needed (auth, billing). Adapting a starter kit was still faster overall, but it added a lot of refactoring to make the frontend feel purpose-built for a simple “upload → generate → purchase” flow.

Reflections and next steps

Building Memento AI has been an interesting mix of:

  • Frontend UX work (making a sensitive flow feel calm and respectful)

  • Systems design (jobs, callbacks, storage, payments)

  • Prompt engineering / model wrangling

Next steps I’m considering:

  • Additional styles (e.g., soft color painting) without overwhelming users

  • More robust data deletion tooling and user controls

  • B2B integrations for funeral homes, where they can upload photos on behalf of families

If you’re curious, you can try it at https://mementoai.net.

I’d love feedback on the architecture, trade-offs, and especially on how to handle multi-image identity and privacy better.

posted toAvatar for product Memento AI
Memento AI
  1. 1

    Congratulations on your launch. It looks impressive! What channels are you exploring to attract early users?