invoke-ai / InvokeAI

InvokeAI is a leading creative engine for Stable Diffusion models, empowering professionals, artists, and enthusiasts to generate and create visual media using the latest AI-driven technologies. The solution offers an industry leading WebUI, supports terminal use through a CLI, and serves as the foundation for multiple commercial products.
https://invoke-ai.github.io/InvokeAI/
Apache License 2.0
22.38k stars 2.32k forks source link

[enhancement]: Add MLX as MPS alternative #6160

Open l0stl0rd opened 3 months ago

l0stl0rd commented 3 months ago

Is there an existing issue for this?

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

psychedelicious commented 3 months ago

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.