Skip to content

Replace models for image generation with updated ones. - #14545

Draft
XrossFox wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
XrossFox:image-generation-model-update-pt1
Draft

Replace models for image generation with updated ones.#14545
XrossFox wants to merge 1 commit into
GoogleCloudPlatform:mainfrom
XrossFox:image-generation-model-update-pt1

Conversation

@XrossFox

Copy link
Copy Markdown
Contributor

Description

PLACEHOLDER

Fixes #

Checklist

Testing

  • I have tested this change on a live environment and verified it works as intended.

Compliance & Style


Post-Approval Actions

  • Please merge this PR for me once it is approved

@product-auto-label product-auto-label Bot added the samples Issues that are directly related to samples. label Aug 28, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request attempts to update the model used for image editing and inpainting tasks from 'imagen-3.0-capability-001' to 'gemini-3.1-flash-image'. However, the reviewer points out that 'gemini-3.1-flash-image' is not a valid model for image editing in the Google GenAI SDK, and using it will result in API errors. It is recommended to revert these changes back to 'imagen-3.0-capability-001'.


image = client.models.edit_image(
model="imagen-3.0-capability-001",
model="gemini-3.1-flash-image",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The model gemini-3.1-flash-image is not a valid model for image editing in the Google GenAI SDK. Image editing operations (such as controlled editing and inpainting) are supported by the Imagen capability models, specifically imagen-3.0-capability-001. Using an invalid model name will result in an API error.

Suggested change
model="gemini-3.1-flash-image",
model="imagen-3.0-capability-001",


image = client.models.edit_image(
model="imagen-3.0-capability-001",
model="gemini-3.1-flash-image",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The model gemini-3.1-flash-image is not a valid model for image editing in the Google GenAI SDK. Image editing operations (such as controlled editing and inpainting) are supported by the Imagen capability models, specifically imagen-3.0-capability-001. Using an invalid model name will result in an API error.

Suggested change
model="gemini-3.1-flash-image",
model="imagen-3.0-capability-001",


image = client.models.edit_image(
model="imagen-3.0-capability-001",
model="gemini-3.1-flash-image",

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

The model gemini-3.1-flash-image is not a valid model for image editing in the Google GenAI SDK. Image editing operations (such as controlled editing and inpainting) are supported by the Imagen capability models, specifically imagen-3.0-capability-001. Using an invalid model name will result in an API error.

Suggested change
model="gemini-3.1-flash-image",
model="imagen-3.0-capability-001",

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

samples Issues that are directly related to samples.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant