Run Stable Diffusion on Your M1 Mac’s GPU

This page summarizes the projects mentioned and recommended in the original post on news.ycombinator.com

SaaSHub - Software Alternatives and Reviews
SaaSHub helps you find the best software and product alternatives
www.saashub.com
featured
  1. stable-diffusion

    Discontinued This version of CompVis/stable-diffusion features an interactive command-line script that combines text2img and img2img functionality in a "dream bot" style interface, a WebGUI, and multiple features and other enhancements. [Moved to: https://github.com/invoke-ai/InvokeAI] (by lstein)

    Depends what fork you're running... Some seem to be using CPU-based generation, others use the MPS device backend correctly which is MUCH faster. I have another comment floating around about lstein's fork, but it takes some massaging to get it to run happily. https://github.com/lstein/stable-diffusion/tree/fix-cuda-res...

  2. SaaSHub

    SaaSHub - Software Alternatives and Reviews. SaaSHub helps you find the best software and product alternatives

    SaaSHub logo
  3. stable-diffusion

    Running lstein's fork with these requirements[0] but seeing this output[1]. Same steps as original guide otherwise.

    Anyone got any ideas?

    [0] https://github.com/bfirsh/stable-diffusion/blob/lstein/requi...

    [1] https://gist.github.com/bfirsh/594c50fd9b2e6b173e31de753a842...

  4. stable-diffusion

    A latent text-to-image diffusion model

    If you look at the substance of the changes being made to support Apple Silicon, they're essentially detecting an M* mac and switching to PyTorch's Metal backend.

    So, yeah PyTorch is correctly serving as a 'glue'.

    https://github.com/CompVis/stable-diffusion/commit/0763d366e...

  5. stable-diffusion-webui

    Discontinued Stable Diffusion web UI [Moved to: https://github.com/sd-webui/stable-diffusion-webui] (by hlky)

    There are several packages that provide web UIs, like this one for example: https://github.com/hlky/stable-diffusion-webui

    It's not quite the ease of setup of an Electron app, but once setup it's pretty easy to use.

  6. stable-diffusion-intel-mac

    Comment from github: "By the way, i confirmed to work on my Intel 16-in MacBook Pro via mps. GPU (Radeon Pro 5500M 8GB) usage is 70-80% and It takes 3 min where --n_samples 1 --n_iter 1. My repo https://github.com/cruller0704/stable-diffusion-intel-mac"

  7. InvokeAI

    About Invoke 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, and serves as the foundation for multiple commercial products. (by magnusviri)

    Magnusviro [0], the original author of the SD M1 repo credited in this article, has merged his fork into the Lstein Stable Diffusion repo [1], and you can now run Lstein fork with M1 as of a few hours ago.

    This adds a ton of functionality - GUI, Upscaling & Facial improvements, weighted subprompts etc.

    This has been a big undertaking over the last few days, and I highly recommend checking it out.

    [0] https://github.com/magnusviri/stable-diffusion

  8. stable-diffusion-rocm

    I have it working on an RX 6800, used the scripts from this repo[0] to build a docker image that has ROCm drivers and PyTorch installed.

    I'm running Ubuntu 22.04 LTS as the host OS, didn't have to touch anything beyond the basic Docker install. Next step is build a new Dockerfile that adds in the Stable Diffusion WebUI.[1]

    [0] https://github.com/AshleyYakeley/stable-diffusion-rocm

  9. stable_diffusion.openvino

    Yes, you can run it on your Intel CPU: https://github.com/bes-dev/stable_diffusion.openvino

    There are hundreds of ways to run it in the cloud (and even more coming every hour!) I think this one is the most popular: https://colab.research.google.com/github/altryne/sd-webui-co...

  10. invisible-watermark

    python library for invisible image watermark (blind image watermark)

    What's this log message about when generating an image?

    Creating invisible watermark encoder (see https://github.com/ShieldMnt/invisible-watermark)...

  11. stable-diffusion

  12. cog

    Containers for machine learning

  13. tvm

    Open Machine Learning Compiler Framework

    As mentioned in sibling comments, Torch is indeed the glue in this implementation. Other glues are TVM[0] and ONNX[1]

    These just cover the neural net though, and there is lots of surrounding code and pre-/post-processing that isn't covered by these systems.

    For models on Replicate, we use Docker, packaged with Cog for this stuff.[2] Unfortunately Docker doesn't run natively on Mac, so if we want to use the Mac's GPU, we can't use Docker.

    I wish there was a good container system for Mac. Even better if it were something that spanned both Mac and Linux. (Not as far-fetched as it seems... I used to work at Docker and spent a bit of time looking into this...)

    [0] https://tvm.apache.org/

  14. onnx

    Open standard for machine learning interoperability

  15. stable-diffusion

  16. sd-webui-colab

    Discontinued A repo for the maintenance of the Colab version of stable-diffusion-webui repo

  17. gradi

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts

Did you know that Jupyter Notebook is
the 15th most popular programming language
based on number of references?