Keep the pipeline tag as Auto Detected.

#20
by ariG23498 HF Staff - opened

Hey team!

The generated code snippet for the model creates an issue as suggested here.

The issue is that the pipeline is tagged as image-text-to-text, which uses AutoModelForImageTextToText. The model does not support the API and only supports AutoModel (with remote code).

The easiest option to rectify the issue is to keep pipeline_tag as Auto-detected, which would in turn produce the following code snippet that works ⬇

pipe = pipeline("feature-extraction", model="openbmb/MiniCPM-V-4_5", trust_remote_code=True)

The other option (a bit convoluted) is to write a custom pipeline.
The docs of adding a new pipeline is here: https://huggingface.co/docs/transformers/en/add_new_pipeline#adding-a-new-pipeline

Let me know what you think is best! πŸ€—

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment