pub fn served_size(
w: u32,
h: u32,
grid: u32,
max_pixels: Option<u64>,
) -> (u32, u32)Expand description
2026-09-26: The (w, h) the server encodes for a w × h source.
Copies the scale and grid rounding of
metrale_model_layers::vision_preprocess::target_size_for, which is
crate-private and in a crate metrale-bench does not link. It omits the
engine’s last step, which shrinks a side one grid unit at a time while the
rounded area is over max_pixels. max_pixels is an area, as with
--vision-max-pixels; None applies the 1280 px fallback clamp.