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

Gradio option for Qwen2-VL-2B-Instruct-4bit - failed #198

Open
MaTriXy opened this issue Feb 2, 2025 · 3 comments
Open

Gradio option for Qwen2-VL-2B-Instruct-4bit - failed #198

MaTriXy opened this issue Feb 2, 2025 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@MaTriXy
Copy link

MaTriXy commented Feb 2, 2025

Hi,
I'm getting this issue when running the command :
❯ python -m mlx_vlm.chat_ui --model mlx-community/Qwen2-VL-2B-Instruct-4bit This is a beta version of the video understanding. It may not work as expected. added_tokens.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████| 392/392 [00:00<00:00, 1.49MB/s] special_tokens_map.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 613/613 [00:00<00:00, 946kB/s] config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.41k/1.41k [00:00<00:00, 9.53MB/s] chat_template.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████| 1.05k/1.05k [00:00<00:00, 9.20MB/s] model.safetensors.index.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████| 108k/108k [00:00<00:00, 11.6MB/s] preprocessor_config.json: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████| 567/567 [00:00<00:00, 3.01MB/s] tokenizer_config.json: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████| 4.30k/4.30k [00:00<00:00, 31.8MB/s] merges.txt: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.67M/1.67M [00:00<00:00, 2.77MB/s] vocab.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████| 2.78M/2.78M [00:00<00:00, 9.16MB/s] tokenizer.json: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 11.4M/11.4M [00:00<00:00, 11.5MB/s] model.safetensors: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████| 1.25G/1.25G [00:30<00:00, 40.7MB/s] Fetching 11 files: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:31<00:00, 2.84s/it] Fetching 11 files: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████| 11/11 [00:00<00:00, 8087.18it/s] Traceback (most recent call last):█████████████████████████████████████████████████████████████████████████████████████▏ | 10.5M/11.4M [00:00<00:00, 11.1MB/s] File "<frozen runpy>", line 198, in _run_module_as_main File "<frozen runpy>", line 88, in _run_code File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/mlx_vlm/chat_ui.py", line 26, in <module> model, processor = load(args.model, {"trust_remote_code": True}) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/mlx_vlm/utils.py", line 275, in load model = apply_lora_layers(model, adapter_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/site-packages/mlx_vlm/trainer/utils.py", line 139, in apply_lora_layers adapter_path = Path(adapter_path) ^^^^^^^^^^^^^^^^^^ File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pathlib.py", line 1162, in __init__ super().__init__(*args) File "/Library/Frameworks/Python.framework/Versions/3.12/lib/python3.12/pathlib.py", line 373, in __init__ raise TypeError( TypeError: argument should be a str or an os.PathLike object where __fspath__ returns a str, not 'dict'

@jasonwillschiu
Copy link

same error for me, first time trying mlx-vlm

@arogister
Copy link

I confirm the same issue is still there with mlx-vlm 0.1.14 , and not just with Qwen2-VL.

@Blaizzy
Copy link
Owner

Blaizzy commented Feb 24, 2025

Thanks guys!

I will fix this in the next release :)

@Blaizzy Blaizzy added the bug Something isn't working label Feb 24, 2025
@Blaizzy Blaizzy self-assigned this Feb 24, 2025
@Blaizzy Blaizzy mentioned this issue Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants