Itikela Bhaskar
← Hackathons
1stQualcomm

SnapGen — On-Device Image Generation

Qualcomm Megathon 2025··Team MEGALODON

Stable Diffusion running entirely on an Android phone — no cloud, no network, accelerated on the Snapdragon NPU.

SnapGen — On-Device Image Generation
1st
Result
₹75,000
Prize
2025
Year
Outcome

1st place at the Qualcomm Megathon — a fully offline generative image app that runs Stable Diffusion on-device with zero cloud egress.

The problem

Generative image models almost always live in the cloud: you send a prompt to a server, a GPU does the work, and an image comes back. That means latency, cost, a hard dependency on connectivity, and your prompts leaving the device. The Megathon challenge was to push real generative AI onto the phone itself and make it usable.

What we built

SnapGen — a native Android app that runs Stable Diffusion entirely on-device, with zero cloud dependency:

  • Inference engine: NPU acceleration on the Qualcomm Hexagon processor via the QNN SDK, with a native C++ layer (CMake) targeting ARM64-v8a Snapdragon devices.
  • Models: support for multiple Stable Diffusion variants (Anything V5, Absolute Reality, and more), plus a conversion + quantization toolkit to bring custom SafeTensors models into the NPU-optimized format.
  • App: Kotlin + Jetpack Compose, Material 3, with voice-to-text prompt input, background generation, and dark/light themes.

The whole pipeline — prompt to pixels — happens locally: no internet, no tracking, no egress. The build extends the open-source Local Dream project (CC BY-NC), adapting its NPU acceleration and model handling for the hackathon.

Result

1st place. A judged demonstration that a phone, with the right inference engine and NPU offload, can do what most people assume needs a datacenter — generate images on demand, offline.

What I learned

  • On-device ML is an engineering problem, not just a model problem. The win came from quantization, memory budgeting, and NPU offload — not from a bigger network.
  • MNN + NPU beat naive CPU inference by a wide enough margin to make the experience feel real-time rather than a science project.
  • Privacy is a feature. "Your prompts never leave the device" landed with judges as strongly as the raw speed.
Gallery

Scroll sideways · click any photo to enlarge