Table of Contents

Property DefaultImagePayloadPix

Namespace
LMKit.Retrieval
Assembly
LM-Kit.NET.dll

DefaultImagePayloadPix

Gets or sets the maximum pixel count for images when generating vision embeddings.

public int DefaultImagePayloadPix { get; set; }

Property Value

int

The maximum pixel count. The default is 1,048,576 (1024 × 1024).

Examples

LM embeddingModel = LM.LoadFromModelID("embeddinggemma-300m");
RagEngine ragEngine = new RagEngine(embeddingModel);

// Reduce image payload resolution to 512x512 pixels
ragEngine.DefaultImagePayloadPix = 512 * 512;

// Disable image payloads entirely
ragEngine.DefaultImagePayloadPix = 0;

Remarks

The value is clamped between 0 and 4,194,304 pixels (2048 × 2048) inclusive.

Setting this to zero prevents any image payload from being included in generated partitions. When enabled, the payload consists of the image encoded as PNG and then Base64-encoded.

Share