mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

Image generator Crash

Open Mattis142 opened this issue 2 years ago • 3 comments

first of all I dont know what i'm doing really, I just downloaded the finished sample of the image generator and wanted to run it

this is what the logcat shows when I run the app on my Pixel 7 pro with a debugger:

--------- beginning of main 2023-11-27 22:45:19.363 15767-15767 imagegeneration com...pipe.examples.imagegeneration I Late-enabling -Xcheck:jni 2023-11-27 22:45:19.387 15767-15767 imagegeneration com...pipe.examples.imagegeneration I Using CollectorTypeCC GC. 2023-11-27 22:45:19.422 15767-15767 re-initialized> com...pipe.examples.imagegeneration W type=1400 audit(0.0:32013): avc: granted { execute } for path="/data/data/com.google.mediapipe.examples.imagegeneration/code_cache/startup_agents/566ca8ec-agent.so" dev="dm-55" ino=635905 scontext=u:r:untrusted_app_32:s0:c209,c257,c512,c768 tcontext=u:object_r:app_data_file:s0:c209,c257,c512,c768 tclass=file app=com.google.mediapipe.examples.imagegeneration 2023-11-27 22:45:19.433 15767-15767 imagegeneration com...pipe.examples.imagegeneration W DexFile /data/data/com.google.mediapipe.examples.imagegeneration/code_cache/.studio/instruments-45c255fe.jar is in boot class path but is not in a known location 2023-11-27 22:45:19.441 15767-15767 imagegeneration com...pipe.examples.imagegeneration W Redefining intrinsic method java.lang.Thread java.lang.Thread.currentThread(). This may cause the unexpected use of the original definition of java.lang.Thread java.lang.Thread.currentThread()in methods that have already been compiled. 2023-11-27 22:45:19.441 15767-15767 imagegeneration com...pipe.examples.imagegeneration W Redefining intrinsic method boolean java.lang.Thread.interrupted(). This may cause the unexpected use of the original definition of boolean java.lang.Thread.interrupted()in methods that have already been compiled. 2023-11-27 22:45:19.447 15767-15767 Compatibil...geReporter com...pipe.examples.imagegeneration D Compat change id reported: 171979766; UID 10465; state: ENABLED 2023-11-27 22:45:19.448 15767-15767 Compatibil...geReporter com...pipe.examples.imagegeneration D Compat change id reported: 242716250; UID 10465; state: DISABLED 2023-11-27 22:45:19.464 15767-15767 ziparchive com...pipe.examples.imagegeneration W Unable to open '/data/app/~~PSzA7mS7d8QS4jjTS4lu3A==/com.google.mediapipe.examples.imagegeneration-ejy4rPsNXpcMcTWtekRL7g==/base.dm': No such file or directory 2023-11-27 22:45:19.465 15767-15767 ziparchive com...pipe.examples.imagegeneration W Unable to open '/data/app/~~PSzA7mS7d8QS4jjTS4lu3A==/com.google.mediapipe.examples.imagegeneration-ejy4rPsNXpcMcTWtekRL7g==/base.dm': No such file or directory 2023-11-27 22:45:19.591 15767-15767 nativeloader com...pipe.examples.imagegeneration D Configuring clns-4 for other apk /data/app/~~PSzA7mS7d8QS4jjTS4lu3A==/com.google.mediapipe.examples.imagegeneration-ejy4rPsNXpcMcTWtekRL7g==/base.apk. target_sdk_version=33, uses_libraries=libOpenCL.so:libOpenCL-pixel.so, library_path=/data/app/~~PSzA7mS7d8QS4jjTS4lu3A==/com.google.mediapipe.examples.imagegeneration-ejy4rPsNXpcMcTWtekRL7g==/lib/arm64:/data/app/~~PSzA7mS7d8QS4jjTS4lu3A==/com.google.mediapipe.examples.imagegeneration-ejy4rPsNXpcMcTWtekRL7g==/base.apk!/lib/arm64-v8a, permitted_path=/data:/mnt/expand:/data/user/0/com.google.mediapipe.examples.imagegeneration 2023-11-27 22:45:19.608 15767-15767 GraphicsEnvironment com...pipe.examples.imagegeneration V Currently set values for: 2023-11-27 22:45:19.608 15767-15767 GraphicsEnvironment com...pipe.examples.imagegeneration V angle_gl_driver_selection_pkgs=[] 2023-11-27 22:45:19.608 15767-15767 GraphicsEnvironment com...pipe.examples.imagegeneration V angle_gl_driver_selection_values=[] 2023-11-27 22:45:19.609 15767-15767 GraphicsEnvironment com...pipe.examples.imagegeneration V ANGLE GameManagerService for com.google.mediapipe.examples.imagegeneration: false 2023-11-27 22:45:19.609 15767-15767 GraphicsEnvironment com...pipe.examples.imagegeneration V com.google.mediapipe.examples.imagegeneration is not listed in per-application setting 2023-11-27 22:45:19.609 15767-15767 GraphicsEnvironment com...pipe.examples.imagegeneration V Neither updatable production driver nor prerelease driver is supported. 2023-11-27 22:45:19.609 15767-15767 ActivityThread com...pipe.examples.imagegeneration W Application com.google.mediapipe.examples.imagegeneration is suspending. Debugger needs to resume to continue. 2023-11-27 22:45:19.610 15767-15767 System.out com...pipe.examples.imagegeneration I Sending WAIT chunk 2023-11-27 22:45:19.610 15767-15767 System.out com...pipe.examples.imagegeneration I Waiting for debugger first packet 2023-11-27 22:45:19.810 15767-15767 System.out com...pipe.examples.imagegeneration I Debug.suspendAllAndSentVmStart 2023-11-27 22:45:20.789 15767-15767 System.out com...pipe.examples.imagegeneration I Debug.suspendAllAndSendVmStart, resumed 2023-11-27 22:45:20.825 15767-15791 vulkan com...pipe.examples.imagegeneration D searching for layers in '/data/app/~~PSzA7mS7d8QS4jjTS4lu3A==/com.google.mediapipe.examples.imagegeneration-ejy4rPsNXpcMcTWtekRL7g==/lib/arm64' 2023-11-27 22:45:20.825 15767-15791 vulkan com...pipe.examples.imagegeneration D searching for layers in '/data/app/~~PSzA7mS7d8QS4jjTS4lu3A==/com.google.mediapipe.examples.imagegeneration-ejy4rPsNXpcMcTWtekRL7g==/base.apk!/lib/arm64-v8a' 2023-11-27 22:45:20.871 15767-15767 AppCompatDelegate com...pipe.examples.imagegeneration D Checking for metadata for AppLocalesMetadataHolderService : Service not found 2023-11-27 22:45:20.921 15767-15767 Compatibil...geReporter com...pipe.examples.imagegeneration D Compat change id reported: 210923482; UID 10465; state: ENABLED 2023-11-27 22:45:20.924 15767-15767 imagegeneration com...pipe.examples.imagegeneration W Accessing hidden method Landroid/view/View;->computeFitSystemWindows(Landroid/graphics/Rect;Landroid/graphics/Rect;)Z (unsupported, reflection, allowed) 2023-11-27 22:45:21.023 15767-15767 imagegeneration com...pipe.examples.imagegeneration W Accessing hidden method Landroid/view/ViewGroup;->makeOptionalFitsSystemWindows()V (unsupported, reflection, allowed) 2023-11-27 22:45:21.072 15767-15767 Compatibil...geReporter com...pipe.examples.imagegeneration D Compat change id reported: 237531167; UID 10465; state: DISABLED 2023-11-27 22:45:21.086 15767-15767 Choreographer com...pipe.examples.imagegeneration I Skipped 31 frames! The application may be doing too much work on its main thread. 2023-11-27 22:45:21.093 15767-15767 AutofillManager com...pipe.examples.imagegeneration D view not autofillable - has multiline input type 2023-11-27 22:45:26.371 15767-15818 ProfileInstaller com...pipe.examples.imagegeneration D Installing profile for com.google.mediapipe.examples.imagegeneration 2023-11-27 22:45:42.082 15767-15777 imagegeneration com...pipe.examples.imagegeneration I Background concurrent copying GC freed 30313(1898KB) AllocSpace objects, 3(60KB) LOS objects, 86% free, 3975KB/27MB, paused 268us,95us total 167.692ms 2023-11-27 22:46:02.601 15767-15767 ImeTracker com...pipe.examples.imagegeneration I com.google.mediapipe.examples.imagegeneration:8dd2ca4b: onRequestHide at ORIGIN_CLIENT_HIDE_SOFT_INPUT reason HIDE_SOFT_INPUT 2023-11-27 22:46:02.730 15767-15841 native com...pipe.examples.imagegeneration E E0000 00:00:1701121562.730047 15841 calculator_graph.cc:875] NOT_FOUND: CalculatorGraph::Run() failed: Calculator::Open() for node "mediapipe_tasks_vision_image_generator_imagegeneratorgraph__StableDiffusionIterateCalculator" failed: The path does not exist.; /data/local/tmp/image_generator/bins/ 2023-11-27 22:46:02.745 15767-15841 AndroidRuntime com...pipe.examples.imagegeneration E FATAL EXCEPTION: DefaultDispatcher-worker-1 Process: com.google.mediapipe.examples.imagegeneration, PID: 15767 com.google.mediapipe.framework.MediaPipeException: not found: CalculatorGraph::Run() failed: Calculator::Open() for node "mediapipe_tasks_vision_image_generator_imagegeneratorgraph__StableDiffusionIterateCalculator" failed: The path does not exist.; /data/local/tmp/image_generator/bins/ at com.google.mediapipe.framework.Graph.nativeWaitUntilGraphIdle(Native Method) at com.google.mediapipe.framework.Graph.waitUntilGraphIdle(Graph.java:464) at com.google.mediapipe.tasks.core.TaskRunner.create(TaskRunner.java:74) at com.google.mediapipe.tasks.vision.imagegenerator.ImageGenerator.createFromOptions(ImageGenerator.java:167) at com.google.mediapipe.tasks.vision.imagegenerator.ImageGenerator.createFromOptions(ImageGenerator.java:96) at com.google.mediapipe.examples.imagegeneration.ImageGenerationHelper.initializeImageGenerator(ImageGenerationHelper.kt:31) at com.google.mediapipe.examples.imagegeneration.MainViewModel$initializeImageGenerator$3.invokeSuspend(MainViewModel.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}@aeb2b37, Dispatchers.Default] 2023-11-27 22:46:02.755 15767-15841 Process com...pipe.examples.imagegeneration I Sending signal. PID: 15767 SIG: 9 ---------------------------- PROCESS ENDED (15767) for package com.google.mediapipe.examples.imagegeneration ----------------------------

as soon as I press "INITIALIZE" the app just crashes, i havent modified the code in the slightest, running android 14 if that matters

Mattis142 avatar Nov 27 '23 21:11 Mattis142

mediapipe_tasks_vision_image_generator_imagegeneratorgraph__StableDiffusionIterateCalculator" failed: The path does not exist.; /data/local/tmp/image_generator/bins/ feels you need to place the converted model to that path, as mentioned in the official document https://developers.google.com/mediapipe/solutions/vision/image_generator/android#model

xCatG avatar Dec 03 '23 22:12 xCatG

Hi @Mattis142 did you have any luck with copying that bin over?

PaulTR avatar Mar 17 '24 23:03 PaulTR

yep had no issues after that!

Mattis142 avatar Mar 18 '24 04:03 Mattis142