-
Notifications
You must be signed in to change notification settings - Fork 928
Imagen Documentation #8776
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
Changes from 14 commits
54cf6d5
95c7093
225e8b0
3da6b4b
3277ceb
a9c70b8
1320f62
50a1f5c
431ea66
504a1e2
ade589d
718c7e2
e05b8d3
44ab79d
60bcae9
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -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. | ||||||
|
||||||
This feature is not available yet. | ||||||
|
||||||
<b>Signature:</b> | ||||||
|
||||||
```typescript | ||||||
|
@@ -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. | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| [mimeType](./vertexai.imagengcsimage.md#imagengcsimagemimetype) | string | The MIME type of the image; either <code>"image/png"</code> or <code>"image/jpeg"</code>.<!-- -->To request a different format, set the <code>imageFormat</code> property in your <code>[ImagenGenerationConfig](./vertexai.imagengenerationconfig.md#imagengenerationconfig_interface)</code>. | | ||||||
|
||||||
## ImagenGCSImage.gcsURI | ||||||
|
||||||
The URI of the file stored in a Cloud Storage (GCS) for Firestore bucket. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
<b>Signature:</b> | ||||||
|
||||||
```typescript | ||||||
gcsURI: string; | ||||||
``` | ||||||
|
||||||
### Example | ||||||
|
||||||
`"gs://bucket-name/path/sample_0.jpg"`<!-- -->. | ||||||
|
||||||
## ImagenGCSImage.mimeType | ||||||
|
||||||
The MIME type of the image; either `"image/png"` or `"image/jpeg"`<!-- -->. | ||||||
|
||||||
To request a different format, set the `imageFormat` property in your <code>[ImagenGenerationConfig](./vertexai.imagengenerationconfig.md#imagengenerationconfig_interface)</code>. | ||||||
|
||||||
<b>Signature:</b> | ||||||
|
||||||
```typescript | ||||||
|
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
|
@@ -10,6 +10,13 @@ https://github.com/firebase/firebase-js-sdk | |||||
{% endcomment %} | ||||||
|
||||||
# ImagenGenerationConfig interface | ||||||
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||||||
> | ||||||
|
||||||
Configuration options for generating images with Imagen. | ||||||
|
||||||
See the [documentation](http://firebase.google.com/docs/vertex-ai/generate-images) for more details. | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
<b>Signature:</b> | ||||||
|
||||||
```typescript | ||||||
|
@@ -20,14 +27,23 @@ export interface ImagenGenerationConfig | |||||
|
||||||
| Property | Type | Description | | ||||||
| --- | --- | --- | | ||||||
| [addWatermark](./vertexai.imagengenerationconfig.md#imagengenerationconfigaddwatermark) | boolean | | | ||||||
| [aspectRatio](./vertexai.imagengenerationconfig.md#imagengenerationconfigaspectratio) | [ImagenAspectRatio](./vertexai.md#imagenaspectratio) | | | ||||||
| [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. | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
| [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. | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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. | | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
|
||||||
## ImagenGenerationConfig.addWatermark | ||||||
|
||||||
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||||||
> | ||||||
|
||||||
Whether to add an invisible watermark to generated images. | ||||||
|
||||||
If set to `true`<!-- -->, an invisible SynthID watermark is embedded in generated images to indicate that they are AI generated. If set to `false`<!-- -->, 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. | ||||||
|
||||||
<b>Signature:</b> | ||||||
|
||||||
```typescript | ||||||
|
@@ -36,6 +52,11 @@ addWatermark?: boolean; | |||||
|
||||||
## ImagenGenerationConfig.aspectRatio | ||||||
|
||||||
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||||||
> | ||||||
|
||||||
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. | ||||||
|
||||||
<b>Signature:</b> | ||||||
|
||||||
```typescript | ||||||
|
@@ -44,6 +65,13 @@ aspectRatio?: ImagenAspectRatio; | |||||
|
||||||
## ImagenGenerationConfig.imageFormat | ||||||
|
||||||
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||||||
> | ||||||
|
||||||
The image format of the generated images. The default is PNG. | ||||||
|
||||||
See <code>[ImagenImageFormat](./vertexai.imagenimageformat.md#imagenimageformat_class)</code> for more details. | ||||||
|
||||||
<b>Signature:</b> | ||||||
|
||||||
```typescript | ||||||
|
@@ -52,6 +80,15 @@ imageFormat?: ImagenImageFormat; | |||||
|
||||||
## ImagenGenerationConfig.negativePrompt | ||||||
|
||||||
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||||||
> | ||||||
|
||||||
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. | ||||||
|
||||||
<b>Signature:</b> | ||||||
|
||||||
```typescript | ||||||
|
@@ -60,6 +97,13 @@ negativePrompt?: string; | |||||
|
||||||
## ImagenGenerationConfig.numberOfImages | ||||||
|
||||||
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment. | ||||||
> | ||||||
|
||||||
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. | ||||||
|
||||||
<b>Signature:</b> | ||||||
|
||||||
```typescript | ||||||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.