How does this compare with using the Hugging Face `diffusers` package with MPS acceleration through PyTorch Nightly? I was under the impression that that used CoreML under the hood as well to convert the models so they ran on the Neural Engine.
Stable Diffusion with Core ML on Apple Silicon
11–20 of 184 posts
Re: Stable Diffusion with Core ML on Apple Silicon
#12Atila 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
Maybe a dumb question but can the old model still be run?
Re: Stable Diffusion with Core ML on Apple Silicon
#13Atila 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
SD2 is the one that was neutered, right? Maybe a dumb question but can the old model still be run?
Re: Stable Diffusion with Core ML on Apple Silicon
#14Atila 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
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".
Re: Stable Diffusion with Core ML on Apple Silicon
#15Atila 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
SD2 is the one that was neutered, right? Maybe a dumb question but can the old model still be run?
Re: Stable Diffusion with Core ML on Apple Silicon
#16Atila 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?
https://mezha.media/en/2022/10/06/google-is-working-on-image...
Give it some time and SD will be able to do the same.
Re: Stable Diffusion with Core ML on Apple Silicon
#17Atila 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
#18Atila 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
Re: Stable Diffusion with Core ML on Apple Silicon
#19Atila 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
SD2 is the one that was neutered, right? Maybe a dumb question but can the old model still be run?
Re: Stable Diffusion with Core ML on Apple Silicon
#20Atila 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".