Live data from Hacker News

Stable Diffusion with Core ML on Apple Silicon

machinelearning.apple.com

81–90 of 184 posts

Re: Stable Diffusion with Core ML on Apple Silicon

#81
post #14
post #2

Atila from Apple on the expected performance: > For distilled StableDiffusion 2 which requires 1 to 4 iterations instead of 50, the same M2 device should generate an image in https://twitter.com/atiorh/status/1598399408160342039

With the full 50 iterations it appears to be about 30s on M1. They have some benchmarks on the github repo: https://github.com/apple/ml-stable-diffusion For reference, previously I was getting about <3 minutes for 50 iterations on my Macbook Air M1. I haven't yet tried Apple's implementation but it looks like a huge improvement. It might take it from "possible" to "usable".

Haven't tried this yet, but sounds slower than SD itself if you use one of the alt builds that supports mps where it had been cuda.

Mac Studio with M1 Ultra gets 3.3 iters/sec for me.

MacBook Pro M1 Max gets 2.8 iters/sec for me.

Re: Stable Diffusion with Core ML on Apple Silicon

#82
post #2

Atila from Apple on the expected performance: > For distilled StableDiffusion 2 which requires 1 to 4 iterations instead of 50, the same M2 device should generate an image in https://twitter.com/atiorh/status/1598399408160342039

Last nail in the coffin for DALL·E.

The true metric contains the output quality of the image, not just the speed. DALL-E output is, generally, much better for things that aren't standard looking.

Re: Stable Diffusion with Core ML on Apple Silicon

#83
post #77

Earlier quoted context omitted.

If you told me this was possible when I bought an M1 Pro less than a year ago, I wouldn’t believe you. This is insane.

Agreed. And the posted benchmarks for the M2 Macbook Air make me consider 'upgrading' to an Air.

That laptop feels like liquid power. It's uncanny.

Macbook Airs (way back when) felt sluggish. The MBA M1 changed that, it was "fine". These M2s are unexpectedly responsive on an ongoing basis.

The MacBook Pro M1 Max is great (would be fantastic except they lost a Thunderbolt port in favor of legacy HDMI and memory card jacks), but you expect that machine to be responsive, so it's less surprising.

The Studio Ultra, though, never slows down for anything.

Still, if the Air could drive two external screens instead of one, I'd "downgrade" from the Max.

Re: Stable Diffusion with Core ML on Apple Silicon

#84
post #14

Earlier quoted context omitted.

With the full 50 iterations it appears to be about 30s on M1. They have some benchmarks on the github repo: https://github.com/apple/ml-stable-diffusion For reference, previously I was getting about <3 minutes for 50 iterations on my Macbook Air M1. I haven't yet tried Apple's implementation but it looks like a huge improvement. It might take it from "possible" to "usable".

Haven't tried this yet, but sounds slower than SD itself if you use one of the alt builds that supports mps where it had been cuda. Mac Studio with M1 Ultra gets 3.3 iters/sec for me. MacBook Pro M1 Max gets 2.8 iters/sec for me.

You’re talking about the higher end SKUs with many more GPU cores though and significantly more RAM (I think the lowest you can get is 32GB vs the 8 on their chip)

Re: Stable Diffusion with Core ML on Apple Silicon

#85
post #82

Earlier quoted context omitted.

Last nail in the coffin for DALL·E.

The true metric contains the output quality of the image, not just the speed. DALL-E output is, generally, much better for things that aren't standard looking.

If that's the metric, MidJourney --v 4 --q 2 is the leader, and it's not close.

Re: Stable Diffusion with Core ML on Apple Silicon

#86
post #45

Earlier quoted context omitted.

A bit different take is DiffusionBee, if you're curious to try it out in a GUI form. https://diffusionbee.com

I’ve used this a fair amount but am not sure it’s much better place to begin than automatic1111, especially for the HN crowd.

automatic1111 does have an M1 workaround in the wiki, but it is incorrect

it's correct enough that if you know your way around a CLI, git, and package management you can figure it out

Re: Stable Diffusion with Core ML on Apple Silicon

#87
post #56

Earlier quoted context omitted.

On the one hand, I appreciate the attempt to bring this stuff into the realm of "double click to run" boneheads like me, but on the other hand, I really despise Electron apps when they're multi-platform, where such use is somewhat understandable if still despicable. For a Mac-only app to use Electron… Why do they hate us so?

I'm baffled by continued hate on Electron. The option isn't between Electron and a lean OS-native application, but between Electron and nothing. I can build an Electron app in under a day with a pretty UI. It would take me several months to get anything sensible that is OS native. And I'm not going to sit down and learn the alternative. So please just say "thank you" to the developers that are sharing free things wit…

While I agree the posters comment felt entitled, it should be possible to pick up and make a SwiftUI version of the app fairly quickly.

I assume the developer went for electron due to familiarity, but it would be a pretty good exercise for someone to port it to SwiftUI and native Swift for the front end.

I would do it myself but sadly am bound by other clauses.

Re: Stable Diffusion with Core ML on Apple Silicon

#88

Earlier quoted context omitted.

That’s DreamBooth. There are some services that will do it for you.

Thanks!

I’m making one of those services, if you are interested, please reach me at my email. I would like to know what you have in mind regarding your grandmothers

Re: Stable Diffusion with Core ML on Apple Silicon

#89

For the uninitiated, which MacOS GUI app is this library most likely to show up in first/best? DiffusionBee?

automatic111's webui typically gets the most frequent updates. Middling easy to install.

Great, thank you. Look like there’s already a GH issue: https://github.com/AUTOMATIC1111/stable-diffusion-webui/issu...

Re: Stable Diffusion with Core ML on Apple Silicon

#90

Earlier quoted context omitted.

All I had to do was: - create a virtual environment (Python 3.8.15 worked best) - upgrade pip - pip install wheel - pip install -r requirements.txt - and then, python setup.py install - Had to update my XCode to use the generated mlpackage files :/ - Expand drawer with instructions and follow them to download model and convert it to Core ML format - Run their CLI command as mentioned

Where did you get those instructions from? Is creating a virtual environment necessary if I'm fine with it running on my real system? I assume the environment part is what the "conda" commands on the GitHub repo readme are doing, but finding "conda" to install seems to be its own process. It's not on MacPorts, pip seems to only install a Python package instead of an executable, and getting a package from some other s…

> finding conda to install seems to be its own process

    brew install miniconda
brew comes from:

    /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
Don't take my word for it, visit https://brew.sh.
Post reply on HN