Open ZTMIDGO opened 7 months ago
You are getting an error from OpenCL here. I will route this issue to our GPU team.
I have the same error Android GPU Andero 750 2024-07-04 03:25:12.014 28876-28876 ImeTracker I com.google.mediapipe.examples.imagegeneration:46fa34ee: onRequestHide at ORIGIN_CLIENT_HIDE_SOFT_INPUT reason HIDE_SOFT_INPUT 2024-07-04 03:25:12.084 28876-28956 native I I0000 00:00:1720034712.083933 28956 diffuser.cc:81] Environment created 2024-07-04 03:25:14.138 28876-28956 native I I0000 00:00:1720034714.138813 28956 diffuser.cc:89] TextGuidance is created 2024-07-04 03:25:14.152 28876-28956 native I I0000 00:00:1720034714.151973 28956 diffuser.cc:94] Copier is created 2024-07-04 03:25:31.105 28876-28956 native E E0000 00:00:1720034731.105563 28956 diffuser_gpu.cc:88] UNKNOWN: Failed to create 2D texture (clCreateImage): Invalid image size 2024-07-04 03:25:31.106 28876-28953 native E E0000 00:00:1720034731.106050 28953 calculator_graph.cc:887] INTERNAL: CalculatorGraph::Run() failed: Calculator::Open() for node "mediapipe_tasks_vision_image_generator_imagegeneratorgraph__StableDiffusionIterateCalculator" failed: ; RET_CHECK failure (mediapipe/tasks/cc/vision/image_generator/diffuser/stable_diffusion_iteratecalculator.cc:248) context 2024-07-04 03:25:31.128 28876-28953 AndroidRuntime E FATAL EXCEPTION: DefaultDispatcher-worker-1 Process: com.google.mediapipe.examples.imagegeneration, PID: 28876 com.google.mediapipe.framework.MediaPipeException: internal: CalculatorGraph::Run() failed: Calculator::Open() for node "mediapipe_tasks_vision_image_generator_imagegeneratorgraph__StableDiffusionIterateCalculator" failed: ; RET_CHECK failure (mediapipe/tasks/cc/vision/image_generator/diffuser/stable_diffusion_iteratecalculator.cc:248) context 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: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}@8c43678, Dispatchers.Default]
Have I written custom code (as opposed to using a stock example script provided in MediaPipe)
None
OS Platform and Distribution
Android 14
Mobile device if the issue happens on mobile device
Xiaomi Redmi Note 12 Turbo
Browser and version if the issue happens on browser
No response
Programming Language and version
Java
MediaPipe version
com.google.mediapipe:tasks-vision-image-generator:latest.release
Bazel version
No response
Solution
ImageGenerator
Android Studio, NDK, SDK versions (if issue is related to building in Android environment)
No response
Xcode & Tulsi version (if issue is related to building for iOS)
No response
Describe the actual behavior
An exception occurs when createFromOptions is executed
Describe the expected behaviour
An instance of the ImageGenerator should be obtained
Standalone code/steps you may have used to try to get what you need
Other info / Complete Logs