-
Notifications
You must be signed in to change notification settings - Fork 432
Local Diffusion - A Flutter wrapper of stable difussion cpp #570
-
Hello everyone,
I'm glad to introduce you to my side project, which I've been working on from time to time.
https://github.com/rmatif/Local-Diffusion
It’s a Flutter wrapper for Stable Diffusion (SD) CPP using FFI/JNI. Feel free to test it out! It’s in an early stage, so currently, only text-to-image inference works, and it's limited to SD 1.5, 2.1, and SDXL. There’s a debug APK in the release section for anyone who wants to test it and report benchmarks.
Here are my benchmarks on a Samsung A34 with 8GB of RAM:
SD 1.5/2.1: 6s/it for 256x256 | 32s/it for 512x512
SDXL: 90s/it for 512x512
All you need is a 4GB Android device. Quantization is supported. Feel free to contribute or share your results!
Right now, it’s not very usable, but I believe that with Vulkan backend implementation on high-end devices, it will become much more efficient. (I’ve already tested it with Vulkan backend, but the GGML implementation is broken on Adreno/Mali GPUs, so further work is needed.)
Beta Was this translation helpful? Give feedback.
All reactions
Replies: 1 comment 1 reply
-
Can you also do the same for react native 🙃?
Beta Was this translation helpful? Give feedback.
All reactions
-
Can you also do the same for react native 🙃?
Flutter with Dart FFI is a more suitable choice here, as it provides direct, zero-overhead bindings to native C/C++ code. While React Native could also work, it would require additional bridging layers and introduce JavaScript overhead, which could negatively impact performance
Beta Was this translation helpful? Give feedback.