Binary
The pre-built APK file can be downloaded from here to experience the app on your Android phone without any hassle (uses a pre-deployed Modal.com backend).
To build the app from source, read the rest of this document.
Prerequisites
- Flutter SDK >=3.7
- Python 3.8
- Gradle 8.9.1
- Java/JDK 17 & Kotlin
- Android SDK & NDK
- Platform Level >=34
- Build Tools >=34.0.0
- NDK Version 27.0.12077973
- CMake 3.22.1
Ensure that all these programs with the correct versions are installed on your system before using this repository
Note
For Nix users, a Flake for the development shell is provided
Setup
1. Download Models
Download all the models from here and place them inside the assets directory
2. Setup Python
The Android app compiles Python code using Chaquopy, which requires the following setup, mandatorily using Python Version 3.8:
A) Install Python 3.8
Download from python.org
B) Set up Virtual Environment
python -m venv python_env
3. Create .env
Create the .env file in the root directory containing the following:
URL_ASSET=<Background Removal Backend Endpoint>
URL_DESCRIBE=<Florence-v2 Description Backend Endpoint>
URL_GENERATE=<Stable Diffusion Image Generation Backend Endpoint>
URL_INPAINTING=<Stable Diffusion Inpainting Backend Endpoint>
URL_INPAINTING_API=<Fal.ai Inpainting Backend Endpoint>
URL_SKETCH_API=<Sketch to Image Backend Endpoint>
SHARED_SECRET_KEY=<Base64 Security Key>
4. Build the application APK
flutter clean
flutter pub get
flutter build apk
If you have adb properly installed, you can use flutter run
Backend
Read flask/README.md to run the server