Expand description
CPU-side image preprocessing for Qwen3-VL vision inputs.
Decodes base64 JPEG/PNG images, resizes to a grid snapped to
patch_size × spatial_merge_size, normalizes with ImageNet stats,
and produces a flat f32 tensor ready for the GPU vision encoder.
Functions§
- preprocess_
image - Preprocess a single base64-encoded image for the Qwen3-VL encoder.
- preprocess_
image_ with_ max_ pixels - Preprocess an image with an optional max-pixels cap, matching vLLM-style
multimodal processor controls.
Nonepreserves Atlas’ historical 1280px long-side cap.