SIGN IN SIGN UP

fix(lfm2-vl): image requests died on an upstream arity bug

mlx-vlm 0.5.0 lfm2_vl.Model.__call__ invokes its own
get_input_embeddings(input_ids, pixel_values, spatial_shapes,
pixel_attention_mask) with four positional arguments, while that method is
declared (self, input_ids=None, pixel_values=None, **kwargs) and reads the
extras out of kwargs. Every image prompt to LFM2.5-VL therefore failed with
"get_input_embeddings() takes from 1 to 3 positional arguments but 5 were
given" before any Metal work; text-only prompts never take that path, which
is why the model otherwise loads and serves normally.

The compat layer now accepts the extra positionals and forwards them as the
keywords the body already looks for. Keyword callers are unaffected and the
patch is idempotent, matching the other mlx-vlm compat patches.

LFM2.5-VL-3B-MLX-4bit resolves through the registry as expected:
"matched text_config.model_type='lfm2' (wrapper='lfm2_vl') -> lfm2".
J
Jinho Jang committed
928139c7fce79095c1a2d97ff7e845df7de49996
Parent: c69267a