apple / ml-stable-diffusion

Stable Diffusion with Core ML on Apple Silicon
MIT License
16.89k stars 942 forks source link

Unable to deploy successfully!!!(NSUnderlyingError = "Error Domain=com.apple.CoreML Code=110) #132

Open RedHeartSecretMan opened 1 year ago

RedHeartSecretMan commented 1 year ago

I tried the tutorial twice and failed. The conversion process worked fine, but every time I ran it, I got the same bug, a RuntimeError, as follows:

{
NSLocalizedDescription = "at /private/var/folders/by/x6cy7zw172l9rf0_2mf8lzrm0000gn/T/Stable_Diffusion_version_CompVis_stable-diffusion-v1-4_text_encoder_23D43949-0557-4315-9E32-EC72F2C9E510.mlmodelc/model.mil:10:244: Error parsing MIL model: at /private/var/folders/by/x6cy7zw172l9rf0_2mf8lzrm0000gn/T/Stable_Diffusion_version_CompVis_stable-diffusion-v1-4_text_encoder_23D43949-0557-4315-9E32-EC72F2C9E510.mlmodelc/model.mil:10:244: Could not open /private/var/folders/by/x6cy7zw172l9rf0_2mf8lzrm0000gn/T/Stable_Diffusion_version_CompVis_stable-diffusion-v1-4_text_encoder_23D43949-0557-4315-9E32-EC72F2C9E510.mlmodelc/weights/weight.bin";
    NSUnderlyingError = "Error Domain=com.apple.CoreML Code=110 \"(null)\"";
}

The following is the main log content of the pop-up error:

 File "/opt/homebrew/Caskroom/miniconda/base/envs/apple/lib/python3.8/site-packages/coremltools/models/model.py", line 553, in predict
    raise self._framework_error
  File "/opt/homebrew/Caskroom/miniconda/base/envs/apple/lib/python3.8/site-packages/coremltools/models/model.py", line 144, in _get_proxy_and_spec
    return _MLModelProxy(filename, compute_units.name), specification, None

Below is a brief description of my running environment:

macOS 13.2.1 (22D68) xcode 14.2 (14C18) python 3.8.16 python-coreml-stable-diffusion 0.1.0 (dev_0 )

Hope to get the solution as soon as possible!

RedHeartSecretMan commented 1 year ago

In addition, I found a problem, maybe it was an oversight of submitting code? The version tag in github is 0.0.2 but _version appears to be 0.0.1 in the source code.