combs_media/lib.rs
1//! # combs-media
2//!
3//! Media preprocessing — the traits-first basic block for non-text
4//! modalities. Vision (SigLIP-style image preprocessing) ships first;
5//! audio (mel spectrogram) lands here in the next phase. Preprocessors are
6//! plain host-side code (no GPU dependency) producing normalized tensors
7//! the runtime hands to the model's `embed_multimodal`.
8
9mod images;
10
11pub use images::{ImagePreprocessor, PixelBatch, SiglipPreprocessor};
12
13/// Errors produced while decoding or preprocessing media.
14#[derive(Debug, thiserror::Error)]
15pub enum MediaError {
16 /// The payload could not be decoded as an image.
17 #[error("image decode failed: {0}")]
18 Decode(String),
19 /// The payload had an unsupported or empty shape.
20 #[error("bad media shape: {0}")]
21 BadShape(String),
22}
23
24/// Convenient result alias for this crate.
25pub type Result<T> = std::result::Result<T, MediaError>;