Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
1696cac
feat(domain): add ADetailer, HiresConfig, ModelType, Scheduler, Aspec…
crim50n Dec 29, 2025
30dd4d3
refactor(data): migrate media storage from Base64 to file-based storage
crim50n Dec 29, 2025
89cf7cb
feat(a1111): add Forge modules, ADetailer, Hires.Fix and generation f…
crim50n Dec 29, 2025
9ebbe97
feat(ui): improve ZoomableImage, InPaint zoom/pan, Gallery navigation…
crim50n Dec 29, 2025
509fae6
feat: add Fal.AI as new generation backend with FLUX models support
crim50n Dec 29, 2025
a8df743
Update translations
crim50n Dec 29, 2025
2c35864
test: add tests for Fal.AI, ForgeModules and fix existing tests
crim50n Dec 30, 2025
d777d34
feat: enable light status bar for AiSdCompose theme
crim50n Dec 30, 2025
c027b8f
fix: skip network requests for inactive server sources
crim50n Dec 30, 2025
127580e
feat: display model name in gallery details
crim50n Jan 1, 2026
373edf1
feat: add Qualcomm QNN backend for local diffusion with NPU acceleration
crim50n Jan 1, 2026
e9e65e9
docs: update README with QNN and fal.ai features
crim50n Jan 1, 2026
64ae49d
feat: update .gitignore to include QNN proprietary libraries and extr…
crim50n Jan 1, 2026
2ec511b
test: fix unit tests for QNN backend
crim50n Jan 1, 2026
3ce4749
Update CNAME
crim50n Jan 1, 2026
0835019
feat: rebrand SDAI to PDAI (Pocket Diffusion)
crim50n Jan 1, 2026
4df1706
docs: update website for PDAI rebrand
crim50n Jan 1, 2026
08bca0e
feat: redesign index and policy pages with improved layout and styling
crim50n Jan 1, 2026
ef3a323
refactor: rename SDAI to PDAI in code and paths
crim50n Jan 1, 2026
db36d33
Update dependencies and add version management plugins
crim50n Jan 1, 2026
92e0f84
feat: add Yandex.Metrika tracking to index and policy pages
crim50n Jan 1, 2026
38f91c4
feat: add GitHub Actions workflow for building release APKs
crim50n Jan 1, 2026
3e55659
feat: add GitHub release creation step and release notes for PDAI v0.7.0
crim50n Jan 2, 2026
1f3dc38
feat: QNN hires, gallery selection save, progress notifications, cust…
crim50n Jan 2, 2026
c5c0e12
test: add unit tests for uncovered classes
crim50n Jan 2, 2026
ff52679
feat: add Telegram button and QR code for download, update links in p…
crim50n Jan 2, 2026
58f791c
fix: correct unit test assertions and deprecation warnings
crim50n Jan 2, 2026
8424b1b
fix: remove OnBoardingViewModelTest due to complex ViewModel initiali…
crim50n Jan 2, 2026
d01ef07
fix: correct pre-existing test failures in MediaStoreGatewayFactoryTe…
crim50n Jan 2, 2026
96289bd
feat(storage): add database schema v11-v12, blurhash and thumbnail en…
crim50n Jan 6, 2026
3cca660
feat(domain): add gallery use cases and ThumbnailData entity
crim50n Jan 6, 2026
9a7c346
feat(imageprocessing): add ThumbnailGenerator, blurhash and cache sup…
crim50n Jan 6, 2026
55826b3
feat(data): update repositories and data sources
crim50n Jan 6, 2026
27cd2b4
feat(presentation): enhance gallery with selection, editor and shared…
crim50n Jan 6, 2026
3d77a9f
feat(core): update notification icons, localization and network
crim50n Jan 6, 2026
d52b790
feat(localization): add new strings for share, edit, and gallery feat…
crim50n Jan 6, 2026
b783241
add vector icons
crim50n Jan 6, 2026
c835f2e
feat(release): add release notes for v0.7.1
crim50n Jan 6, 2026
e43b464
feat: gallery toggle actions, onboarding UI fixes, inpaint overlay
crim50n Jan 7, 2026
cf2a198
test: fix compilation errors in repository and viewmodel tests
crim50n Jan 7, 2026
91a62d2
test: add unlike/unhide use case tests and repository tests
crim50n Jan 7, 2026
5dc3f84
feat: add MNN model configurations
crim50n Jan 9, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -1 +1 @@
@ShiftHackZ
@crim50n
12 changes: 1 addition & 11 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1 @@
github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: # Replace with a single Patreon username
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: ['https://www.buymeacoffee.com/shifthackz', 'https://send.monobank.ua/jar/3n2Aj3Hv3g']
# Funding links removed
89 changes: 89 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
name: Build Release APKs

