InvokeAI icon indicating copy to clipboard operation
InvokeAI copied to clipboard

[enhancement]: Add MLX as MPS alternative

Open l0stl0rd opened this issue 1 year ago • 1 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

What should this feature add?

As it is getting close to an v1 release I think it might be interesting to add this as an MPS alternative for Mac.

https://github.com/ml-explore/mlx

They also made a Stable Diffusion example: https://github.com/ml-explore/mlx-examples/tree/main/stable_diffusion

Looks like a nice improvement. https://preview.redd.it/benchmarking-apple-silicon-mlx-vs-cuda-v0-7uhzs2iztkgc1.jpg?width=640&crop=smart&auto=webp&s=bc33c7b3efdb45b8e2615c6d27c58ae84dec22b6

Alternatives

No response

Additional Content

No response

l0stl0rd avatar Apr 05 '24 19:04 l0stl0rd

Realistically, it's probably a very large effort to support this. The stable diffusion example they made is nice and all, but there is far more going on than what they have implemented, and we are built around diffusers. Maybe if pytorch and diffusers adopt it, we could use it seamlessly.

psychedelicious avatar Apr 05 '24 21:04 psychedelicious