Get hands-on experience with 20+ free Google Cloud products and $300 in free credit for new customers.

Cannot generate image using imagen 3

I was given access to imagen 3.  However I got the following exception response:

com.google.firebase.vertexai.type.ServerException: Unexpected Response:
{
"error": {
"code": 429,
"message": "Quota exceeded for aiplatform.googleapis.com/generate_content_requests_per_minute_per_project_per_base_model with base model: imagen-3.0-fast-generate. Please submit a quota increase request. https://cloud.google.com/vertex-ai/docs/generative-ai/quotas-genai.",
"status": "RESOURCE_EXHAUSTED"
}
}

I have checked the quota should already be 20.  And my app can successfully generate response from other model s.a. gemini-1.5-flash-preview-0514.  I use the same logic to query and no avail.

Thanks

 

0 2 1,303
2 REPLIES 2

Hi @pielip,

Welcome to Google Cloud Community!

When you encounter a "quota exceeded" error message related to "generate_content_requests_per_minute_per_project_per_base_model” while using Imagen 3.0, it means that the number of your requests exceeds the capacity allocated to process them. Quotas are in place to ensure fair usage and to prevent any single user from overloading the system. With regard to the issue you are encountering, here are some things you can consider to address the issue:

  • Identify the Specific Quota: You can confirm whether you have reached the quota limit assigned to your project. You can navigate to the Google Cloud Console, and, in the left-hand navigation panel, click on "IAM & Admin" and then select  “Quotas & System Limits." You can use the Filter search box to search for your quota.
  • Rate Limiting and Retry Logic: To avoid hitting the quota repeatedly, you can implement rate limiting in your code. For instance, if you're making many requests in a short period, add a delay (e.g., exponential backoff) before retrying after an exception.
  • The Error Message's Guidance: The error message itself points you to a possible solution. To increase any of your quotas, you can use the Google Cloud Console to request a quota increase. You may follow the steps in this documentation. Be prepared to justify your need for a higher quota, explaining your use case and estimated request volume. Keep in mind that these requests are subject to review and approval and may take some time to process. Additionally, quota increase requests are typically evaluated based on the validity of the business case provided.

If the issue persists, I suggest contacting Google Cloud Support, as they can provide more insights and take a deeper look at your issue regarding resource limits.

I hope the above information is helpful.

I had to throttle my usage (with a sleep timer) for Google's Imagen. I have 3 uses per minute so I sleep for 20 seconds against every call to Vertex AI (including LLMs etc)..remember they all count towards your quota. If you are a personal user and don't have a sales rep, you won't be able to increase your quota.