BonsaiNativeBridge
Thin Kotlin boundary around the Android Bonsai native library.
The bridge centralizes library loading, model probing, generation, progress callbacks, and cancellation so the rest of the feature never calls JNI entry points directly.
Types
Link copied to clipboard
interface ProgressCallback
JNI callback used by the native runtime to report completed diffusion steps.
Functions
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
private external fun generateModel(rootPath: String, packedTransformerPath: String, textEncoderPath: String, tokenizerPath: String, vaePath: String, schedulerPath: String, prompt: String, negativePrompt: String, samplingSteps: Int, cfgScale: Float, width: Int, height: Int, seed: String, batchCount: Int, allowNsfw: Boolean, backend: String, callback: BonsaiNativeBridge.ProgressCallback): String
Link copied to clipboard
Link copied to clipboard