VirtualTryOnModelInstance

Media generation input format for the Virtual Try On model.

Fields
prompt string

The text prompt for generating the images. This is required for both editing and generation.

productImages[] object (ProductImage)

The image of the products to wear on the person.

personImage object (PersonImage)

The image of the person to be edited with the product images.

JSON representation
{
  "prompt": string,
  "productImages": [
    {
      object (ProductImage)
    }
  ],
  "personImage": {
    object (PersonImage)
  }
}

ProductImage

A ProductImage is used to provide the product image and its associated configuration options for Virtual Try On.

Fields
image object (Image)

The actual image data of the reference image.

maskImage object (Image)

The mask image associated with this product. If provided, the mask image will be used to guide the image editing.

productImageConfig object (ProductImageConfig)

A config for the product image.

JSON representation
{
  "image": {
    object (Image)
  },
  "maskImage": {
    object (Image)
  },
  "productImageConfig": {
    object (ProductImageConfig)
  }
}

Image

Input image and metadata.

Fields
mimeType string

The MIME type of the content of the image. Only the images in below listed MIME types are supported. - image/jpeg - image/png

data Union type
The image bytes or Cloud Storage URI to make the prediction on. data can be only one of the following:
bytesBase64Encoded string

Base64 encoded bytes string representing the image.

gcsUri string

The Cloud Storage URI of the image.

JSON representation
{
  "mimeType": string,

  // data
  "bytesBase64Encoded": string,
  "gcsUri": string
  // Union type
}

ProductImageConfig

Config for the product image.

Fields
maskMode enum (MaskMode)

Mode used to control the segmentation logic.

dilation number

Dilation to be used with this Mask.

productDescription string

description of the product.

JSON representation
{
  "maskMode": enum (MaskMode),
  "dilation": number,
  "productDescription": string
}

PersonImage

A PersonImage is used to provide the person image and its associated configuration options for Virtual Try On.

Fields
image object (Image)

The image bytes or Cloud Storage URI of the person or subject that will be edited using the product images.

JSON representation
{
  "image": {
    object (Image)
  }
}