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

Imagen Documentation #8776

Merged
merged 15 commits into from
Feb 20, 2025
Merged

Imagen Documentation #8776

merged 15 commits into from
Feb 20, 2025

Conversation

dlarocque
Copy link
Contributor

@dlarocque dlarocque commented Feb 7, 2025

Imagen public documentation pulled out from code, for easier TW review.

Imagen PR: #8683

@dlarocque dlarocque requested review from a team as code owners February 7, 2025 17:39
Copy link

changeset-bot bot commented Feb 7, 2025

⚠️ No Changeset found

Latest commit: 60bcae9

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@dlarocque dlarocque marked this pull request as draft February 7, 2025 17:40
@google-oss-bot
Copy link
Contributor

google-oss-bot commented Feb 7, 2025

@google-oss-bot
Copy link
Contributor

google-oss-bot commented Feb 7, 2025

@dlarocque dlarocque marked this pull request as ready for review February 7, 2025 21:02
@dlarocque dlarocque changed the base branch from dl/vertex-imagen to main February 13, 2025 16:08
@dlarocque dlarocque changed the base branch from main to dl/vertex-imagen February 13, 2025 16:08
@@ -10,6 +10,10 @@ https://github.com/firebase/firebase-js-sdk
{% endcomment %}

# ImagenGCSImage interface
An image generated by Imagen, stored in Cloud Storage (GCS) for Firebase.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
An image generated by Imagen, stored in Cloud Storage (GCS) for Firebase.
An image generated by Imagen, stored in a Cloud Storage for Firebase bucket.

@@ -20,19 +24,29 @@ export interface ImagenGCSImage

