Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chat UI from readme fails #186

Open
andimarafioti opened this issue Jan 22, 2025 · 0 comments
Open

Chat UI from readme fails #186

andimarafioti opened this issue Jan 22, 2025 · 0 comments

Comments

@andimarafioti
Copy link
Contributor

I installed the project from source in a new environment and tried to launch the chat_ui using the instructions in the readme, but it fails with a parsing error. It seems to come from some internal code changes. I'm using python 3.11.11

❯ python -c "import mlx_vlm; print(mlx_vlm.__version__)"
0.1.11
❯ python -m mlx_vlm.chat_ui --model mlx-community/Qwen2-VL-2B-Instruct-4bit
Fetching 11 files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:00<00:00, 27995.96it/s]
Fetching 11 files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:00<00:00, 20717.26it/s]
Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/Users/andresmarafioti/Documents/SmolVLM250M/.venv/lib/python3.11/site-packages/mlx_vlm/chat_ui.py", line 26, in <module>
    model, processor = load(args.model, {"trust_remote_code": True})
                       ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/andresmarafioti/Documents/SmolVLM250M/.venv/lib/python3.11/site-packages/mlx_vlm/utils.py", line 275, in load
    model = apply_lora_layers(model, adapter_path)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/Users/andresmarafioti/Documents/SmolVLM250M/.venv/lib/python3.11/site-packages/mlx_vlm/trainer/utils.py", line 139, in apply_lora_layers
    adapter_path = Path(adapter_path)
                   ^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/pathlib.py", line 871, in __new__
    self = cls._from_parts(args)
           ^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/pathlib.py", line 509, in _from_parts
    drv, root, parts = self._parse_args(args)
                       ^^^^^^^^^^^^^^^^^^^^^^
  File "/opt/homebrew/Cellar/[email protected]/3.11.11/Frameworks/Python.framework/Versions/3.11/lib/python3.11/pathlib.py", line 493, in _parse_args
    a = os.fspath(a)
        ^^^^^^^^^^^^
TypeError: expected str, bytes or os.PathLike object, not dict
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant