AndroidCraft — on-device generative AI studio (chat, image, voice, video) + CI/CD APK - #1
Merged
Merged
Conversation
- Token is now fully optional: sent only when provided, so ungated models
download with no Hugging Face login.
- Add-model-by-URL: users can add any direct LiteRT .task chat model from the
Models screen; custom models persist on-device and appear across the app.
- Downloadable/shareable outputs:
- Image: save to gallery + share (MediaStore).
- Voice: save WAV to Music + share.
- Video: encode a real H.264 MP4 on-device (MediaCodec + MediaMuxer),
save to Movies + share.
- Reactive model list in ModelRepository so custom models update the UI live.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01PQL2UkPX1shJkQqSBrV8A7
- New ImageGenerator abstraction with selectable on-device backends: Procedural (instant), stable-diffusion.cpp (native), ONNX Runtime. - Image screen gains a method picker, per-method availability hints, a sampling-steps slider, and diffusion progress. - Diffusion engines are structured and report readiness; procedural works now, with the native and ONNX engines wired in follow-up commits. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQL2UkPX1shJkQqSBrV8A7
- Add stable-diffusion.cpp as a submodule + JNI bridge (sdjni) building the core diffusion library for arm64 via CMake/NDK. The full pipeline (tokenizer, scheduler, UNet, VAE) runs in C++, fully offline. - NativeDiffusionGenerator now calls the native txt2img and is available once a Stable Diffusion .gguf/.safetensors model is downloaded. - Catalog: add downloadable Stable Diffusion 1.5 weights; Add-by-URL can now target image (SD) models too. - CI installs the NDK + CMake and initialises the native submodules. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQL2UkPX1shJkQqSBrV8A7
…odels Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQL2UkPX1shJkQqSBrV8A7
- OnnxDiffusionGenerator: full SD 1.5 pipeline on ONNX Runtime (CLIP text encoder + UNet with classifier-free guidance + VAE decoder), fully offline. - ClipTokenizer (byte-level BPE) and a deterministic DDIM scheduler in Kotlin. - ModelRepository gains .zip archive download + extraction for multi-file bundles; catalog adds the SD 1.5 ONNX bundle. - Adds the onnxruntime-android dependency (arm64). Both diffusion engines (native SD.cpp and ONNX) are now selectable in the Image tab, each activating once its model is downloaded. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQL2UkPX1shJkQqSBrV8A7
- Replace manual URL entry + Hugging Face token flow with a curated catalog of vetted, ungated, direct-download models (verified against Google's AI Edge Gallery allowlist and single-file GGUF repos). - Chat: Gemma 3 1B (int4) + Qwen 2.5 1.5B (int8), no account required. - Image: Stable Diffusion 1.5 Q8 GGUF (single-file) for the native engine — one tap to download and run. - Models screen sorts each category by device-RAM fit and badges the best pick "Best for your device"; removes the token card and add-by-URL dialog. - Image picker hides the ONNX engine unless its bundle is present; native engine picks the most recently downloaded model. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01PQL2UkPX1shJkQqSBrV8A7
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What this is
AndroidCraft — a fully on-device generative AI app for Android (Kotlin, Jetpack Compose, MVVM). Chat, generate images, synthesize speech, and make short video clips — all running locally on the phone, with models you download in-app. Every APK is built in CI, never on a device or laptop.
Features
.task)Every generated image, voice clip, and video can be saved (gallery / Music / Movies) and shared.
Curated models — zero manual setup
The Models screen offers only vetted, ungated, direct-download models — no account, no Hugging Face token, no links to find, no manual URL entry. They're matched to the device's reported RAM so the user doesn't have to guess what fits.
Real on-device diffusion
app/src/main/cppand compiled for arm64 via NDK/CMake;sdjni.cppis a thin JNI bridge. The whole pipeline (tokenizer, scheduler, UNet, VAE) runs in C++.onnxruntime-android.CI/CD
.github/workflows/android-build.yml— on every build-affecting commit: inits native submodules, sets up JDK 17 + Android SDK + NDK 27 / CMake, runs unit tests, compiles the native library, assembles the debug APK, and uploads it as theandroidcraft-debug-apkartifact..github/workflows/release.yml— on av*tag, builds and publishes a GitHub Release with the APK (auto-signs if keystore secrets are set).Notes / honest caveats
--recurse-submodulesfor local builds.🤖 Generated with Claude Code
Generated by Claude Code