UniversalEmbedderOptions interface

Options to configure the MediaPipe Universal Embedder Task.

Signature:

export declare interface UniversalEmbedderOptions 

Properties

Property Modifiers Type Description
baseOptions UniversalEmbedderBaseOptions Base options specifying the model asset and WebGPU device.
textDelegate UniversalEmbedderDelegate Optional backend for the text encoder. Defaults to baseOptions.delegate.
visionDelegate UniversalEmbedderDelegate Optional backend for the vision encoder. Defaults to baseOptions.delegate.
audioDelegate UniversalEmbedderDelegate Optional backend for the audio encoder. Defaults to baseOptions.delegate.
l2Normalize boolean Whether to L2-normalize the output embedding vector. Defaults to true.
maxInputLength number Optional maximum sequence length (in tokens) for text encoder signatures.
visionTokensPerImage number Optional vision tokens per image for vision encoder signatures.
activationDataType ActivationDataType Optional activation data type for model execution.

UniversalEmbedderOptions.baseOptions

Base options specifying the model asset and WebGPU device.

Signature:

baseOptions: UniversalEmbedderBaseOptions;

UniversalEmbedderOptions.textDelegate

Optional backend for the text encoder. Defaults to baseOptions.delegate.

Signature:

textDelegate?: UniversalEmbedderDelegate;

UniversalEmbedderOptions.visionDelegate

Optional backend for the vision encoder. Defaults to baseOptions.delegate.

Signature:

visionDelegate?: UniversalEmbedderDelegate;

UniversalEmbedderOptions.audioDelegate

Optional backend for the audio encoder. Defaults to baseOptions.delegate.

Signature:

audioDelegate?: UniversalEmbedderDelegate;

UniversalEmbedderOptions.l2Normalize

Whether to L2-normalize the output embedding vector. Defaults to true.

Signature:

l2Normalize?: boolean;

UniversalEmbedderOptions.maxInputLength

Optional maximum sequence length (in tokens) for text encoder signatures.

Signature:

maxInputLength?: number;

UniversalEmbedderOptions.visionTokensPerImage

Optional vision tokens per image for vision encoder signatures.

Signature:

visionTokensPerImage?: number;

UniversalEmbedderOptions.activationDataType

Optional activation data type for model execution.

Signature:

activationDataType?: ActivationDataType;