World's Fair 2025
Google Photos Magic Editor: GenAI Under the Hood of a Billion-User App - Kelvin Ma, Google Photos
Overview
This talk details the engineering journey behind Google Photos' Magic Editor, highlighting the transition from on-device ML models to server-side generative AI. It emphasizes the challenges and learnings in integrating cutting-edge AI into a widely used application, focusing on user experience, model efficiency, and the inherent unpredictability of AI systems. The core thesis is that while AI offers powerful new capabilities, successful product integration requires rigorous engineering to manage its randomness and deliver reliable, user-friendly features.
Who should watch
- AI Engineers
- Product Managers
- Software Engineers building AI-powered features
- Anyone interested in the practical application of generative AI in large-scale consumer products
- Those facing challenges with on-device vs. server-side AI deployment
- Teams dealing with model evaluation and ensuring AI reliability
Key takeaways
- Google Photos leverages machine learning for features like auto-backup album creation, OCR search, and automated photo organization for its 1.5 billion monthly active users.
- Early editing features like post-capture segmentation and Magic Eraser relied on on-device ML models, primarily using TensorFlow Lite, with a focus on C++ libraries for inference.
- On-device models presented challenges such as large file sizes, the need for model management and IP protection, and the complexity of evaluating model performance against real-world usage.
- The transition to generative AI for features like Magic Editor moved processing server-side, introducing new engineering concerns like server capacity planning, latency due to network conditions, and difficulties in automated testing.
- *AI engineering is software engineering with ML on top, and our job is to reduce randomness.*
- A key challenge with generative AI is the ambiguity of the problem space; users have use cases, not abstract requests for generative editing, requiring engineers to constrain the problem and guide users.
- *Prompt is a bug, not a feature; we want to extract user intent and provide what they actually want.*
- Future development involves rebuilding the editor to be AI-first, meeting users where they are with AI-surfaced relevant edits and potentially using AI to enhance deterministic tools.
Notable quotes
Kelvin Ma stated that *AI engineering is software engineering but with machine learning or ML on top. And to me ML is this great power but it also adds a lot of randomness into your system.*
He also noted, *Prompt is a bug, not a feature. You want it to be easy to use. A user doesn't want to look at a prompt and think about what they want in a very detailed way.*
Unofficial community note. Prefer the recording for nuance.