Closed Fcucgvhhhvjv closed 1 year ago
Hi @Fcucgvhhhvjv, would you mind linking me to the app that you're working with? I don't believe we've put out an official image generation sample for MediaPipe.
Thanks!
Hi, thank you for your reply , here is the link to the post https://developers.google.com/mediapipe/solutions/vision/image_generator , and the url to download the app https://storage.googleapis.com/mediapipe-tasks/image_generator/imagegenerator.apk
Oh interesting, I didn't realize we had put that out there yet :) I'll try running it this week to see if I can replicate the issue. Thanks!
alright , please use my models that i have posted on my hugging face repo , i ensure u that the conversion was done as the mentioned .
https://huggingface.co/Androidonnxfork/mediapipe2. Thank you
Hi, thank you for your reply , here is the link to the post https://developers.google.com/mediapipe/solutions/vision/image_generator , and the url to download the app https://storage.googleapis.com/mediapipe-tasks/image_generator/imagegenerator.apk
FYR, I converted the Runway v1.5 checkpoint listed in https://developers.google.com/mediapipe/solutions/vision/image_generator.
It works fine on a Motorola Edge 30 Pro (with Qualcomm 8 Gen 1 inside).
Hi, thank you for your reply , here is the link to the post https://developers.google.com/mediapipe/solutions/vision/image_generator , and the url to download the app https://storage.googleapis.com/mediapipe-tasks/image_generator/imagegenerator.apk
FYR, I converted the Runway v1.5 checkpoint listed in https://developers.google.com/mediapipe/solutions/vision/image_generator.
It works fine on a Motorola Edge 30 Pro (with Qualcomm 8 Gen 1 inside).
The listed model worked for me too , I tested 2 model from the list and it indeed did work, but other modeld didn't work which wasn't listed , i followed the instruction to find model witch 4.27gb size and sd 1.5 v so i tried some
https://huggingface.co/ckpt/Protogen_V2.2/resolve/main/Protogen_V2.2.ckpt https://huggingface.co/ckpt/anything-v4.5/resolve/main/anything-v4.5.ckpt and it didnt work .
can you try models uploaded on this repo and replicate the issue i have? https://huggingface.co/Androidonnxfork/mediapipe2
Thank you
@PaulTR any info regarding this?
@Fcucgvhhhvjv No, unfortunately I haven't had a chance to break away from other work and deadlines.
Also, do you have error logs for the crash to help with a reproduction case? What device are you using? (I have a Pixel 6 and 7, plus an S23 that I use, so want to see if it's potentially device specific).
Yes there is crash log ,ill put that model and the crash log . I'm using a poco x3 pro with snapdragon 860 , 6gb ram .
This occurs when loading a model not listed on the demo page , I've tested 2 model out of the 4 as listed on the page and it worked fine but custom models like cyberreal from civit ai after following the guide to pick a model didnt work .
If you get a break try some models that I've already put on the repo linked above
Hey I didn't see you post your error log in that repo. I'm getting this when trying to do the conversion with the ckpts you included:
Traceback (most recent call last):
File "/Users/ptruiz/Documents/code/models/mediapipe2/convert.py", line 51, in <module>
app.run(main)
File "/opt/homebrew/lib/python3.11/site-packages/absl/app.py", line 308, in run
_run_main(main, args)
File "/opt/homebrew/lib/python3.11/site-packages/absl/app.py", line 254, in _run_main
sys.exit(main(argv))
^^^^^^^^^^
File "/Users/ptruiz/Documents/code/models/mediapipe2/convert.py", line 48, in main
run(ckpt_path, output_path)
File "/Users/ptruiz/Documents/code/models/mediapipe2/convert.py", line 27, in run
ckpt = th.load(ckpt_path, map_location="cpu")
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/torch/serialization.py", line 815, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/opt/homebrew/lib/python3.11/site-packages/torch/serialization.py", line 1033, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
_pickle.UnpicklingError: invalid load key, 'v'.
My guess is that this falls out of scope for the sample repo, but I'll bubble a bug up after confirmation.
Thanks
Hi , @PaulTR i successfully got the models converted same way the demo page instructed , Im going to run the test and send u the app crash log .
Try running this notebook , i was able to convert the model from the same repo just now .
Here is the crash log
08-13 12:28:31.867 20225 20225 F DEBUG : Build fingerprint: 'POCO/bhima_in/bhima:13/TKQ1.221013.002/V14.0.2.0.TJUINXM:user/release-keys' 08-13 12:28:31.867 20225 20225 F DEBUG : Revision: '0' 08-13 12:28:31.867 20225 20225 F DEBUG : ABI: 'arm64' 08-13 12:28:31.867 20225 20225 F DEBUG : Timestamp: 2023-08-13 12:28:30.990911824+0530 08-13 12:28:31.867 20225 20225 F DEBUG : Process uptime: 386s 08-13 12:28:31.867 20225 20225 F DEBUG : ZygotePid: 2035341493 08-13 12:28:31.867 20225 20225 F DEBUG : Cmdline: com.google.android.apps.imagegenerator 08-13 12:28:31.867 20225 20225 F DEBUG : pid: 15729, tid: 20063, name: drishti/20063 >>> com.google.android.apps.imagegenerator <<< 08-13 12:28:31.867 20225 20225 F DEBUG : uid: 10178 08-13 12:28:31.867 20225 20225 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x000000000000076e 08-13 12:28:31.867 20225 20225 F DEBUG : Cause: null pointer dereference 08-13 12:28:31.867 20225 20225 F DEBUG : x0 000000000000076e x1 00000075e4eba3d0 x2 000000755ff39d50 x3 00000074ba6a3ce0 08-13 12:28:31.867 20225 20225 F DEBUG : x4 00000074ba6a3d70 x5 00000074ba688080 x6 00000000000003b7 x7 0000000000000385 08-13 12:28:31.867 20225 20225 F DEBUG : x8 0000000000000000 x9 0000000000000000 x10 0000000000000090 x11 0000000000000000 08-13 12:28:31.867 20225 20225 F DEBUG : x12 0000000000000000 x13 0000000000000000 x14 ffffffffffffff00 x15 0000000000000000 08-13 12:28:31.867 20225 20225 F DEBUG : x16 000000757a429a58 x17 0000007579fc4428 x18 000000758cb98000 x19 00000075e4ef2080 08-13 12:28:31.867 20225 20225 F DEBUG : x20 00000075e4eba3d0 x21 00000075e0f33738 x22 0000000000000385 x23 00000074ba688080 08-13 12:28:31.867 20225 20225 F DEBUG : x24 00000074ba6a3d70 x25 00000074ba6a3ce0 x26 000000755ff39d50 x27 00000074ba6a3d70 08-13 12:28:31.867 20225 20225 F DEBUG : x28 0000000000000071 x29 0000000000000000 08-13 12:28:31.867 20225 20225 F DEBUG : lr 0000007579fc4470 sp 00000075e0f33520 pc 0000007579fc501c pst 0000000060000000 08-13 12:28:31.867 20225 20225 F DEBUG : backtrace: 08-13 12:28:31.867 20225 20225 F DEBUG : #00 pc 0000000000ad501c /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #01 pc 0000000000ad446c /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (ml_drift::cl::stable_diffusion::Diffuser::DiffusionStepper::StepCustomOp(ml_drift::cl::CLCommandQueue, ml_drift::cl::Tensor, ml_drift::cl::Tensor, ml_drift::cl::Tensor, ml_drift::cl::Tensor, int, int, float)+68) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #02 pc 0000000000ad3d10 /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (ml_drift::cl::stable_diffusion::Diffuser::RunIterationStep(int, int)+360) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #03 pc 0000000000a3b844 /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (mediapipe::api2::StableDiffusionIterateCalculator::Process(mediapipe::CalculatorContext)+408) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #04 pc 0000000000a63358 /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (mediapipe::CalculatorNode::ProcessNode(mediapipe::CalculatorContext*)+328) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #05 pc 0000000000a58340 /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (mediapipe::internal::SchedulerQueue::RunCalculatorNode(mediapipe::CalculatorNode, mediapipe::CalculatorContext)+232) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #06 pc 0000000000a5804c /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (mediapipe::internal::SchedulerQueue::RunNextTask()+88) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #07 pc 0000000000a81c78 /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (mediapipe::ThreadPool::RunWorker()+124) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #08 pc 0000000000a818d0 /data/app/~~hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (mediapipe::ThreadPool::WorkerThread::ThreadBody(void)+316) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #09 pc 00000000000f55c8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void)+208) (BuildId: 449f781894033dce6346794a1ee593e0) 08-13 12:28:31.868 20225 20225 F DEBUG : #10 pc 000000000008efbc /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 449f781894033dce6346794a1ee593e0)
Ah, got it. Yeah this is definitely something outside the scope of the sample repo, but I'll bubble up a bug internally for our eng team. I can't give any sort of timeline for a response, but they'll be aware of it. Thanks for flagging!
Alright , I'll wait for an update . Btw why isn't there anything related to mediapipe image generation in this repo other than the convertion code ? Like some tutorial or how to build including the source code like other projects have.
It's not quite at that point yet :) We have this banner at the top of the documentation page you linked.
My bad , so the source code will be released when the app is out officially ?
Also can we get links to some more example model that works? like a fine tuned one .
I found that when I clicked the initialize button, it would crash. The mobile phone I used was Mi 8 with 8g memory. I'm not an android developer, so if you need logs please tell me how to get them。
@StudyingLover You can use termux to get the crash log of the apk . Use android tools to use adb then u can use adb logcat --buffer=crash to get the log. Thanks
@PaulTR Hi, i recently switched from miui rom to pixel experience and i can no longer run the image generator demo . what caused this . Im using the same device which us poco x3 pro . Thanks
ok,my log is
08-23 10:48:00.822 16639 16663 F libc : Fatal signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0 in tid 16663 (drishti/16663), pid 16639 (.imagegenerator)
08-23 10:48:01.095 16672 16672 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
08-23 10:48:01.095 16672 16672 F DEBUG : Build fingerprint: 'Xiaomi/dipper/dipper:9/PKQ1.180729.001/V11.0.3.0.PEACNXM:user/release-keys'
08-23 10:48:01.095 16672 16672 F DEBUG : Revision: '0'
08-23 10:48:01.095 16672 16672 F DEBUG : ABI: 'arm64'
08-23 10:48:01.095 16672 16672 F DEBUG : pid: 16639, tid: 16663, name: drishti/16663 >>> com.google.android.apps.imagegenerator <<<
08-23 10:48:01.095 16672 16672 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x0
08-23 10:48:01.095 16672 16672 F DEBUG : Cause: null pointer dereference
08-23 10:48:01.095 16672 16672 F DEBUG : x0 0000000000000000 x1 0000000000000000 x2 0000000000000000 x3 000000000a000000
08-23 10:48:01.095 16672 16672 F DEBUG : x4 0000006fe0af7634 x5 0000000000000000 x6 0000000000000000 x7 000000000a000000
08-23 10:48:01.095 16672 16672 F DEBUG : x8 0000000000000000 x9 0000006fd4200000 x10 0000000000000000 x11 0000006fdd2c0000
08-23 10:48:01.095 16672 16672 F DEBUG : x12 0000000000000001 x13 0000000000000080 x14 000000000000000d x15 aaaaaaaaaaaaaaab
08-23 10:48:01.095 16672 16672 F DEBUG : x16 0000006fe2934a68 x17 0000006fe227c78c x18 0000006ff514de80 x19 0000006fe0af8158
08-23 10:48:01.095 16672 16672 F DEBUG : x20 0000006fe0af7ac0 x21 0000007003637eb0 x22 0000006fe0af7a58 x23 0000006fe0af85c0
08-23 10:48:01.095 16672 16672 F DEBUG : x24 0000000000000000 x25 0000000000000000 x26 0000000000000300 x27 000000000000c100
08-23 10:48:01.095 16672 16672 F DEBUG : x28 0000000000000000 x29 0000006fe0af94b0
08-23 10:48:01.095 16672 16672 F DEBUG : sp 0000006fe0af7830 lr 0000006fe24fd9c4 pc 0000006fe24da01c
08-23 10:48:01.115 16672 16672 F DEBUG :
08-23 10:48:01.115 16672 16672 F DEBUG : backtrace:
08-23 10:48:01.115 16672 16672 F DEBUG : #00 pc 0000000000ad501c /data/app/com.google.android.apps.imagegenerator-xlyGqqJYUYHwMQ8o_k8XzA==/lib/arm64/libmediapipe_jni.so
08-23 10:48:01.115 16672 16672 F DEBUG : #01 pc 0000000000af89c0 /data/app/com.google.android.apps.imagegenerator-xlyGqqJYUYHwMQ8o_k8XzA==/lib/arm64/libmediapipe_jni.so (ml_drift::TextGuidanceBuilder::MakeTextEmbeddings(ml_drift::GpuModelBuilder::TensorHandle const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char>> const&)+208)
08-23 10:48:01.115 16672 16672 F DEBUG : #02 pc 0000000000af85d4 /data/app/com.google.android.apps.imagegenerator-xlyGqqJYUYHwMQ8o_k8XzA==/lib/arm64/libmediapipe_jni.so (ml_drift::TextGuidanceBuilder::MakeTextGuidance(ml_drift::GpuModelBuilder::TensorHandle const&)+76)
08-23 10:48:01.115 16672 16672 F DEBUG : #03 pc 0000000000af84a4 /data/app/com.google.android.apps.imagegenerator-xlyGqqJYUYHwMQ8o_k8XzA==/lib/arm64/libmediapipe_jni.so (ml_drift::TextGuidanceBuilder::Build(ml_drift::TextGuidanceBuilder::Config const&, ml_drift::GpuInfo const&, ml_drift::CreateGpuModelInfo const&, ml_drift::GpuModel*, ml_drift::GpuModelBuilder::TensorHandle*, ml_drift::GpuModelBuilder::TensorHandle*, ml_drift::GpuModelBuilder::TensorHandle*)+520)
08-23 10:48:01.115 16672 16672 F DEBUG : #04 pc 0000000000ad2908 /data/app/com.google.android.apps.imagegenerator-xlyGqqJYUYHwMQ8o_k8XzA==/lib/arm64/libmediapipe_jni.so (ml_drift::cl::stable_diffusion::Diffuser::TextGuidance::Init(ml_drift::cl::stable_diffusion::Diffuser::Config const&, ml_drift::cl::Environment*)+376)
08-23 10:48:01.115 16672 16672 F DEBUG : #05 pc 0000000000ad22d8 /data/app/com.google.android.apps.imagegenerator-xlyGqqJYUYHwMQ8o_k8XzA==/lib/arm64/libmediapipe_jni.so (ml_drift::cl::stable_diffusion::Diffuser::Create(ml_drift::cl::stable_diffusion::Diffuser::Config const&)+744)
08-23 10:48:01.115 16672 16672 F DEBUG : #06 pc 0000000000a3b3cc /data/app/com.google.android.apps.imagegenerator-xlyGqqJYUYHwMQ8o_k8XzA==/lib/arm64/libmediapipe_jni.so (mediapipe::api2::StableDiffusionIterateCalculator::Open(mediapipe::CalculatorContext*)+752)
08-23 10:48:01.115 16672 16672 F DEBUG : #07 pc 0000000000a6222c /data/app/com.google.android.apps.imagegenerator-xlyGqqJYUYHwMQ8o_k8XzA==/lib/arm64/libmediapipe_jni.so (mediapipe::CalculatorNode::OpenNode()+312)
08-23 10:48:01.115 16672 16672 F DEBUG : #08 pc 0000000000a58188 /data/app/com.google.android.apps.imagegenerator-xlyGqqJYUYHwMQ8o_k8XzA==/lib/arm64/libmediapipe_jni.so (mediapipe::internal::SchedulerQueue::OpenCalculatorNode(mediapipe::CalculatorNode*)+60)
08-23 10:48:01.115 16672 16672 F DEBUG : #09 pc 0000000000a58040 /data/app/com.google.android.apps.imagegenerator-xlyGqqJYUYHwMQ8o_k8XzA==/lib/arm64/libmediapipe_jni.so (mediapipe::internal::SchedulerQueue::RunNextTask()+76)
08-23 10:48:01.115 16672 16672 F DEBUG : #10 pc 0000000000a81c78 /data/app/com.google.android.apps.imagegenerator-xlyGqqJYUYHwMQ8o_k8XzA==/lib/arm64/libmediapipe_jni.so (mediapipe::ThreadPool::RunWorker()+124)
08-23 10:48:01.115 16672 16672 F DEBUG : #11 pc 0000000000a818d0 /data/app/com.google.android.apps.imagegenerator-xlyGqqJYUYHwMQ8o_k8XzA==/lib/arm64/libmediapipe_jni.so (mediapipe::ThreadPool::WorkerThread::ThreadBody(void*)+316)
08-23 10:48:01.115 16672 16672 F DEBUG : #12 pc 0000000000081dac /system/lib64/libc.so (__pthread_start(void*)+36)
08-23 10:48:01.115 16672 16672 F DEBUG : #13 pc 0000000000023788 /system/lib64/libc.so (__start_thread+68)
@StudyingLover Have u followed the instructions from the demo page? do u have model files in /data/local/tmp/image_generator/bins ?
@StudyingLover 您是否按照演示页面的说明进行操作? /data/local/tmp/image_generator/bins 中有模型文件吗?
I think YES hhhhhhhhhh
@StudyingLover what model did you use ? I have tested other models which were not listed , should not work . If you wanna give a try with the model i converted let me know . It worked for me in the miui rom but it no longer works in pixel experience , the one which im running .
Emmmmmm,I run all steps again and the program no longer crashes immediately but after a while.
The logs are as follows
08-23 11:21:47.030 21364 21445 E AndroidRuntime: FATAL EXCEPTION: pool-1-thread-1
08-23 11:21:47.030 21364 21445 E AndroidRuntime: Process: com.google.android.apps.imagegenerator, PID: 21364
08-23 11:21:47.030 21364 21445 E AndroidRuntime: com.google.mediapipe.framework.MediaPipeException: unknown: CalculatorGraph::Run() failed in Run:
08-23 11:21:47.030 21364 21445 E AndroidRuntime: Calculator::Open() for node "StableDiffusionIterateCalculator" failed: Failed to build program executable - Build program failureBC-src-code:155:14:{155:14-155:24}: error: no matching builtin function for call to 'native_exp'
08-23 11:21:47.030 21364 21445 E AndroidRuntime: src_x0 = native_exp(src_x0 - new_max_val);
08-23 11:21:47.030 21364 21445 E AndroidRuntime: ^~~~~~~~~~
08-23 11:21:47.030 21364 21445 E AndroidRuntime: 1 diagnostic(s) generated.
08-23 11:21:47.030 21364 21445 E AndroidRuntime:
08-23 11:21:47.030 21364 21445 E AndroidRuntime: at com.google.mediapipe.framework.Graph.nativeWaitUntilGraphIdle(Native Method)
08-23 11:21:47.030 21364 21445 E AndroidRuntime: at com.google.mediapipe.framework.Graph.waitUntilGraphIdle(Graph.java:465)
08-23 11:21:47.030 21364 21445 E AndroidRuntime: at com.google.android.apps.imagegenerator.AppMainActivity.initializeGraph(AppMainActivity.java:330)
08-23 11:21:47.030 21364 21445 E AndroidRuntime: at com.google.android.apps.imagegenerator.AppMainActivity.lambda$onInitializeButtonClicked$7$com-google-android-apps-imagegenerator-AppMainActivity(AppMainActivity.java:152)
08-23 11:21:47.030 21364 21445 E AndroidRuntime: at com.google.android.apps.imagegenerator.AppMainActivity$$ExternalSyntheticLambda14.run(Unknown Source:6)
08-23 11:21:47.030 21364 21445 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
08-23 11:21:47.030 21364 21445 E AndroidRuntime: at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
08-23 11:21:47.030 21364 21445 E AndroidRuntime: at java.lang.Thread.run(Thread.java:764)
Here is the crash log
08-13 12:28:31.867 20225 20225 F DEBUG : Build fingerprint: 'POCO/bhima_in/bhima:13/TKQ1.221013.002/V14.0.2.0.TJUINXM:user/release-keys' 08-13 12:28:31.867 20225 20225 F DEBUG : Revision: '0' 08-13 12:28:31.867 20225 20225 F DEBUG : ABI: 'arm64' 08-13 12:28:31.867 20225 20225 F DEBUG : Timestamp: 2023-08-13 12:28:30.990911824+0530 08-13 12:28:31.867 20225 20225 F DEBUG : Process uptime: 386s 08-13 12:28:31.867 20225 20225 F DEBUG : ZygotePid: 2035341493 08-13 12:28:31.867 20225 20225 F DEBUG : Cmdline: com.google.android.apps.imagegenerator 08-13 12:28:31.867 20225 20225 F DEBUG : pid: 15729, tid: 20063, name: drishti/20063 >>> com.google.android.apps.imagegenerator <<< 08-13 12:28:31.867 20225 20225 F DEBUG : uid: 10178 08-13 12:28:31.867 20225 20225 F DEBUG : signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x000000000000076e 08-13 12:28:31.867 20225 20225 F DEBUG : Cause: null pointer dereference 08-13 12:28:31.867 20225 20225 F DEBUG : x0 000000000000076e x1 00000075e4eba3d0 x2 000000755ff39d50 x3 00000074ba6a3ce0 08-13 12:28:31.867 20225 20225 F DEBUG : x4 00000074ba6a3d70 x5 00000074ba688080 x6 00000000000003b7 x7 0000000000000385 08-13 12:28:31.867 20225 20225 F DEBUG : x8 0000000000000000 x9 0000000000000000 x10 0000000000000090 x11 0000000000000000 08-13 12:28:31.867 20225 20225 F DEBUG : x12 0000000000000000 x13 0000000000000000 x14 ffffffffffffff00 x15 0000000000000000 08-13 12:28:31.867 20225 20225 F DEBUG : x16 000000757a429a58 x17 0000007579fc4428 x18 000000758cb98000 x19 00000075e4ef2080 08-13 12:28:31.867 20225 20225 F DEBUG : x20 00000075e4eba3d0 x21 00000075e0f33738 x22 0000000000000385 x23 00000074ba688080 08-13 12:28:31.867 20225 20225 F DEBUG : x24 00000074ba6a3d70 x25 00000074ba6a3ce0 x26 000000755ff39d50 x27 00000074ba6a3d70 08-13 12:28:31.867 20225 20225 F DEBUG : x28 0000000000000071 x29 0000000000000000 08-13 12:28:31.867 20225 20225 F DEBUG : lr 0000007579fc4470 sp 00000075e0f33520 pc 0000007579fc501c pst 0000000060000000 08-13 12:28:31.867 20225 20225 F DEBUG : backtrace: 08-13 12:28:31.867 20225 20225 F DEBUG : #00 pc 0000000000ad501c /data/app/
hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #1 pc 0000000000ad446c /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (ml_drift:🆑:stable_diffusion::Diffuser::DiffusionStepper::StepCustomOp(ml_drift:🆑:CLCommandQueue, ml_drift:🆑:Tensor, ml_drift:🆑:Tensor, ml_drift:🆑:Tensor, ml_drift:🆑:Tensor, int, int, float)+68) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #2 pc 0000000000ad3d10 /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (ml_drift:🆑:stable_diffusion::Diffuser::RunIterationStep(int, int)+360) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #3 pc 0000000000a3b844 /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (mediapipe::api2::StableDiffusionIterateCalculator::Process(mediapipe::CalculatorContext)+408) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #4 pc 0000000000a63358 /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (mediapipe::CalculatorNode::ProcessNode(mediapipe::CalculatorContext*)+328) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #5 pc 0000000000a58340 /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (mediapipe::internal::SchedulerQueue::RunCalculatorNode(mediapipe::CalculatorNode, mediapipe::CalculatorContext)+232) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #6 pc 0000000000a5804c /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (mediapipe::internal::SchedulerQueue::RunNextTask()+88) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #7 pc 0000000000a81c78 /data/app/hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (mediapipe::ThreadPool::RunWorker()+124) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #8 pc 0000000000a818d0 /data/app/~~hf322MUMq_fndN473N1JoA==/com.google.android.apps.imagegenerator-Z4kX25Rdk757-JPkPy0G_w==/lib/arm64/libmediapipe_jni.so (mediapipe::ThreadPool::WorkerThread::ThreadBody(void)+316) (BuildId: 292a718b76ff8d657b3caf92316f5ca0) 08-13 12:28:31.867 20225 20225 F DEBUG : #9 pc 00000000000f55c8 /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void)+208) (BuildId: 449f781894033dce6346794a1ee593e0) 08-13 12:28:31.868 20225 20225 F DEBUG : #10 pc 000000000008efbc /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+68) (BuildId: 449f781894033dce6346794a1ee593e0)
@StudyingLover your log looks similar to mine , unfortunately i dont know the fix . I got this log when trying a model not listed for example cyberreal . I'll check if my crash log in same cuz no matter what model i try in the pixel experience rom it crashes , I'll do it tommorow .
ok ,I think we only wait Google team to solve it. Besides I wander why you mentioned issuse. They have no connection I think.
@StudyingLover that wasn't intentional , its from the crash log i posted or a typing error . Can u tell me how can i close it?
well, I have no ideas about it :sob: .
@StudyingLover you can try this before they fix the app for us . https://github.com/ZTMIDGO/Android-Stable-diffusion-ONNX. On my device SD 860 its 1 min more or less for a 320 p image with 20 steps . Plus i already have 10-20 model converted for it 🙂.Let me know if its any faster for you
is that APP can open source?
I get a crash when I tap "Initialize", it is running for like 20-30 seconds and then crash... Error I see in logcat is:
20:26:00.659 E updateValue is called with a value {0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0}, which is lower than the previous value {0, 28, 5, 55, 0, 18, 2, 1, 101, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 8}
Dont know if it is related.
Also when running convert.py
I get a warning:
RuntimeWarning: overflow encountered in cast
v.numpy().astype("float16").tofile(output_bin_file)
Anyone has an idea whether it is related?
Alright now that we have the official docs and sample up, I'm going to close this out :) Let us know if you're seeing the same problem with the current release though!
https://developers.google.com/mediapipe/solutions/vision/image_generator
I just followed the instruction, built the android app and converted the wife 1.4 model listed on the page, I got the same error as an earlier post when hitting "initialize" on the DiffusionActivity
on a Pixel 5a and 6a. Should I open a separate issue?
Hey. Yes please make a new issue. Include error logs, the type of device and OS version you're using, link to the checkpoints, and anything else related to how you're running the app so we can debug :) Thanks!
actually, my bad, I copied the model to the wrong directory on device. I copied to /data/local/tmp/image_generator/bin/
instead of /data/local/tmp/image_generator/bins/
. False alarm!
My favorite kind of issue/bug fix :D
well... we might need a guide on minimal device spec, because on both my 5a and 6a, I get this msg after DiffusionStepper is created
in my log, I'll create another issue instead of keep polluting this one :cry:
2023-10-16 10:57:57.306 592-592 lowmemorykiller lmkd I Kill 'com.google.mediapipe.examples.imagegeneration' (14623), uid 10084, oom_score_adj 0 to free 3554880kB rss, 481248kB swap; reason: device is low on swap (96916kB < 209712kB) and thrashing (204%)
Hi, I have tried to convert some models to work with mediapipe image generator app by following the guideline to download ckpt exactly having 4.27 gb size . You can take a look at this repo and the converted models https://huggingface.co/Androidonnxfork/mediapipe2 .After successful initialization it crashes after a few seconds of clicking generate . models i used are cyberrealistic_ckpt 4.27 gb deliberate ckpt 4.27 gb and realisticv5 ckpt 4.27gb
Also finding ckpt is hard , cant safetensors be used or diffusers for the conversion of model.