apple / ml-stable-diffusion

Stable Diffusion with Core ML on Apple Silicon
MIT License
16.46k stars 886 forks source link

Error computing NN outputs. #100

Open EthanSK opened 1 year ago

EthanSK commented 1 year ago

On Macos 13.1

I get this error when running this command python -m python_coreml_stable_diffusion.torch2coreml --model-version stabilityai/stable-diffusion-2-base --convert-unet --convert-text-encoder --convert-vae-decoder --convert-safety-checker --convert-vae-encoder --bundle-resources-for-swift-cli --check-output-correctness --attention-implementation SPLIT_EINSUM -o ../Generated/CoreML/StableDiffusion2-base/SPLIT_EINSUM


INFO:__main__:Saved unet into ../Generated/CoreML/StableDiffusion2-base/SPLIT_EINSUM/Stable_Diffusion_version_stabilityai_stable-diffusion-2-base_unet.mlpackage
Traceback (most recent call last):
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 196, in _run_module_as_main
    return _run_code(code, main_globals, None,
  File "/opt/homebrew/Cellar/python@3.10/3.10.8/Frameworks/Python.framework/Versions/3.10/lib/python3.10/runpy.py", line 86, in _run_code
    exec(code, run_globals)
  File "/Users/ethansarif-kattan/Projects/3rd-party-ai-projects/ml-stable-diffusion/python_coreml_stable_diffusion/torch2coreml.py", line 1120, in <module>
    main(args)
  File "/Users/ethansarif-kattan/Projects/3rd-party-ai-projects/ml-stable-diffusion/python_coreml_stable_diffusion/torch2coreml.py", line 1000, in main
    convert_unet(pipe, args)
  File "/Users/ethansarif-kattan/Projects/3rd-party-ai-projects/ml-stable-diffusion/python_coreml_stable_diffusion/torch2coreml.py", line 775, in convert_unet
    coreml_unet.predict(coreml_sample_unet_inputs).values())[0]
  File "/opt/homebrew/lib/python3.10/site-packages/coremltools/models/model.py", line 509, in predict
    return self.__proxy__.predict(data)
RuntimeError: {
    NSLocalizedDescription = "Error computing NN outputs.";
}
MFatBrainbox commented 1 week ago

Hey @EthanSK was it 13.1 issue?