unable to load in LM studio
🥲 Failed to load the model
Failed to load model
Error when loading model: ValueError: Unsupported model type: glm4v_vision
any idea how to load it?
This error occurs because the version of mlx-vlm currently available on PyPI (the standard pip install) is slightly behind the model's new architecture.[1] The model type glm4v_vision was recently added to the code but hasn't been bundled into a stable release yet.
To fix this on your M1 Pro, you need to install the development version directly from the source code.
The Fix: Install from GitHub
Uninstall the old version:
pip uninstall mlx-vlm -y
Install the latest version from the GitHub repository:
pip install git+https://github.com/Blaizzy/mlx-vlm.git
Update essential dependencies:
Sometimes the model logic requires the latest transformers as well:
pip install -U transformers torchvision
Why this happens (Technical explanation)
The AutoGLM-Phone-9B model uses a specific vision tower configuration called glm4v_vision.[1] In older versions of the mlx-vlm library, the code only recognized older GLM vision types.[1] By installing from the GitHub repo, you are getting the updated vision.py file that includes glm4v_vision in its allowed model types.
I have tried the ai written solution.
And it works, yours might not be m1 or m2 or macbook silicon, but it is a option to try out.