stable_diffusion.openvino
stable_diffusion.openvino copied to clipboard
Does this project work on Mac M1 CPU?
I tried but always failed in below line of code: self.unet = self.core.compile_model(self._unet, device) There is error when compiling unet, with error "node input index is out of range". Does the error due to unsupported M1 CPU? Thanks.
@IPL no, this project doesn't work on Mac M1 CPU, only x86_64 compatible CPU
@IPL By first installing the rust compiler with "brew install rust", then editing requirements.txt to delete the version number from numpy and switching openvino to openvino-arm I was able to get it to fully install on my M1. However, the diffusion is failing now due to lack of weights being installed. I haven't had time to debug that but hopefully this information helps you make progress on your system.
even if it would work the speed would be horrible, as the m1 would emulate the x86_64 stuff
@IPL and @JanzenMark see this https://replicate.com/blog/run-stable-diffusion-on-m1-mac
Thanks @tfmoraes . Worked great! And fast too. Getting 1.5s / iteration.
@tfmoraes @IPL @JustinGuese you can try to use non-official OpenVINO ARM package https://pypi.org/project/openvino-arm with OpenVINO ARM plugin https://github.com/openvinotoolkit/openvino_contrib/tree/master/modules/arm_plugin underneath
If you are willing to run the docker version then try forcing docker to run in x86-64 emulation mode on the Mac M1:
Change
FROM python:3.9.9-bullseye
To
FROM --platform=linux/amd64 python:3.9.9-bullseye
Since OpenVINO 2022.3, pip openvino package is available natively for Apple M1 / M2 https://pypi.org/project/openvino/2022.3.0/#files
even if it would work the speed would be horrible, as the m1 would emulate the x86_64 stuff
M1 can emulate any x86 code as if it's nothing, I don't think that is an issue at all.