We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Imagen 3 has been released but the documentation has not been updated yet and the new API is more generic but also more complex than the old one.
For instance, with Imagen 2 you can outcrop like this:
model = ImageGenerationModel.from_pretrained("imagegeneration@006") images = model.edit_image( prompt=prompt, edit_mode="outpainting", base_image=base_img, mask=mask_img, )
but with Imagen 3 you need to do this:
model = ImageGenerationModel.from_pretrained("imagen-3.0-capability-001") base_ref = RawReferenceImage( reference_id=0, image=base_img, ) mask_ref = MaskReferenceImage( reference_id=1, image=mask_img, mask_mode="user_provided", dilation=0.03, ) images = model.edit_image( prompt=prompt, edit_mode="outpainting", reference_images=[base_ref, mask_ref], number_of_images=2, )
(Note in particular the dilation parameter, which is important and set to the old default.)
I think it would make sense to keep supporting the simpler API by converting it to the new format in the SDK when using Imagen 3.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Imagen 3 has been released but the documentation has not been updated yet and the new API is more generic but also more complex than the old one.
For instance, with Imagen 2 you can outcrop like this:
but with Imagen 3 you need to do this:
(Note in particular the dilation parameter, which is important and set to the old default.)
I think it would make sense to keep supporting the simpler API by converting it to the new format in the SDK when using Imagen 3.
The text was updated successfully, but these errors were encountered: