-
Notifications
You must be signed in to change notification settings - Fork 25
Open
Description
Problem
I’m testing multimodal input for the Gemma 3N E2B model using mediapipe-task-genai (Flutter).
The .task runs fine in AI Edge Gallery with image + text, but no clear docs for Flutter.
I copied the .task file to local storage.
When I run inference after selecting an image and prompt, I get this:
Dart VM Service on sdk gphone64 x86 64 is available at: http://127.0.0.1:63174/rkZir4fi8xI=/
I/Choreographer(15528): Skipped 126 frames! The application may be doing too much work on its main thread.
I/WindowExtensionsImpl(15528): Initializing Window Extensions, vendor API level=9, activity embedding enabled=true
I/m.example.gemma(15528): Compiler allocated 5042KB to compile void android.view.ViewRootImpl.performTraversals()
The Flutter DevTools debugger and profiler on sdk gphone64 x86 64 is available at:
http://127.0.0.1:9101?uri=http://127.0.0.1:63174/rkZir4fi8xI=/
I/m.example.gemma(15528): AssetManager2(0x74905d724798) locale list changing from [] to [en-US]
I/Choreographer(15528): Skipped 49 frames! The application may be doing too much work on its main thread.
D/WindowLayoutComponentImpl(15528): Register WindowLayoutInfoListener on Context=com.example.gemma.MainActivity@b41f7aa, of which baseContext=android.app.ContextImpl@e75574d
D/InsetsController(15528): hide(ime(), fromIme=false)
I/ImeTracker(15528): com.example.gemma:caa26fe3: onCancelled at PHASE_CLIENT_ALREADY_HIDDEN
D/ProfileInstaller(15528): Installing profile for com.example.gemma
D/InsetsController(15528): hide(ime(), fromIme=false)
I/ImeTracker(15528): com.example.gemma:66bb9f87: onCancelled at PHASE_CLIENT_ALREADY_HIDDEN
D/InsetsController(15528): hide(ime(), fromIme=false)
I/ImeTracker(15528): com.example.gemma:586e6e3c: onCancelled at PHASE_CLIENT_ALREADY_HIDDEN
I/ImeTracker(15528): com.example.gemma:9f478a66: onRequestShow at ORIGIN_CLIENT reason SHOW_SOFT_INPUT fromUser false
D/InsetsController(15528): show(ime(), fromIme=false)
D/InsetsController(15528): Setting requestedVisibleTypes to -1 (was -9)
I/AssistStructure(15528): Flattened final assist data: 416 bytes, containing 1 windows, 3 views
D/InputConnectionAdaptor(15528): The input method toggled cursor monitoring on
W/InteractionJankMonitor(15528): Initializing without READ_DEVICE_CONFIG permission. enabled=false, interval=1, missedFrameThreshold=3, frameTimeThreshold=64, package=com.example.gemma
I/ImeTracker(15528): com.example.gemma:9f478a66: onShown
I/flutter (15528): Model already copied to: /data/user/0/com.example.gemma/app_flutter/gemma-3n-E2B-it-int4.task
I/flutter (15528): Existing file size: 3136226711 bytes
E/flutter (15528): [ERROR:flutter/runtime/dart_isolate.cc(1399)] Unhandled exception:
E/flutter (15528): Invalid argument(s): Couldn't resolve native function 'LlmInferenceEngine_CreateSession' in 'package:mediapipe_genai/src/io/third_party/mediapipe/generated/mediapipe_genai_bindings.dart' : No asset with id 'package:mediapipe_genai/src/io/third_party/mediapipe/generated/mediapipe_genai_bindings.dart' found. No available native assets. Attempted to fallback to process lookup. undefined symbol: LlmInferenceEngine_CreateSession.
E/flutter (15528):
E/flutter (15528): #0 Native._ffi_resolver.#ffiClosure0 (dart:ffi-patch/ffi_patch.dart)
E/flutter (15528): #1 Native._ffi_resolver_function (dart:ffi-patch/ffi_patch.dart:1939:20)
E/flutter (15528): #2 LlmInferenceEngine_CreateSession (package:mediapipe_genai/src/io/third_party/mediapipe/generated/mediapipe_genai_bindings.dart)
E/flutter (15528): #3 LlmInferenceExecutor.createWorker (package:mediapipe_genai/src/io/tasks/llm_inference/llm_inference_executor.dart:59:14)
E/flutter (15528): #4 TaskExecutor.worker (package:mediapipe_core/src/io/task_executor.dart:56:17)
E/flutter (15528): #5 LlmInferenceExecutor.generateResponse (package:mediapipe_genai/src/io/tasks/llm_inference/llm_inference_executor.dart:112:7)
E/flutter (15528): #6 _inferenceService (package:mediapipe_genai/src/io/tasks/llm_inference/llm_inference_engine.dart:238:27)```
Metadata
Metadata
Assignees
Labels
No labels