ArtFlow is a production-grade, 100% offline, on-device neural art studio for Android. It transforms ordinary photos into fine art paintings, anime drawings, and graphic illustrations using hardware-accelerated deep neural networks running directly on the device's GPU—with zero cloud dependencies, zero telemetry, and zero network calls.
👉 Download the Latest Standalone APK (v1.0.3)
- 50 Neural Art Styles: Curated collection spanning Fine Art (18 styles), Anime (16 styles), and Graphic Design (16 styles).
-
Authentic Neural Palettes & Tailored Graphic Grading: Pre-trained neural networks (AnimeGANv2 and TransformerNet) render with their authentic color balance and pristine skin tones, while Graphic print styles (Warhol posterization, Cyanotype, Manga screentone, Swiss typography) feature tailored fast fixed-point (
shr 8) palette transformations. -
Hero Neural Architectures:
-
Johnson et al. Fast-Neural-Style (
TransformerNet) with residual blocks and instance normalization. -
Official AnimeGANv2 (
AnimeGANGenerator) with inverted residual blocks, depthwise convolutions, and bilateral upsamplers.
-
Johnson et al. Fast-Neural-Style (
-
1024px High-Fidelity Studio Canvas: Standard 3:4 portrait photos render at
$768\times 1024\text{px}$ ($4\times$ the resolution of standard$512\text{px}$ models), preserving crisp brushstroke textures, fine cel lines, and canvas grain. -
Pure 1:1 WYSIWYG Export: Directly exports the exact on-screen composite preview to
Pictures/ArtFlowat 100% lossless JPEG quality in$<15\text{ms}$ with full EXIF metadata and zero alteration. - Selfie Segmentation & Subject Protection: Real-time on-device portrait isolation running with edge-guarded subject preservation and tailored aesthetic color grading.
-
Universal Multi-Vendor Hardware Acceleration (
DeviceHardwareProfile):- Bypassed TFLite CompatibilityList Whitelist: Replaced legacy static device whitelisting with direct runtime driver probing, unlocking native GPU execution on chips released after 2023 (MediaTek Dimensity 7300/8300/9300, Snapdragon 8 Gen 3/8 Elite, Tensor G4/G5).
- Eliminated Deprecated NNAPI Software Trap: Bypasses the single-threaded CPU software emulation trap, falling straight into tuned 4-thread SIMD XNNPACK CPU execution if GPU drivers are unavailable.
-
Qualcomm Snapdragon (8 Elite, 8 Gen 1–3, 7/6 series): Native OpenCL FP16 with persistent Adreno disk shader binary caching (
codeCacheDir), eliminating driver lockups and recompilation latency. -
Google Pixel Tensor Processors (G1–G5 / Pixel 6–9 Pro Fold): Native OpenCL acceleration enabled via
<uses-native-library>manifest linker permissions and disk shader binary serialization (clGetProgramInfo), with automatic fallback to OpenGL ES 3.1 Compute and multi-threaded CPU. - MediaTek Dimensity & Helio (Dimensity 700–9400): Resilient OpenCL FP16 with ARM Mali / Immortalis disk shader caching and OpenGL compute fallback.
- Samsung Exynos (ARM Mali & AMD RDNA Xclipse 530/920/940): Multi-backend resilience across mobile GPU architectures with disk shader caching.
- Universal CPU Fallback (Unisoc & Generic): Dynamically tuned XNNPACK multi-threading sized to performance cores (4 threads for tri-cluster architectures), keeping UI threads fluid.
-
Zero-Allocation Pipeline: Pre-allocated pinned native direct buffers and 8-bit fixed-point integer math (
shr 8), completely eliminating Large Object Space (LOS) garbage collection pauses. - Modern Jetpack Compose UI: Edge-to-edge Material 3 dark theme, 120Hz smooth scrolling carousel, interactive pinch-to-zoom/pan canvas with crossfade transitions, and balanced dual intensity/subject isolation sliders.
flowchart TD
subgraph InputStage ["1. Studio Canvas Input"]
A["Camera / Gallery Image"] --> B["ImageNormalizer: 1024px Baseline + Border-Clamped Padding"]
end
subgraph HardwareStage ["2. Adaptive Hardware Orchestration (DeviceHardwareProfile)"]
B --> C["ModelLruCache: 2-Slot GPU LRU"]
C --> D{"Vendor / Hardware Detection"}
D -->|"Qualcomm / MediaTek / Google Tensor / Exynos"| E["Tier 1: Direct OpenCL FP16 Probe + Disk Shader Cache"]
D -->|"Restricted Drivers / Fallback"| F["Tier 2: OpenGL ES 3.1 Compute Shaders"]
D -->|"Direct CPU Fallback (Bypassing NNAPI Trap)"| H["Tier 3: Tuned Multi-Thread SIMD XNNPACK"]
end
subgraph StudioEngine ["3. Zero-Allocation Studio Engine"]
E & F & H --> I["StyleTransferEngine: Static 1024x1024 Tensor Canvas"]
B --> J["PortraitSegmenter: MediaPipe Selfie Segmenter (CPU Thread)"]
J --> K["MaskProcessor: 2D Spatial Bicubic Rescale"]
I --> L["StylePostProcessor: Tailored Aesthetic Color Grading"]
L --> M["Compositor: Fast Fixed-Point Integer Alpha Blending"]
K --> M
M --> N["ViewportCanvas: CrossfadeLayer & Pinch-Zoom"]
end
subgraph ExportStage ["4. Pure 1:1 WYSIWYG Export (<15ms)"]
M --> O["MediaStoreWriter: Exact 1024px Bitmap at 100% Quality"]
O --> P["Gallery: Pictures/ArtFlow + EXIF Metadata"]
end
ArtFlow bundles 52 optimized neural network models directly in the APK:
Based on Johnson et al. Fast-Neural-Style TransformerNet architecture:
starry_night— Vincent van Goghthe_scream— Edvard Munchgreat_wave— Hokusaiguernica— Pablo Picassomonet_water_lilies— Claude Monetkandinsky_composition— Wassily Kandinskyklimt_the_kiss— Gustav Klimtvan_gogh_sunflowers— Vincent van Goghcezanne_mont_sainte_victoire— Paul Cézanneturner_rain_steam_speed— J.M.W. Turnerhokusai_red_fuji— Hokusaidegas_ballet— Edgar Degasrenoir_boating_party— Pierre-Auguste Renoirmunch_madonna— Edvard Munchpicasso_weeping_woman— Pablo Picassomatisse_dance— Henri Matissegauguin_tahitian_women— Paul Gauguinseurat_la_grande_jatte— Georges Seurat
Based on Bryan D. Lee / TachibanaYoshino AnimeGANv2 AnimeGANGenerator architecture:
shinkai_sky— Makoto Shinkai aestheticghibli_pastoral— Studio Ghibli lush greens and soft tonescyberpunk_neo_tokyo— High-contrast neon anime lookretro_80s_anime— Hand-cel aesthetic of classic 80s OVAkyoto_bloom— Vibrant pastel floral tonesmanga_ink_wash— High-contrast screentone and ink washufotable_digital— Modern composited digital lightingchibi_pastel— Soft cartoon palettemecha_cel_shade— Crisp mechanical edges and metallic sheenlofi_chill— Muted nostalgic tonesfantasy_isekai— Luminous fantasy sceneryshoujo_sparkle— Romantic watercolor aestheticdark_fantasy_berserk— Grim heavy shadowsvaporwave_sunset— 80s anime synth palettecity_pop_1984— Tokyo retro-pop stylingtrigger_action— Dynamic saturated action styling
- 16 Graphic Styles:
bauhaus_geometry,pop_art_warhol,risograph_print,synthwave_neon,comic_halftone,swiss_typographic,art_deco_gold,cyber_glitch,blueprint_cyanotype,vector_flat,stencil_street_art,linocut_print,psychedelic_60s,holographic_iridescent,charcoal_sketch,woodblock_ukiyoe. - 2 Vision Models:
vision/fsrcnn_x2_fp16.tflite— Secondary vision model asset.vision/selfie_segmenter.tflite— On-device portrait segmenter.
ArtFlow contains a dedicated hardware abstraction layer (DeviceHardwareProfile.kt) engineered to maximize inference throughput across all Android processors:
| Vendor / SoC Family | GPU Architecture | Acceleration Strategy |
|---|---|---|
| Qualcomm Snapdragon (8 Elite, 8 Gen 1/2/3, 7/6 series) | Adreno 6xx / 7xx / 8xx |
Tier 1 (OpenCL FP16) with persistent disk shader caching in codeCacheDir. |
| Google Tensor (Pixel 6, 7, 8, 9 Pro Fold - G1 to G5) | ARM Mali-G78 / G710 / G715 Immortalis |
Tier 1 (OpenCL FP16 + Disk Shader Cache) via manifest <uses-native-library> |
| MediaTek Dimensity / Helio (700–9400, Helio G99) | ARM Mali / Immortalis |
Tier 1 (OpenCL FP16 + Disk Cache) |
| Samsung Exynos (1480, 2100, 2200, 2400) | ARM Mali & AMD RDNA Xclipse |
Tier 1 (OpenCL FP16 + Disk Cache) |
| Entry-Level / Generic (Unisoc, etc.) | Generic / CPU |
Tier 3 (NNAPI) |
Exporting an artwork bypasses secondary resizing and distortion pipelines:
- Instant Save (<15ms): Grabs the exact on-screen composite bitmap and writes it directly to
MediaStore. - 100% Lossless JPEG Quality: Preserves every brushstroke, fine cel line, and color gradient without compression artifacts.
- EXIF Tagging: Directly injects artist title, style preset name, and software metadata into local gallery storage.
artflow-android/
├── app/
│ ├── src/
│ │ ├── main/
│ │ │ ├── assets/models/ # 52 FP16 TFLite models (1024x1024 static)
│ │ │ │ ├── fine_art/ # 18 Fast-Neural-Style models
│ │ │ │ ├── anime/ # 16 AnimeGANv2 models
│ │ │ │ ├── graphic/ # 16 Graphic models
│ │ │ │ └── vision/ # Vision & Selfie Segmenter models
│ │ │ ├── java/com/artflow/app/
│ │ │ │ ├── core/
│ │ │ │ │ ├── common/ # Result, DispatcherProvider
│ │ │ │ │ └── storage/ # AssetModelReader, MediaStoreWriter (1:1 WYSIWYG)
│ │ │ │ ├── engine/ # Inference Engine
│ │ │ │ │ ├── hardware/ # DeviceHardwareProfile (SoC / Vendor Detection)
│ │ │ │ │ ├── GpuDelegateProvider.kt # 4-Tier Hardware Acceleration Delegate
│ │ │ │ │ ├── ModelLruCache.kt # 2-Slot GPU LRU Cache
│ │ │ │ │ ├── DynamicTensorHandler.kt # Zero-Allocation Direct Native Buffers
│ │ │ │ │ ├── StyleTransferEngine.kt # Core 1024px Inference Engine
│ │ │ │ │ ├── processing/ # ImageNormalizer, Compositor, StylePostProcessor
│ │ │ │ │ └── segmentation/ # PortraitSegmenter, MaskProcessor
│ │ │ │ ├── model/ # StyleCatalog (50 styles), Presets, EditorSettings
│ │ │ │ └── ui/ # Jetpack Compose UI
│ │ │ │ ├── editor/ # ViewModel, Canvas, Carousel, Sliders
│ │ │ │ ├── theme/ # Material 3 Dark Palette
│ │ │ │ └── MainActivity.kt # PhotoPicker, Permissions, Edge-to-Edge
│ │ │ └── AndroidManifest.xml
│ │ ├── test/ # JVM Unit Tests (Robolectric/JUnit)
│ │ └── androidTest/ # On-Device GPU Benchmarks
│ └── build.gradle.kts
├── tools/ # Offline Python ML Pipeline
│ ├── checkpoints/ # Raw PyTorch .pth & .pt weights
│ ├── models/
│ │ ├── transformer_net.py # Johnson et al. TransformerNet
│ │ └── animegan_generator.py # Official AnimeGANv2 Generator
│ ├── converters/
│ │ └── builder.py # 1024px TF Modules & FP16 Exporters
│ ├── download_hero_checkpoints.py # Automated Weight Downloader
│ ├── convert_all.py # 52-Model Batch Converter (1024x1024)
│ └── verify_tflite.py # Automated Numerical & NaN Verifier
├── gradle/libs.versions.toml # Version Catalog
├── build.gradle.kts # Root Gradle Script
└── settings.gradle.kts
- JDK: Eclipse Temurin or OpenJDK 17 (
JAVA_HOMEpointing to JDK 17). - Android SDK: Build-Tools
35.0.0or34.0.0, Platform API35, Platform-Tools. - Gradle: 8.10.2 (bundled wrapper
gradlew). - Python (Optional for Model Toolchain): Python 3.10 or 3.11 with PyTorch 2.x and TensorFlow 2.x.
./gradlew assembleDebugThe resulting debug APK is output to:
app/build/outputs/apk/debug/app-debug.apk
Execute the local unit test suite covering hardware detection, dimension normalization, and coroutine dispatching:
./gradlew testDebugUnitTestIf you want to re-download hero checkpoints and re-generate the 52 TFLite assets at 1024x1024:
# 1. Download official PyTorch and AnimeGANv2 checkpoints
python3 tools/download_hero_checkpoints.py
# 2. Batch convert all 52 models to FP16 TFLite
python3 tools/convert_all.py
# 3. Verify numerical bounds, shapes, and zero NaNs
python3 tools/verify_tflite.py- Bypassed TFLite CompatibilityList: Replaced legacy 2023 static JSON device whitelist with active runtime GPU driver probing. MediaTek Dimensity 7000/8000/9000 (Mali-G615/G715/G720), Snapdragon 8 Gen 3/Elite (Adreno 750/830), and Tensor G4/G5 now utilize full Tier 1 OpenCL acceleration.
- Eliminated NNAPI Fallback Trap: Removed deprecated NNAPI routing that silently fell back to single-threaded CPU reference emulation (dropping render times from 40s to ~1.2s on modern chips).
- Direct XNNPACK Fallback: Systems without compatible GPU drivers fall straight into multi-threaded SIMD XNNPACK CPU execution.
- Zero Allocations & Authentic Colors: Retained full 1024px tensor canvas, pinned memory buffers, and clean neural palettes.
- Natural Neural Balance: Restored authentic pre-trained color balance for Fine Art and Anime models, eliminating global RGB offsets to preserve natural skin tones, facial contours, and clean neutral whites.
- Tailored Graphic Print Grading: Dedicated fast fixed-point post-processing for Graphic styles requiring artificial palette re-mapping (Warhol 4-tone posterization, Cyanotype Prussian blue, Manga screentone S-curves, Swiss typography, and Synthwave/Glitch split-toning).
- Zero-Allocation Hot Path: Fast ITU-R BT.601 integer fixed-point math (
shr 8) and in-place buffer mutation executing in sub-25ms. - Comprehensive Unit Testing: Automated test coverage in
StylePostProcessorTestvalidating that all 50 styles execute cleanly, neural styles pass through untouched, and graphic styles apply verified palette transformations.
- Universal Hardware Optimization: Native OpenCL FP16 acceleration with persistent disk shader compilation cache for Qualcomm Snapdragon (8 Elite, 8 Gen 1–3), Google Pixel Tensor (G1–G5), MediaTek Dimensity, and Samsung Exynos.
-
1024px Studio Canvas: High-fidelity
$768\times 1024\text{px}$ rendering pipeline with edge-to-edge Material 3 dark studio UI. - Apache 2.0 Open Source Licensing: Clean open-source release with standalone APK distribution.
- 0 Remote APIs: ArtFlow contains zero network client libraries and makes zero HTTP requests.
- 0 Telemetry / Analytics: No tracking SDKs (no Firebase Analytics, no crash reporters, no tracking IDs).
- Local Storage Only: Photos selected via the system Photo Picker remain in app memory or are saved directly to local
MediaStore.
- AnimeGANv2: PyTorch port by Bryan D. Lee and original architecture by TachibanaYoshino.
- Fast-Neural-Style: Architecture and pretrained weights by Justin Johnson et al..
- FSRCNN: Fast Super-Resolution Convolutional Neural Network by Dong et al.
- MediaPipe: Selfie Segmentation by Google.
This project is licensed under the Apache License, Version 2.0 - see the LICENSE file for details. Model checkpoints are subject to their respective open-source licenses (MIT / Apache 2.0).




