google-ai-edge / mediapipe

Cross-platform, customizable ML solutions for live and streaming media.
https://ai.google.dev/edge/mediapipe
Apache License 2.0
27.69k stars 5.18k forks source link

Runtime tensor error when trying to convert cpu model to tflite #5749

Open itzjac opened 1 day ago

itzjac commented 1 day ago

Have I written custom code (as opposed to using a stock example script provided in MediaPipe)

None

OS Platform and Distribution

WSL2

MediaPipe Tasks SDK version

0.10.18

Task name (e.g. Image classification, Gesture recognition etc.)

convert model

Programming Language and version (e.g. C++, Python, Java)

Python

Describe the actual behavior

Runtime Erorr for generating cpu model

Describe the expected behaviour

convert model and generate a tflite file

Standalone code/steps you may have used to try to get what you need

Using the provided LLM inference example as found in github (text-to-text)

Other info / Complete Logs

Running the conversion using the gpu backend works and load on device (is super slow). cpu backend stops the process with the runtime error

RuntimeError: INTERNAL: ; RET_CHECK failure (external/odml/odml/infra/genai/inference/utils/xnn_utils/model_ckpt_util.cc:116) tensor

I tried different ubuntu versions, both generated same runtime error for the cpu backend and worked fine with gpu backend.
itzjac commented 1 day ago

The wsl 2 has a default installation ubuntu 24

No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 24.04.1 LTS
Release:        24.04
Codename:       noble