Pangu-Immortal/MagicWX
Android 17 local LLM prototype with Jetpack Compose and ONNX Runtime for offline AI inference experiments.
What it solves
MagicWX provides a way to run large language models (LLMs) and image generation models entirely offline on Android devices. It eliminates the need for cloud APIs by integrating multiple local inference runtimes, allowing users to chat with AI and generate images without an internet connection.
How it works
The app is built with Kotlin and Jetpack Compose, utilizing a modular adapter system to support different AI runtimes:
- Text Generation: Uses ONNX Runtime, MediaPipe/LiteRT, and a built-in experience engine to run models like RWKV-7, Qwen, and SmolLM2.
- Image Generation: Employs a native MNN backend to run a Stable Diffusion 1.5 CPU pipeline, supporting text-to-image, image-to-image, and inpainting.
- Model Management: Includes a foreground service for background downloads of model weights and a validation system to ensure models are verified on real devices before being made available to the user.
Who it’s for
Android users and developers interested in local, private AI execution, as well as those testing the performance of small language models (SLMs) and diffusion models on mobile hardware.
Highlights
- Fully Offline: Supports local text chat and image generation.
- Multimodal Capabilities: Includes a complete image-generation workspace with mask painting, cropping, and history persistence.
- Diverse Runtime Support: Integrates ONNX, MediaPipe, LiteRT, and MNN.
- Strict Validation: Only exposes models that have passed device-specific validation tests (e.g., load tests and "hello" response checks).
Related
- Project
- Project
- Project
- Project
- Project