Earlier quoted context omitted.
For comparison, it's also taking ~3min @ 50 iterations on my 12c Threadripper using OpenVino. It sounds like the improvements bring the M1 performance roughly in line with a GTX 1080.
I have Macbook Air M1, which is passively cooled. When cooled properly, that is thermal pad mod combined with a fan under the laptop, I'm getting closer to 2min - something like 2.8s per iteration. I guess it would be something 140s for 50 iterations on a MacBook Pro or Mac mini for M1.
Stable Diffusion with Core ML on Apple Silicon
61–70 of 184 posts
Re: Stable Diffusion with Core ML on Apple Silicon
#62Re: Stable Diffusion with Core ML on Apple Silicon
#63The author has a detailed blogpost outlining how he modified the model to use Metal on iOS devices. https://liuliu.me/eyes/stretch-iphone-to-its-limit-a-2gib-mo...
Re: Stable Diffusion with Core ML on Apple Silicon
#64This may sound naive, but what are some use cases of running SD models locally? If the free/cheap options exist (like running SD on powerful servers), then what's the advantage of this new method?
Soon you will be able to render home imovies like they were edited by the team that made the dark knight (which costs ~$100k/min if done professionally).
but seriously, I wonder when you'll be able to paste in a script, and get out a storyboard or a movie
Re: Stable Diffusion with Core ML on Apple Silicon
#65Re: Stable Diffusion with Core ML on Apple Silicon
#66For the uninitiated, which MacOS GUI app is this library most likely to show up in first/best? DiffusionBee?
Re: Stable Diffusion with Core ML on Apple Silicon
#67Atila 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
i'm very ignorant here so forgive me but if it can generate images that fast can it be used to generate a video?
Re: Stable Diffusion with Core ML on Apple Silicon
#68How come you always have to install some version of pytorch or tensor flow to run these ml models? When I'm only doing inference shouldn't there be easier ways of doing that, with automatic hardware selection etc. Why aren't models distributed in a standard format like onnx, and inference on different platforms solved once per platform?
I imagine that here apple wants to highlight a more research/interactive use, for example to allow fine tuning SD on a few samples from a particular domain (a popular customization).
[1] https://onnxruntime.ai/docs/execution-providers/CoreML-Execu...
Re: Stable Diffusion with Core ML on Apple Silicon
#69How come you always have to install some version of pytorch or tensor flow to run these ml models? When I'm only doing inference shouldn't there be easier ways of doing that, with automatic hardware selection etc. Why aren't models distributed in a standard format like onnx, and inference on different platforms solved once per platform?
Re: Stable Diffusion with Core ML on Apple Silicon
#70Earlier 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…
I think whether you need a virtualenv depends on your system python version and compatibility of any of the dependencies, but it's also pretty nice to be able to spin up or blow away envs without bloating your main python directory or worrying that you're overwriting dependencies for a different project.