ShiftHackZ / Stable-Diffusion-Android

Stable Diffusion AI client app for Android
https://sdai.moroz.cc
GNU Affero General Public License v3.0
651 stars 62 forks source link

Is there an official documentation for the Java code? #243

Open limin05030 opened 1 month ago

limin05030 commented 1 month ago

Hello, I am very interested in the kotlin code under the com.shifthackz.aisdv1.feature.diffusion.ai package (such as vae/VaeDoder.kt, unet/UNet.kt, etc.). Is there any official documentation for this part of the code that can be used as a reference?

If I want to add a new Scheduler, is there anything I can use as a reference?

ShiftHackZ commented 1 month ago

Hi, thanks for your interest in SDAI app.

The Local Diffusion functionality is still in the experimental stage, so the structure of the package or the interface methods/parameters contracts might change in the future. Because of that, the package does not have any documentation yet. Furthermore, you are the first person ever asking for the docs 😄.

But in general, current codebase is designed to try and replicate Stable Diffusion implementation with ONNX library (so it has similar components/packages with similar naming, like uNet, scheduler, etc).

If you are interested in implementing another Scheduler, and you have some understanding of how Stable Diffusion works, maybe some of this info might be helpful:

limin05030 commented 1 month ago

Hi, thanks for your interest in SDAI app.

The Local Diffusion functionality is still in the experimental stage, so the structure of the package or the interface methods/parameters contracts might change in the future. Because of that, the package does not have any documentation yet. Furthermore, you are the first person ever asking for the docs 😄.

But in general, current codebase is designed to try and replicate Stable Diffusion implementation with ONNX library (so it has similar components/packages with similar naming, like uNet, scheduler, etc).

If you are interested in implementing another Scheduler, and you have some understanding of how Stable Diffusion works, maybe some of this info might be helpful:

  • I like this article which describes theoretical principles of Stable Diffusion components, providing some basic code samples.
  • Schedulers package from diffusers python package (actually the python code implementation of Stable Diffusion schedulers).
  • ONNX Runtime documentation (the library that powers Local Diffusion AI generations).

Thank you very much for your answer. I am very interested in implementing SD on mobile devices and have been searching for relevant information. Thank you for providing the article, I will read it carefully. Looking forward to your follow-up updates.

sl33pyC01E commented 3 weeks ago

Please look into the mediapipe and qualcomm methods ;-;

I would also love more documentation

Local Diffusion in it's current state isn't very good..

I love the app though ;-;