on:
workflow_dispatch:

jobs:
build-release:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v4.1.0

- name: Extract version from libs.versions.toml
id: version
run: |
VERSION=$(grep 'versionName = ' gradle/libs.versions.toml | sed 's/versionName = "\(.*\)"/\1/')
VERSION_CODE=$(grep 'versionCode = ' gradle/libs.versions.toml | sed 's/versionCode = "\(.*\)"/\1/')
echo "name=$VERSION" >> $GITHUB_OUTPUT
echo "code=$VERSION_CODE" >> $GITHUB_OUTPUT
echo "Building version: $VERSION (code: $VERSION_CODE)"

- name: Set up JDK 17
uses: actions/setup-java@v3.13.0
with:
distribution: 'adopt'
java-version: '17'

- name: Grant execute permissions for gradlew
run: chmod +x ./gradlew

- name: Prepare QNN libraries
run: ./scripts/prepare_qnn_libs.sh

- name: Decode Keystore
env:
KEYSTORE_BASE64: ${{ secrets.KEYSTORE_BASE64 }}
if: ${{ env.KEYSTORE_BASE64 != '' }}
run: |
mkdir -p app/keystore
echo "${{ secrets.KEYSTORE_BASE64 }}" | base64 -d > app/keystore/release.keystore
echo "keystore=keystore/release.keystore" > app/keystore/signing.properties
echo "keystore.alias=${{ secrets.KEYSTORE_ALIAS }}" >> app/keystore/signing.properties
echo "keystore.password=${{ secrets.KEYSTORE_PASSWORD }}" >> app/keystore/signing.properties

- name: Build Full Release APK
run: ./gradlew :app:assembleFullRelease

- name: Build FOSS Release APK
run: ./gradlew :app:assembleFossRelease

- name: Rename APKs
run: |
VERSION="${{ steps.version.outputs.name }}"
mkdir -p release-apks

# Full Release
if [ -f app/build/outputs/apk/full/release/app-full-release.apk ]; then
cp app/build/outputs/apk/full/release/app-full-release.apk release-apks/pdai-full-release-${VERSION}.apk
fi

# FOSS Release
if [ -f app/build/outputs/apk/foss/release/app-foss-release.apk ]; then
cp app/build/outputs/apk/foss/release/app-foss-release.apk release-apks/pdai-foss-release-${VERSION}.apk
fi

