mediapipe icon indicating copy to clipboard operation
mediapipe copied to clipboard

No attribute 'GenerateCpuTfLite'

Open zkh2016 opened this issue 1 year ago • 7 comments

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

None

OS Platform and Distribution

mac os

Mobile device if the issue happens on mobile device

No response

Browser and version if the issue happens on browser

No response

Programming Language and version

python

MediaPipe version

No response

Bazel version

No response

Solution

llm

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

Get an error

Describe the expected behaviour

Expecting to convert the model successfully.

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

Hello, after compiling and installing the Python package from the source code, I encountered the following error when trying to convert my own model. Is there any additional option that can be added during compilation to solve this problem?


File "python3.9/site-packages/mediapipe/tasks/python/genai/converter/llm_converter.py", line 163,  in combined_weight_bins_to_tflite
    model_ckpt_util.GenerateCpuTfLite(
AttributeError: module 'mediapipe.python._framework_bindings.model_ckpt_util' has no attribute 'GenerateCpuTfLite'


### Other info / Complete Logs

_No response_

zkh2016 avatar Apr 27 '24 04:04 zkh2016

I added --copt=ENABLE_ODML_CONVERTER in setup.py but it didn't work.

zkh2016 avatar Apr 27 '24 05:04 zkh2016

@ayushgdev Unable to find the odml package for local compilation. How can I pull the odml package?

zkh2016 avatar Apr 27 '24 12:04 zkh2016

Hi @zkh2016,

We believe, We have not tested this scenario yet. Could you please share the complete steps you're following from the documentation?

Thank you!!

kuaashish avatar Apr 30 '24 08:04 kuaashish

Firstly, compile and install the source code through python3 setup.py install -- link opencv, and then follow this tutorial to convert the model. The error message has no attribute' GenerateCpuTfLite was prompted. Therefore, try to directly place the ODML package in media pipe/Python/pybind/BUILD into deps, and when compiling, the prompt The repository '@ ODML' could not be resolved So, how to compile the source code and use it correctly?

zkh2016 avatar Apr 30 '24 09:04 zkh2016

Hi @zkh2016,

After internal discussion, we have concluded that this scenario cannot be supported. This functionality is designed and built specifically for internal use and is not intended for the wider user base. As a result, we likely won't be able to resolve this issue for your specific use case.

Thank you!!

kuaashish avatar May 03 '24 06:05 kuaashish

Hi @zkh2016,

After internal discussion, we have concluded that this scenario cannot be supported. This functionality is designed and built specifically for internal use and is not intended for the wider user base. As a result, we likely won't be able to resolve this issue for your specific use case.

Thank you!!

Thank you for your answer. My goal is actually to use MediaPipe to run the MiniCPM model. Can you help me adapt it? Or what should I do to get this model running with MediaPipe.

zkh2016 avatar May 06 '24 11:05 zkh2016

Hi @zkh2016,

We want to inform you that currently, this is not possible. We have already brought it to the attention of the team, and it is on our roadmap. Rest assured, Our team is actively working on this, and it will be available soon.

Thank you!!

kuaashish avatar May 07 '24 06:05 kuaashish

This issue has been marked stale because it has no recent activity since 7 days. It will be closed if no further activity occurs. Thank you.

github-actions[bot] avatar May 15 '24 01:05 github-actions[bot]

This issue was closed due to lack of activity after being marked stale for past 7 days.

github-actions[bot] avatar May 23 '24 01:05 github-actions[bot]

Are you satisfied with the resolution of your issue? Yes No

google-ml-butler[bot] avatar May 23 '24 01:05 google-ml-butler[bot]