lmstudio-ai / lmstudio-ai/mlx-engine

Cross-Post: Images processed with MLX vision models are downsized to 500px long edge

Open
#206 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
1.2k
Forks
133
Avg merge
21h 6m
Merged PRs (30d)
1

Description

Sorry for the crosspost: https://github.com/lmstudio-ai/lmstudio-bug-tracker/issues/880
Don't know where to file the bug report.

Which version of LM Studio?
LM Studio 0.3.23 Build 1

Which operating system?
MacOS 15.6

What is the bug?
According to the log, every image analyzed with MLX Vision models in LM Studio is automatically downscaled to 500px on the edge. The generated results are very inaccurate. The problem appears to be limited to the MLX format, as the downscaling message only appears in the log for MLX models. GGUF models don't show the message. It happens via API as well as via Chat in the GU. If one runs the same prompt and image on Ollama with the same model in GGUF format the results are much better.

Logs
[JIT] Requested model (google/gemma-3n-e4b) is not loaded. Loading "google/gemma-3n-e4b" now...
[ModelKit][INFO] Loading model from /Volumes/EXTERN/lmstudio/lmstudio-community/gemma-3n-E4B-it-MLX-4bit...
2025-08-09 17:29:57 [DEBUG]
Using a slow image processor as use_fast is unset and a slow processor was saved with this model. use_fast=True will be the default behavior in v4.52, even if the model was saved with a slow processor. This will result in minor differences in outputs. You'll still be able to use a slow processor with use_fast=False.
2025-08-09 17:30:00 [DEBUG]
[Gemma3nVisionAddOn][INFO] Vision add-on loaded successfully from /Volumes/EXTERN/lmstudio/lmstudio-community/gemma-3n-E4B-it-MLX-4bit
[ModelKit][INFO] Model loaded successfully

[Prompts removed]

[custom_resize][INFO] Image 1: Original size (500, 333)
[custom_resize][INFO] Image 1: No resize needed

To Reproduce
Steps to reproduce the behavior:

Load MLX vision model
Upload image with more than 500px on the long edge to the chat via GUI.
Send some prompt like "Describe the image contents"
Look for the custom_resize messages to appear.

Contributor guide

Open the contributing guide

Research direction

Start by reproducing the report with an MLX vision model through the GUI and API using an image whose long edge exceeds 500px, then inspect the custom_resize log messages. Compare the MLX behavior with the reported GGUF behavior. Done means the MLX path no longer downsizes such images unexpectedly and vision results can be verified against the input resolution.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
machine-learning
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.