apple / ml-stable-diffusion

Stable Diffusion with Core ML on Apple Silicon
MIT License
16.79k stars 935 forks source link

Could not initialize NNPACK! Reason: Unsupported hardware. #12

Open alelordelo opened 1 year ago

alelordelo commented 1 year ago

Thanks Apple ML team for this!

I got this warning: Could not initialize NNPACK! Reason: Unsupported hardware.

Is this expected?

Torch version 1.13.0 has not been tested with coremltools. You may run into unexpected errors. Torch 1.12.1 is the most recent version that has been tested. !!! macOS 13.1 and newer or iOS/iPadOS 16.2 and newer is required for best performance !!! INFO:main:Initializing StableDiffusionPipeline with stabilityai/stable-diffusion-2-base.. Fetching 12 files: 100%|█████████████████████| 12/12 [00:00<00:00, 10409.85it/s] INFO:main:Done. INFO:main:Converting vaedecoder **[W NNPACK.cpp:53] Could not initialize NNPACK! Reason: Unsupported hardware._** /usr/local/Caskroom/miniforge/base/envs/coreml_stable_diffusion/lib/python3.8/site-packages/diffusers/models/resnet.py:109: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! assert hidden_states.shape[1] == self.channels /usr/local/Caskroom/miniforge/base/envs/coreml_stable_diffusion/lib/python3.8/site-packages/diffusers/models/resnet.py:122: TracerWarning: Converting a tensor to a Python boolean might cause the trace to be incorrect. We can't record the data flow of Python values, so this value will be treated as a constant in the future. This means that the trace might not generalize to other inputs! if hidden_states.shape[0] >= 64:

joaorafaelm commented 1 year ago

same for me, and I installed torch==1.12.1, same error

vlsalsa commented 1 year ago

same here. Torch 1.13.0 though.

JakubMazur commented 1 year ago

anyone figured this out? same issue same versions

YangSuoly commented 1 year ago

Torch 1.13.1 and Venture 13.2.1 on Mac, same issue for me, any solution for this problem?

gschian0 commented 1 year ago

I am getting this error too.... should we just wait ?