Interface UpscaleImageConfig

Configuration for upscaling an image.

For more information on this configuration, refer to the Imagen API reference documentation <https://cloud.google.com/vertex-ai/generative-ai/docs/model-reference/imagen-api>_.

interface UpscaleImageConfig {
    abortSignal?: AbortSignal;
    enhanceInputImage?: boolean;
    httpOptions?: HttpOptions;
    imagePreservationFactor?: number;
    includeRaiReason?: boolean;
    outputCompressionQuality?: number;
    outputGcsUri?: string;
    outputMimeType?: string;
}

Properties

abortSignal?: AbortSignal

Abort signal which can be used to cancel the request.

NOTE: AbortSignal is a client-only operation. Using it to cancel an operation will not cancel the request in the service. You will still be charged usage for any applicable operations.

enhanceInputImage?: boolean

Whether to add an image enhancing step before upscaling. It is expected to suppress the noise and JPEG compression artifacts from the input image.

httpOptions?: HttpOptions

Used to override HTTP request options.

imagePreservationFactor?: number

With a higher image preservation factor, the original image pixels are more respected. With a lower image preservation factor, the output image will have be more different from the input image, but with finer details and less noise.

includeRaiReason?: boolean

Whether to include a reason for filtered-out images in the response.

outputCompressionQuality?: number

The level of compression. Only applicable if the output_mime_type is image/jpeg.

outputGcsUri?: string

Cloud Storage URI used to store the generated images.

outputMimeType?: string

The image format that the output should be saved as.