Skip to main content

Crate combs_media

Crate combs_media 

Source
Expand description

§combs-media

Media preprocessing — the traits-first basic block for non-text modalities. Vision (SigLIP-style image preprocessing) ships first; audio (mel spectrogram) lands here in the next phase. Preprocessors are plain host-side code (no GPU dependency) producing normalized tensors the runtime hands to the model’s embed_multimodal.

Structs§

PixelBatch
A preprocessed image: planar CHW f32, normalized, ready for Tensor::from_data(TensorData::new(data, [1, c, h, w])).
SiglipPreprocessor
SigLIP / Idefics3 single-image preprocessing (SmolVLM-256M/500M): RGB → resize longest edge to image_size (aspect preserved, bilinear) → pad to a square with 0.5 → rescale 1/255 → normalize mean/std 0.5. (Padding at the normalization mean maps to 0 after normalization.)

Enums§

MediaError
Errors produced while decoding or preprocessing media.

Traits§

ImagePreprocessor
Turns encoded image bytes (PNG/JPEG/WebP) into normalized pixel batches.

Type Aliases§

Result
Convenient result alias for this crate.