GoogleCloudPlatform / GoogleCloudPlatform/generative-ai
[Bug]: edit_image() is unable to find any media content.
- Dominant language
- Jupyter Notebook
- Stars
- 17.7k
- Forks
- 4.5k
- Avg merge
- 12h 38m
- Merged PRs (30d)
- 42
Description
### File Name
vision/getting-started/imagen3_editing.ipynb
### What happened?
built-in function edit_image() is unable to find any media content.
code:
```
edited_image = client.models.edit_image(
model=edit_model,
prompt=edit_prompt,
reference_images=[raw_ref_image, mask_ref_image],
config=EditImageConfig(
edit_mode="EDIT_MODE_INPAINT_INSERTION",
number_of_images=1,
safety_filter_level="BLOCK_LOW_AND_ABOVE",
person_generation="DONT_ALLOW",
),
)
```
### Relevant log output
```shell
code:
edited_image = client.models.edit_image(
model=edit_model,
prompt=edit_prompt,
reference_images=[raw_ref_image, mask_ref_image],
config=EditImageConfig(
edit_mode="EDIT_MODE_INPAINT_INSERTION",
number_of_images=1,
safety_filter_level="BLOCK_LOW_AND_ABOVE",
person_generation="DONT_ALLOW",
),
)
output:
ClientError: 400 INVALID_ARGUMENT. {'error': {'code': 400, 'message': 'Image editing failed with the following error: No uri or raw bytes are provided in media content.', 'status': 'INVALID_ARGUMENT'}}
```
### Code of Conduct
- [x] I agree to follow this project's Code of Conduct
Contributor guide
Assessment
This issue has not been assessed yet.