- name: Upload Release APKs
uses: actions/upload-artifact@v4
with:
name: pdai-release-${{ steps.version.outputs.name }}
path: release-apks/*.apk
retention-days: 90

- name: Create GitHub Release
env:
GH_TOKEN: ${{ github.token }}
run: |
VERSION="${{ steps.version.outputs.name }}"
TAG="v${VERSION}"

# Create tag if it doesn't exist
git tag $TAG || true
git push origin $TAG || true

# Create release with release notes
gh release create $TAG \
--title "${VERSION}" \
--notes-file RELEASE_NOTES_${VERSION}.md \
release-apks/*.apk
19 changes: 19 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -137,3 +137,22 @@ jacoco.exec
# Fastlane
fastlane/report.xml
.kotlin

# QNN proprietary libraries (must be downloaded separately)
feature/qnn/src/main/jniLibs/
feature/qnn/src/main/assets/qnnlibs/*.so
feature/qnn/src/main/assets/cvtbase/*.mnn
feature/qnn/src/main/assets/cvtbase/*.json
!feature/qnn/src/main/jniLibs/arm64-v8a/.gitkeep
!feature/qnn/src/main/assets/qnnlibs/.gitkeep
!feature/qnn/src/main/assets/cvtbase/.gitkeep

# QNN extracted files
LocalDream.apk
qnn-extracted/

# Platform tools
platform-tools/

# Debug keystore
debug.keystore
92 changes: 64 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,10 @@
![Header](docs/assets/github-header-image.png)
![Header](docs/assets/tlogo_256.png)

# Stable-Diffusion-Android (SDAI)
# Pocket Diffusion Android (PDAI)

![Google Play](https://img.shields.io/endpoint?color=blue&logo=google-play&logoColor=white&url=https%3A%2F%2Fplay.cuzi.workers.dev%2Fplay%3Fi%3Dcom.shifthackz.aisdv1.app%26l%3DGoogle%2520Play%26m%3D%24version)
![F-Droid](https://img.shields.io/badge/dynamic/json?url=https%3A%2F%2Ff-droid.org%2Fapi%2Fv1%2Fpackages%2Fcom.shifthackz.aisdv1.app.foss&query=%24.packages%5B0%5D.versionName&label=F-Droid&link=https%3A%2F%2Ff-droid.org%2Fpackages%2Fcom.shifthackz.aisdv1.app.foss%2F)
[![GitHub](https://img.shields.io/github/v/release/crim50n/Pocket-Diffusion-Android?label=GitHub)](https://github.com/crim50n/Pocket-Diffusion-Android/releases)


[![Google Play](docs/assets/google_play.png)](https://play.google.com/store/apps/details?id=com.shifthackz.aisdv1.app)
[![F-Droid](docs/assets/fdroid.png)](https://f-droid.org/packages/com.shifthackz.aisdv1.app.foss)
[![4pda](docs/assets/4pda.png)](https://4pda.to/forum/index.php?showtopic=1082639)

Stable Diffusion AI (SDAI) is an easy-to-use app that:
Pocket Diffusion (PDAI) is an easy-to-use app that:

- Brings you the power of digital art creativity with Stable Diffusion AI
- Gives you freedom to choose your AI generation provider
Expand All @@ -29,7 +23,11 @@ Stable Diffusion AI (SDAI) is an easy-to-use app that:
- Can use server environment powered by [Hugging Face Inference API](https://huggingface.co/docs/api-inference/quicktour).
- Can use server environment powered by [OpenAI](https://platform.openai.com/docs/api-reference/images) (DALL-E-2, DALL-E-3).
- Can use server environment powered by [Stability AI](https://platform.stability.ai/).
- Can use server environment powered by [Fal.AI](https://fal.ai/).
- Can use local environment powered by LocalDiffusion (Beta)
- Microsoft ONNX Runtime (txt2img)
- Google AI MediaPipe (txt2img)
- Qualcomm QNN with NPU acceleration (txt2img, img2img)
- Supports original Txt2Img, Img2Img modes
- **Positive** and **negative** prompt support
- Support dynamic **size** in range from 64 to 2048 px (for width and height)
Expand All @@ -52,17 +50,23 @@ Stable Diffusion AI (SDAI) is an easy-to-use app that:
- Textual inversion picker (for A1111)
- Hypernetworks picker (for A1111)
- SD Model picker (for A1111)
- Forge Modules support (for A1111/Forge)
- ADetailer (After Detailer) support for enhanced face/hand/body fixing (for A1111/Forge)
- Hires.Fix support for high-resolution upscaling (for A1111/Forge)
- In-app Gallery, stored locally, contains all AI generated images
- Displays generated images grid
- Image detail view: Zoom, Pinch, Generation Info.
- Displays generated images grid with pagination
- Image detail view: Advanced zoom/pan controls, Pinch-to-zoom, Generation Info
- Navigation between images with swipe gestures
- InPaint editor with zoom/pan support for precise mask drawing
- Export all gallery to **.zip** file
- Export single photo to **.zip** file
- Settings
- WebUI server URL
- Active SD Model selection
- Server availability monitoring (http-ping method)
- Enable/Disable auto-saving of generated images
- Enable/Disable saving generated images to `Download/SDAI` android MediaStore folder
- Enable/Disable saving generated images to `Download/PDAI` android MediaStore folder
- Optimized file-based media storage (faster loading and reduced memory usage)
- Clear gallery / app cache

## Setup instruction
Expand All @@ -71,7 +75,7 @@ Stable Diffusion AI (SDAI) is an easy-to-use app that:

This requires you to have the AUTOMATIC1111 WebUI that is running in server mode.

You can have it running either on your own hardware with modern GPU from Nvidia or AMD, or running it using Google Colab.
You can have it running either on your own hardware with modern GPU from Nvidia or AMD, or running it using Google Colab.

1. Follow the setup instructions on [Stable-Diffusion-WebUI](https://github.com/AUTOMATIC1111/stable-diffusion-webui) repository.
2. Add the arguments `--api --listen` to the command line arguments of WebUI launch script.
Expand All @@ -90,7 +94,7 @@ Please refer to the [SwarmUI documentation](https://github.com/mcmonkeyprojects/

### Option 3: Use AI Horde

[AI Horde](https://stablehorde.net/) is a crowdsourced distributed cluster of Image generation workers and text generation workers.
[AI Horde](https://stablehorde.net/) is a crowdsourced distributed cluster of Image generation workers and text generation workers.

AI Horde requires to use API KEY, this mobile app allows to use either default API KEY (which is "0000000000"), or type your own. You can sign up and get your own AI Horde API KEY [here](https://stablehorde.net/register).

Expand All @@ -102,7 +106,7 @@ Hugging Face Inference requires to use API KEY, which can be created in [Hugging

### Option 5: OpenAI

OpenAI provides a service for text to image generation using [DALLE-2](https://openai.com/dall-e-2) or [DALLE-3](https://openai.com/dall-e-3) models. This service is paid.
OpenAI provides a service for text to image generation using [DALLE-2](https://openai.com/dall-e-2) or [DALLE-3](https://openai.com/dall-e-3) models. This service is paid.

OpenAI requires to use API KEY, which can be created in [OpenAI API Key settings](https://platform.openai.com/api-keys).

Expand All @@ -112,19 +116,55 @@ OpenAI requires to use API KEY, which can be created in [OpenAI API Key settings

StabilityAI requires to use API KEY, which can be created in [API Keys page](https://platform.stability.ai/account/keys).

### Option 7: Local Diffusion Microsoft ONNX Runtime (Beta)
### Option 7: Fal.AI

[Fal.AI](https://fal.ai/) is a modern AI generation service with support for latest FLUX models family.

**Built-in models:**
- FLUX.1-dev (high quality, slower)
- FLUX.1-schnell (fast generation)
- FLUX-LoRA (custom LoRA support)
- FLUX-2 (latest generation)
- FLUX-Kontext (context-aware generation)

**Features:**
- Import OpenAPI.json from fal.ai to add new models
- Dynamic form generation based on model parameters
- Support for custom endpoints

Fal.AI requires to use API KEY, which can be created in [Fal.AI dashboard](https://fal.ai/dashboard/keys).

### Option 8: Local Diffusion Microsoft ONNX Runtime (Beta)

Only **txt2img** mode is supported.

Allows to use phone resources to generate images.
Allows to use phone resources to generate images using Microsoft ONNX Runtime.

### Option 8: Local Diffusion Google AI MediaPipe (Beta)
### Option 9: Local Diffusion Google AI MediaPipe (Beta)

Available only in **playstore** and **full** flavors.

Only **txt2img** mode is supported.

Allows to use phone resources to generate images.
Allows to use phone resources to generate images using Google MediaPipe framework.

### Option 10: Local Diffusion Qualcomm QNN (Beta)

Available only in **playstore** and **full** flavors.

Supports both **txt2img** and **img2img** modes.

Uses Qualcomm QNN SDK with NPU acceleration (HTP) and MNN backend for fast on-device Stable Diffusion generation.

**Requirements:**
- Snapdragon 8 Gen 1 or newer chipset
- Supports both NPU-accelerated models (8Gen1, 8Gen2/3/4) and CPU/MNN models

**Features:**
- Hardware NPU acceleration for faster generation
- Multiple pre-built models available for download
- Support for custom models (scan local folders)
- Lower power consumption compared to CPU-only backends

## Supported languages

Expand All @@ -144,14 +184,10 @@ Any contributions to the translations are welcome.

## Difference between build flavors (Google Play, F-Droid, GitHub releases)

There are some reasons that some of the SDAI app features can not be distributed through different sources (Google Play, F-Droid) because of rules and compliance policies.

The difference between SDAI app flavors are described at the project wiki page [Build flavor difference](https://github.com/ShiftHackZ/Stable-Diffusion-Android/wiki/Build-flavor-difference).

## Donate
There are some reasons that some of the PDAI app features can not be distributed through different sources (Google Play, F-Droid) because of rules and compliance policies.

This software is open source, provided with no warranty, and you are welcome to use it for free.
The difference between PDAI app flavors are described at the project wiki page [Build flavor difference](https://github.com/crim50n/Pocket-Diffusion-Android/wiki/Build-flavor-difference).

In case you find this software valuable, and you'd like to say thanks and show a little support, here is the button:
## Credits

[!["Buy Me A Coffee"](https://www.buymeacoffee.com/assets/img/custom_images/orange_img.png)](https://www.buymeacoffee.com/shifthackz)
This project is a fork of [Stable Diffusion Android](https://github.com/ShiftHackZ/Stable-Diffusion-Android) by [ShiftHackZ](https://github.com/ShiftHackZ), licensed under GNU AGPL v3.0.
Loading