Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Local Diffusion - A Flutter wrapper of stable difussion cpp #570

rmatif started this conversation in Show and tell
Discussion options

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.)

You must be logged in to vote

Replies: 1 comment 1 reply

Comment options

Can you also do the same for react native 🙃?

You must be logged in to vote
1 reply
Comment options

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet

AltStyle によって変換されたページ (->オリジナル) /