← back
Google Photos Magic Editor: GenAI Under the Hood of a Billion-User App - Kelvin Ma, Google Photos
Takeaway
A billion-user GenAI app is really a system of on-device models with bespoke benchmarks, hardware co-design, and model management — generative quality alone isn't enough.
Summary
- Google Photos has 1.5B MAU and serves hundreds of millions of edits/month across Android/iOS/web via a shared C++ inference library running TFLite/LiteRT on device.
- Computational-photography team started 2018 with U-Net portrait segmentation; vertical integration with Pixel hardware (EdgeTPU) accelerates inference.
- Magic Eraser (2021) was a system-of-models: distractor detection → segmentation → inpainting → custom GL rendering, foreshadowing today's 'orchestration'.
- Models always return outputs (no error handling) and have consistent compute per device but big variance across Android handsets — APK-size constraints force post-install model downloads with IP protection.
- Benchmarks act as unit tests for models; maintaining them is non-negotiable for regression catching.
google-photoson-device-mlcomputational-photography
Original description
Go behind the scenes of Google Photos' Magic Editor. Explore the engineering feats required to integrate complex CV and cutting-edge generative AI models into a seamless mobile experience. We'll discuss optimizing massive models for latency/size, the crucial interplay with graphics rendering (OpenGL/Halide), and the practicalities of turning research concepts into polished features people actually use. About Kelvin Ma I'm Kelvin Ma. A product engineer with 15 years of experience working across innovative consumer applications that is used by millions of consumers. I'm passionate about using technology to build tools that improves users lives by allowing greater expression, building skills, and fostering communication. Recorded at the AI Engineer World's Fair in San Francisco. Stay up to date on our upcoming events and content by joining our newsletter here: https://www.ai.engineer/newsletter