Media generation input format for the Virtual Try On model.
prompt
string
The text prompt describing the desired image.
productImages[]
object (ProductImage)
Required. A single product image to try on the person.
personImage
object (PersonImage)
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.
image
object (Image)
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.
maskImage
object (Image)
(Optional) The mask image associated with this product. If provided, the mask image is used to guide the image editing.
productImageConfig
object (ProductImageConfig)
The configuration for the product image.
| JSON representation |
|---|
{ "image": { object ( |
Image
Represents the input image and metadata for virtual try-on.
mimeType
string
The MIME type of the image. The following values are supported: - image/jpeg - image/png
data
Union type
bytesBase64 encoded string that encodes the image. - A gcsUri string URI to a Google Cloud Storage bucket location. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:bytesBase64Encoded
string
The base64-encoded bytes of the image.
gcsUri
string
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.
maskMode
enum (MaskMode)
Mode used to control the segmentation logic.
dilation
number
(Optional) Factor for dilating the mask. Valid values are in [0.0, 1.0]. If unset, dilation defaults to 0.
productDescription
string
(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.
image
object (Image)
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 ( |