For those as keen as I am to try this out, I ran these steps, only to run into an error during the pip install phase: > ERROR: Failed building wheel for onnx I was able to resolve it by doing this: > brew install protobuf Then I ran pip install again, and it worked!
What kind of speed does this run at? Eg. How long to make a 512x512 image at standard settings?
Run Stable Diffusion on Your M1 Mac’s GPU
241–250 of 415 posts
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#242Earlier quoted context omitted.
Is that the difference in graphics performance between the M1 and M1 Pro or did the other person do something wrong? 70-90 minutes seems nuts
Might be the RAM difference. RAM is shared between CPU and GPU on the M1 series processors.
Looks like RAM drastically affects the speed.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#243The difference between an M2 air (8gb/512gb) versus an M1 pro (16gb/1tb) is much more than I expected. * M1 pro (16gb/1tb) can run the model in around 3 minutes. * M2 air (8gb/512gb) takes ~60 minutes for the same model. I knew there would be some throttling due to the m2 air's fanless model, but I had no idea it would be a 20x difference (albeit, the m1 pro does have double the RAM. I don't have any other macbooks t…
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#244Earlier quoted context omitted.
Do they depend on CUDA, or are they just much better tuned for NVIDIA cards? I thought the whole ML ecosystem was based on training models and then running them on frameworks, where model was sorta like data and the framework handles the hardware? (albeit with models that can be tweaked to run more efficiently on different hardware) (I don't really know the ecosystem so it is definitely possible that they are more cl…
The latter. The major frameworks, at least, can be run in CPU-only mode, with a hardware abstraction layer for other devices (like CUDA-capable cards, TPUs etc). So practically it means you need an Nvidia GPU to get anywhere in a reasonable amount of time, but if you're not super dependent on latency (for inference) then CPU is an option. In principle, CPUs can run much bigger model inputs (at the expense of even mor…
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#245How fast is it on a m1?
The answer depends VERY MUCH on RAM. My M1 with 8GB takes 70-90 minutes per image. My M1 Pro with 16GB takes 3 minutes per image.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#246Earlier quoted context omitted.
are there benchmarks? I was following the github issue and the CPU bound one was at 4-5 minutes, the MDS one was at 30 seconds, then 18 seconds, and people were still calling that slow. What is it currently at now? and I don't know what "fast" is, to compare What are the Windows 10 with nice Nvidia chips w/ CUDA getting? Just curious whats comprehensive
> What are the Windows 10 with nice Nvidia chips w/ CUDA getting? Are you referring to single iteration step times, or whole images? Because obviously it depends on the number of iteration steps used. Windows 10, RTX 2070 (laptop model), lstein repo. I get about 3.2 iter/sec. A 50 step 512x512 image takes me 15 seconds.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#247I keep running into issues, even after installing Rust in my condo environment (using conda). Specifically the issue seems to be building wheels for `tokenizers`: warning: build failed, waiting for other jobs to finish... error: build failed error: `cargo rustc --lib --message-format=json-render-diagnostics --manifest-path Cargo.toml --release -v --features pyo3/extension-module -- --crate-type cdylib -C 'link-args=-…
`pip install tokenizers==0.11.6` first
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#248Turns out I don't really want thousands of good images. I want a handful of excellent ones.
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#249Earlier quoted context omitted.
If you open up the script txt2img and img2img scripts, there is a content filter. If your prompt generated anything that gets detected as "inappropriate" the image is replaced with Rick Astley. Removing the censor should be pretty straightforward, just comment out those lines.
It bothers me that this isn't just configurable. Why would they not want to expose this as a feature?
Re: Run Stable Diffusion on Your M1 Mac’s GPU
#250Earlier quoted context omitted.
I hope this kickstarts some kind of M1 migration. There are so many ML projects I'd like to try, but they all depend on CUDA.
Yep, I was just thinking the same thing. M1/M2 appears to be a huge untapped resource for ML stuff as this proves. I maxed out my MBP Max and this is probably the first time I'm actually fully using the GPU cores and it's pretty freaking cool. Creating landscapes or fictional characters (think D&D) is already super fun, I look forward to playing with img2img some more as well.