Expand description
2026-09-25: CPU-side image preprocessing for the vision encoder. Decodes a
base64 image, resizes it onto a grid of patch_size × spatial_merge_size
cells, normalises it with the checkpoint’s mean and std, and lays the
patches out as a flat f32 tensor.
Owner: model-layers (vision input). Invariants: none beyond the types.
Functions§
- preprocess_
image - 2026-09-25: Preprocess one base64-encoded image with no
max_pixelsbound. - preprocess_
image_ with_ max_ pixels - 2026-09-25:
preprocess_imagewith an optional area boundmax_pixels(seetarget_size_for).