mediapipe
mediapipe copied to clipboard
App Crash wile using the Image Generation Sample on android
I am using the image generation sample and tried running on my android device
Below is the error
FATAL EXCEPTION: DefaultDispatcher-worker-1
Process: com.google.mediapipe.examples.imagegeneration, PID: 29768
java.lang.UnsatisfiedLinkError: dlopen failed: library "libmediapipe_tasks_vision_image_generator_jni.so" not found
at java.lang.Runtime.loadLibrary0(Runtime.java:1082)
at java.lang.Runtime.loadLibrary0(Runtime.java:1003)
at java.lang.System.loadLibrary(System.java:1661)
at com.google.mediapipe.tasks.vision.imagegenerator.ImageGenerator.<clinit>(ImageGenerator.java:84)
at com.google.mediapipe.examples.imagegeneration.ImageGenerationHelper.initializeImageGenerator(ImageGenerationHelper.kt:32)
at com.google.mediapipe.examples.imagegeneration.diffusion.DiffusionViewModel$initializeImageGenerator$3.invokeSuspend(DiffusionViewModel.kt:66)
at kotlin.coroutines.jvm.internal.BaseContinuationImpl.resumeWith(ContinuationImpl.kt:33)
at kotlinx.coroutines.DispatchedTask.run(DispatchedTask.kt:106)
at kotlinx.coroutines.scheduling.CoroutineScheduler.runSafely(CoroutineScheduler.kt:570)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.executeTask(CoroutineScheduler.kt:750)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.runWorker(CoroutineScheduler.kt:677)
at kotlinx.coroutines.scheduling.CoroutineScheduler$Worker.run(CoroutineScheduler.kt:664)
Suppressed: kotlinx.coroutines.DiagnosticCoroutineContextException: [StandaloneCoroutine{Cancelling}@441c5cb, Dispatchers.Default]
I have all the required models in my assets folder. check below screenshot
I downloaded runwayml/stable-diffusion-v1-5 from here
I did installed required python dependencies
pip install torch typing_extensions numpy Pillow requests pytorch_lightning absl-py
I ran this python script as well using python3 convert.py --ckpt_path <ckpt_path> --output_path <output_path>
and generate all the required files and copied all those generated files using adb
Check below screenshot of the same
Once I installed the app from the sample and click StandAlone Generation button and as soon as I click Initialise button I get above error
Same thing happens when I click Generation with Plugins & Generation with Lora weights
I am using Android 12 on Samsung M01 device
What am I missing?