pub struct PreprocessConfig {
pub image_size: usize,
pub patch_size: usize,
pub mean: [f32; 3],
pub std: [f32; 3],
}Expand description
How an image is prepared for a specific vision tower.
Fields§
§image_size: usizeSide length of the square canvas the tower expects, in pixels.
patch_size: usizeSide length of one square patch. Must divide Self::image_size — a
tower’s position-embedding table has exactly (image_size / patch_size)²
entries, so a non-dividing pair describes a model that cannot exist.
mean: [f32; 3]§std: [f32; 3]Implementations§
Trait Implementations§
Source§impl Clone for PreprocessConfig
impl Clone for PreprocessConfig
Source§fn clone(&self) -> PreprocessConfig
fn clone(&self) -> PreprocessConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for PreprocessConfig
Source§impl Debug for PreprocessConfig
impl Debug for PreprocessConfig
Source§impl Default for PreprocessConfig
impl Default for PreprocessConfig
Source§fn default() -> Self
fn default() -> Self
SigLIP-style 512px canvas with 16px patches — SmolVLM’s shape.
A default is offered only so tests and callers have a sane starting point; a real run must take these from the loaded model’s metadata, because guessing them wrong produces plausible-looking garbage rather than an error.
Source§impl PartialEq for PreprocessConfig
impl PartialEq for PreprocessConfig
impl StructuralPartialEq for PreprocessConfig
Auto Trait Implementations§
impl Freeze for PreprocessConfig
impl RefUnwindSafe for PreprocessConfig
impl Send for PreprocessConfig
impl Sync for PreprocessConfig
impl Unpin for PreprocessConfig
impl UnsafeUnpin for PreprocessConfig
impl UnwindSafe for PreprocessConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more