| Property | Type | Description |
| --- | --- | --- |
| [gcsURI](./vertexai.imagengcsimage.md#imagengcsimagegcsuri) | string | |
| [mimeType](./vertexai.imagengcsimage.md#imagengcsimagemimetype) | string | |
| [gcsURI](./vertexai.imagengcsimage.md#imagengcsimagegcsuri) | string | The URI of the file stored in a Cloud Storage (GCS) for Firestore bucket. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| [gcsURI](./vertexai.imagengcsimage.md#imagengcsimagegcsuri) | string | The URI of the file stored in a Cloud Storage (GCS) for Firestore bucket. |
| [gcsURI](./vertexai.imagengcsimage.md#imagengcsimagegcsuri) | string | The URI of the file stored in a Cloud Storage for Firebase bucket. |


## ImagenGCSImage.gcsURI

The URI of the file stored in a Cloud Storage (GCS) for Firestore bucket.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
The URI of the file stored in a Cloud Storage (GCS) for Firestore bucket.
The URI of the file stored in a Cloud Storage for Firebase bucket.


Configuration options for generating images with Imagen.

See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images) for more details.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images) for more details.
See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images-imagen) for more details.

| [imageFormat](./vertexai.imagengenerationconfig.md#imagengenerationconfigimageformat) | [ImagenImageFormat](./vertexai.imagenimageformat.md#imagenimageformat_class) | |
| [negativePrompt](./vertexai.imagengenerationconfig.md#imagengenerationconfignegativeprompt) | string | |
| [numberOfImages](./vertexai.imagengenerationconfig.md#imagengenerationconfignumberofimages) | number | |
| [addWatermark](./vertexai.imagengenerationconfig.md#imagengenerationconfigaddwatermark) | boolean | <b><i>(Public Preview)</i></b> Whether to add an invisible watermark to generated images.<!-- -->If set to <code>true</code>, an invisible SynthID watermark is embedded in generated images to indicate that they are AI generated. If set to <code>false</code>, watermarking will be disabled.<!-- -->The default value depends on the Imagen model; see the <a href="http://firebase.google.com/docs/vertex-ai/generate-images"><code>addWatermark</code></a> documentation for more details. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| [addWatermark](./vertexai.imagengenerationconfig.md#imagengenerationconfigaddwatermark) | boolean | <b><i>(Public Preview)</i></b> Whether to add an invisible watermark to generated images.<!-- -->If set to <code>true</code>, an invisible SynthID watermark is embedded in generated images to indicate that they are AI generated. If set to <code>false</code>, watermarking will be disabled.<!-- -->The default value depends on the Imagen model; see the <a href="http://firebase.google.com/docs/vertex-ai/generate-images"><code>addWatermark</code></a> documentation for more details. |
| [addWatermark](./vertexai.imagengenerationconfig.md#imagengenerationconfigaddwatermark) | boolean | <b><i>(Public Preview)</i></b> Whether to add an invisible watermark to generated images.<!-- -->If set to <code>true</code>, an invisible SynthID watermark is embedded in generated images to indicate that they are AI generated. If set to <code>false</code>, watermarking will be disabled.<!-- -->For Imagen 3 models, the default value is <code>true</code>; see the <a href="http://firebase.google.com/docs/vertex-ai/model-parameters#imagen"><code>addWatermark</code></a> documentation for more details. |

| [addWatermark](./vertexai.imagengenerationconfig.md#imagengenerationconfigaddwatermark) | boolean | <b><i>(Public Preview)</i></b> Whether to add an invisible watermark to generated images.<!-- -->If set to <code>true</code>, an invisible SynthID watermark is embedded in generated images to indicate that they are AI generated. If set to <code>false</code>, watermarking will be disabled.<!-- -->The default value depends on the Imagen model; see the <a href="http://firebase.google.com/docs/vertex-ai/generate-images"><code>addWatermark</code></a> documentation for more details. |
| [aspectRatio](./vertexai.imagengenerationconfig.md#imagengenerationconfigaspectratio) | [ImagenAspectRatio](./vertexai.md#imagenaspectratio) | <b><i>(Public Preview)</i></b> The aspect ratio of the generated images. The default value is square 1:1. Supported aspect ratios depend on the Imagen model, see <code>[ImagenAspectRatio](./vertexai.md#imagenaspectratio)</code> for more details. |
| [imageFormat](./vertexai.imagengenerationconfig.md#imagengenerationconfigimageformat) | [ImagenImageFormat](./vertexai.imagenimageformat.md#imagenimageformat_class) | <b><i>(Public Preview)</i></b> The image format of the generated images. The default is PNG.<!-- -->See <code>[ImagenImageFormat](./vertexai.imagenimageformat.md#imagenimageformat_class)</code> for more details. |
| [negativePrompt](./vertexai.imagengenerationconfig.md#imagengenerationconfignegativeprompt) | string | <b><i>(Public Preview)</i></b> A description of what should be omitted from the generated images.<!-- -->Support for negative prompts depends on the Imagen model.<!-- -->See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images) for more details. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| [negativePrompt](./vertexai.imagengenerationconfig.md#imagengenerationconfignegativeprompt) | string | <b><i>(Public Preview)</i></b> A description of what should be omitted from the generated images.<!-- -->Support for negative prompts depends on the Imagen model.<!-- -->See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images) for more details. |
| [negativePrompt](./vertexai.imagengenerationconfig.md#imagengenerationconfignegativeprompt) | string | <b><i>(Public Preview)</i></b> A description of what should be omitted from the generated images.<!-- -->Support for negative prompts depends on the Imagen model.<!-- -->See the [documentation](http://firebase.google.com/docs/vertex-ai/model-parameters#imagen) for more details. |

| [aspectRatio](./vertexai.imagengenerationconfig.md#imagengenerationconfigaspectratio) | [ImagenAspectRatio](./vertexai.md#imagenaspectratio) | <b><i>(Public Preview)</i></b> The aspect ratio of the generated images. The default value is square 1:1. Supported aspect ratios depend on the Imagen model, see <code>[ImagenAspectRatio](./vertexai.md#imagenaspectratio)</code> for more details. |
| [imageFormat](./vertexai.imagengenerationconfig.md#imagengenerationconfigimageformat) | [ImagenImageFormat](./vertexai.imagenimageformat.md#imagenimageformat_class) | <b><i>(Public Preview)</i></b> The image format of the generated images. The default is PNG.<!-- -->See <code>[ImagenImageFormat](./vertexai.imagenimageformat.md#imagenimageformat_class)</code> for more details. |
| [negativePrompt](./vertexai.imagengenerationconfig.md#imagengenerationconfignegativeprompt) | string | <b><i>(Public Preview)</i></b> A description of what should be omitted from the generated images.<!-- -->Support for negative prompts depends on the Imagen model.<!-- -->See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images) for more details. |
| [numberOfImages](./vertexai.imagengenerationconfig.md#imagengenerationconfignumberofimages) | number | <b><i>(Public Preview)</i></b> The number of images to generate. The default value is 1.<!-- -->The number of sample images that may be generated in each request depends on the model (typically up to 4); see the <a href="http://firebase.google.com/docs/vertex-ai/generate-images"><code>sampleCount</code></a> documentation for more details. |
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
| [numberOfImages](./vertexai.imagengenerationconfig.md#imagengenerationconfignumberofimages) | number | <b><i>(Public Preview)</i></b> The number of images to generate. The default value is 1.<!-- -->The number of sample images that may be generated in each request depends on the model (typically up to 4); see the <a href="http://firebase.google.com/docs/vertex-ai/generate-images"><code>sampleCount</code></a> documentation for more details. |
| [numberOfImages](./vertexai.imagengenerationconfig.md#imagengenerationconfignumberofimages) | number | <b><i>(Public Preview)</i></b> The number of images to generate. The default value is 1.<!-- -->The number of sample images that may be generated in each request depends on the model (typically up to 4); see the <a href="http://firebase.google.com/docs/vertex-ai/model-parameters#imagen"><code>sampleCount</code></a> documentation for more details. |

@dlarocque dlarocque merged commit 0900f82 into dl/vertex-imagen Feb 20, 2025
34 of 35 checks passed
@dlarocque dlarocque deleted the dl/imagen-documentation branch February 20, 2025 14:51
dlarocque added a commit that referenced this pull request Feb 21, 2025
* WIP

* Introduce VertexAIModel base class, add documentation, and respond to other comments

* Generate devsite docs

* revert dataconnect change

* formatting

* WIP

* Introduce VertexAIModel base class, add documentation, and respond to other comments

* Generate devsite docs

* revert dataconnect change

* formatting

* Fix ImagenRequestConfig comment

* Improve tests

* Formatting

* Add ImagenGenerationResponse

* Formatting

* Update to match API changes

* fixes

* format

* Update API reports

* add changeset

* update

* format

* Update API reports

* remove public docs

* Nest imageFormat in outputOptions

* remove unecessary console.log

* Log warning if compressionQuality outside of range

* format

* Imagen Documentation (#8776)

* Revert "remove public docs"

This reverts commit f095563.

* update docs

* update docs

* format

* minor fixes

* format

* mark all APIs beta instead of public

* review fixes

* format

* Replace (BETA) with (Public Preview) in docs

* fix links

* another pass

* format

* review fixes

* Cleanup

* update changeset

---------

Co-authored-by: dlarocque <dlarocque@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants