Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def canny_edge_customization(output_gcs_uri: str) -> str:
)

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",

prompt="a watercolor painting of a red car[1] driving on a road",
reference_images=[control_reference_image],
config=EditImageConfig(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def edit_inpainting_insert_mask(output_file: str) -> Image:
)

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",

prompt="A plate of cookies",
reference_images=[raw_ref, mask_ref],
config=EditImageConfig(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ def edit_inpainting_insert(output_file: str) -> Image:
)

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",

prompt="A small white ceramic bowl with lemons and limes",
reference_images=[raw_ref, mask_ref],
config=EditImageConfig(
Expand Down