Blaizzy / mlx-vlm

MLX-VLM is a package for running Vision LLMs locally on your Mac using MLX.
MIT License
144 stars 12 forks source link

Update load_image function to handle BytesIO input #34

Closed gabewillen closed 1 month ago

gabewillen commented 1 month ago

The load_image function in mlx_vlm/utils.py is now updated to accept input as BytesIO representing base64 encoded images. This enhances the loading process by accommodating another type of input. Appropriate error handling has been added for potential IO errors.

Blaizzy commented 1 month ago

Hey @gabewillen

Thanks for the great addition!

Before I merge, could you run pre-commit to clear the tests?

gabewillen commented 1 month ago

Hey @gabewillen

Thanks for the great addition!

Before I merge, could you run pre-commit to clear the tests?

Absolutely I got ahead of myself on the PR. Apologies I was in the process of following your CONTRIBUTION.md before you commented. It should be good to go now.

Blaizzy commented 1 month ago

Absolutely I got ahead of myself on the PR. Apologies I was in the process of following your CONTRIBUTION.md before you commented. It should be good to go now.

Any other changes you want to make before I merge ?

Blaizzy commented 1 month ago

Merged 👌🏽

Thank you for the contribution @gabewillen!

gabewillen commented 1 month ago

Absolutely I got ahead of myself on the PR. Apologies I was in the process of following your CONTRIBUTION.md before you commented. It should be good to go now.

Any other changes you want to make before I merge ?

Not right now but I plan to use this library for a fun project with my kids. Any additions I make I'll be glad to contribute. Excellent work on the library!

Blaizzy commented 1 month ago

It will be available on the next release.

Blaizzy commented 1 month ago

@gabewillen what’s your Twitter handle ?

gabewillen commented 1 month ago

@gabewillen what’s your Twitter handle ?

I don't have a personal one but I do have one for a project I'm working on https://x.com/StateforwardOrg

gabewillen commented 1 month ago

I also have a tool I'm getting ready to release that builds dependency graphs of libraries and autogenerates mkdoc compatible documentation using OpenAI. if you'd be interested I can run it on your project. It works really well.

gabewillen commented 1 month ago

It injects the documentation without modifying any of the code