Media generation input format for the Virtual Try On model.
promptstring
The text prompt describing the desired image.
Minimum of 1 and maximum of 3 product images to try on the person.
The image of the person to virtually try-on clothing.
| JSON representation |
|---|
{ "prompt": string, "productImages": [ { object ( |
ProductImage
A ProductImage is used to provide the product image and its associated configuration options for Virtual Try On.
Required. An image of a product to virtually try on a person. The following values are supported: - A bytesBase64 encoded string that encodes the image. - A gcsUri string URI to a Google Cloud Storage bucket location.
(Optional) The mask image associated with this product. If provided, the mask image is used to guide the image editing.
The configuration for the product image.
| JSON representation |
|---|
{ "image": { object ( |
Image
Represents the input image and metadata for virtual try-on.
mimeTypestring
The MIME type of the image. The following values are supported: - image/jpeg - image/png
dataUnion type
bytesBase64 encoded string that encodes the image. - A gcsUri string URI to a Google Cloud Storage bucket location. data can be only one of the following:bytesBase64Encodedstring
The base64-encoded bytes of the image.
gcsUristring
The Google Cloud Storage URI of the image. The URI must be in gs:// format.
| JSON representation |
|---|
{ "mimeType": string, // data "bytesBase64Encoded": string, "gcsUri": string // Union type } |
ProductImageConfig
Configuration for the product image.
Mode used to control the segmentation logic.
dilationnumber
(Optional) Factor for dilating the mask. Valid values are in [0.0, 1.0]. If unset, dilation defaults to 0.
productDescriptionstring
(Optional) A text description of the product.
| JSON representation |
|---|
{
"maskMode": enum ( |
PersonImage
An image of a person. The model generates a virtual try-on image with the supplied image of the person wearing the garments from productImages.
Required. An image of a person to try-on the clothing product. The following values are supported: - A bytesBase64 encoded string that encodes the image. - A gcsUri string URI to a Google Cloud Storage bucket location.
| JSON representation |
|---|
{
"image": {
object ( |