Skip to content
New issue

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

[Vertex AI] Replace ImagenImage protocol with _ImagenImage struct #14249

Merged
merged 2 commits into from
Dec 12, 2024

Conversation

andrewheard
Copy link
Contributor

  • Replaced the public ImagenImage protocol with a concrete _ImagenImage struct.
    • Unlike a protocol, a struct can be public while having internal properties.
      • This would still allow us to add an internal error property to accomplish the same thing as ErrorPart in GenerativeModel, allowing us to make UIImage, NSImage, etc., conform to ImagenImageRepresentable (a fail-able operation) in the future when we support image upscaling and/or editing that require images as input.
  • Prefixed the imagenImage property in ImagenImageRepresentable with an underscore (i.e., _imagenImage).
  • Although ImagenImage contains no private information, it could result in confusion over whether it should be used. Together these changes should make it clear that its use is discouraged / unnecessary.

#14221
#no-changelog

@andrewheard andrewheard marked this pull request as ready for review December 12, 2024 21:53
@andrewheard andrewheard merged commit 1de7f6f into vertex-imagen Dec 12, 2024
38 checks passed
@andrewheard andrewheard deleted the ah/vertex-imagen-image branch December 12, 2024 22:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants