Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

InvalidArgument: 400 Image input modality is not enabled #513

Closed
hovanhoa opened this issue Aug 23, 2024 · 3 comments
Closed

InvalidArgument: 400 Image input modality is not enabled #513

hovanhoa opened this issue Aug 23, 2024 · 3 comments
Assignees
Labels
component:support How to do xyz? status:awaiting user response Awaiting a response from the author type:bug Something isn't working

Comments

@hovanhoa
Copy link

hovanhoa commented Aug 23, 2024

Description of the bug:

I ran this below code to make a prompt for an image

import google.generativeai as genai
import PIL.Image
import os

img = PIL.Image.open('<IMAGE_FILE>')

model = genai.GenerativeModel(model_name="<MY_TUNED_MODEL>")

response = model.generate_content([img])
print(response.text)

But It's return the exception:

google.api_core.exceptions.InvalidArgument: 400 Image input modality is not enabled for <MY_TUNED_MODEL>

I already researched for this exception but found nothing. can anyone help me?

Actual vs expected behavior:

No response

Any other information you'd like to share?

But It's worked if I try Gemini model (such as gemini-1.5-flash)

@hovanhoa hovanhoa added the type:bug Something isn't working label Aug 23, 2024
@luhhdaveyjr
Copy link

bug

@gmKeshari gmKeshari self-assigned this Sep 9, 2024
@gmKeshari gmKeshari added status:awaiting user response Awaiting a response from the author component:support How to do xyz? labels Sep 9, 2024
@gmKeshari
Copy link

Hi @hovanhoa. Currently, model tuning is available for text and not for image & video.

@hovanhoa
Copy link
Author

Hmm, thank you @gmKeshari

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component:support How to do xyz? status:awaiting user response Awaiting a response from the author type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants