WhoBuilt

Google Photos Magic Editor: GenAI Under the Hood of a Billion-User App

Jul 19, 2025· 20 min· 2.3K views·Watch on YouTube

Speaker

Kelvin Ma, an engineer on the Google Photos editing team at Google, explains how the team built AI photo editing features and what it takes to make generative editing reliable at scale.

Building computational photography for Photos

Google Photos has about 1.5 billion monthly active users and handles hundreds of millions of edits each month. Since 2018, Ma’s team has used on-device compute and machine learning to improve photos, including brightening a dark sunset image from a single shot. Android, iOS, and web clients share a C++ library for on-device model inference with LiteRT.

Lessons from on-device editing

Early features included portrait background blur, relighting, and Magic Eraser. Segmentation used a U-Net model, but its 10 MB size raised app-size, download, and model-protection challenges; the team also needed benchmarks that reflected real-world use. Magic Eraser combined detection, segmentation, inpainting, and custom rendering, while model edge cases and slow iteration made launch deadlines harder to manage.

Making generative editing a focused product

Magic Editor brought larger models to Photos, where Ma said the goal was grounded edits that preserve the feel of users’ memories. Moving from on-device inference to servers introduced capacity planning, network latency, and testing challenges. Ma argued that teams must narrow broad requests into specific user needs, such as moving objects, reimagining scenes, or removing objects and their reflections.

Reducing ambiguity and improving reliability

Ma described a cross-functional approach: product teams identify user needs, researchers tailor models to those tasks, and engineers build interfaces that guide users toward reliable results. For open-ended edits, offering several generated options can help users choose what works. Trust and safety remain ongoing concerns because language and model outputs are ambiguous.

Engineering practices and what comes next

Ma framed AI engineering as software engineering with machine learning, whose randomness needs to be controlled through repeatable evaluations. He recommends making evaluations faster and replacing oversized models with smaller models or deterministic code once a use case is understood. Google Photos announced an AI-first editor that surfaces relevant edits, with AI and deterministic tools working together.

Takeaways

  • Treat model benchmarks as regression tests, and make them reflect real-world usage.
  • Define a specific user problem before building a generative editing system.
  • Plan for capacity, latency, and testing when moving inference from devices to servers.
  • Use guided interfaces and focused models to reduce ambiguity and improve reliability.
  • Once a use case is validated, consider smaller models or deterministic code to improve speed and efficiency.

Mentioned in this talk

Search inside this talk

What was claimed 7

  • feature
    Google Photos: Automatic photo backup, indexing, OCR, and machine learning search
    “we offer automatic backup.”
    YouTube
    Unverified1 source· Talk
  • metric
    Google Photos: Hundreds of millions of edits per month across clients
    “we do hundreds of millions of edits per month across our clients.”
    YouTube
    Unverified1 source· Talk
  • metric
    Google Photos: About 1.5 billion monthly active users
    “We have about 1.5 billion monthly active users.”
    YouTube
    Unverified1 source· Talk
  • uses
    on-device model inference
    “we run inference on-device using TensorFlow Lite, which is now called LiteRT.”
    YouTube
    Unverified1 source· Talk
  • feature
    Magic Eraser: Detects and segments distractions, then inpaints the background on device
    “we're detecting distractors, segmenting them, running an inpainting model on them.”
    YouTube
    Unverified1 source· Talk
  • feature
    Magic Editor: Supports moving objects, reimagining scenes, and erasing content with generative models
    “the ability to move things within the image ... reimagining some of the scenes; and erasing.”
    YouTube
    Unverified1 source· Talk
  • feature
    Google Photos: Rebuilding the editor from the ground up to be AI-first
    “we’re rebuilding the editor from the ground up to be AI-first.”
    YouTube
    Unverified1 source· Talk

Related talks