To run inference, please clone Apple's repo:  
```bash
git clone https://github.com/apple/ml-stable-diffusion
cd ml-stable-diffusion
```  
And then use Apple's command line tool, [Swift Package Manager](https://www.swift.org/package-manager/#):  
```bash
swift run StableDiffusionSample --resource-path models/coreml-stable-diffusion-v1-4_original_compiled --compute-units all "a photo of an astronaut riding a horse on mars"
```  
You have to specify in `--resource-path` one of the checkpoints downloaded in the previous step, so please make sure it contains compiled Core ML bundles with the extension `.mlmodelc`. The `--compute-units` has to be one of these values: `all`, `cpuOnly`, `cpuAndGPU`, `cpuAndNeuralEngine`.  
For more details, please refer to the [instructions in Apple's repo](https://github.com/apple/ml-stable-diffusion).
/Users/nielsrogge/Documents/python_projecten/diffusers/docs/source/en/optimization/coreml.md