Open DylanSpeiser opened 1 year ago
You have to use the option "--bundle-resources-for-swift-cli" then specify that path for the "--resource-path".
I have.
What does your "mlpackages" directory look like?
When you are using the download script from here https://huggingface.co/blog/diffusers-coreml You have to change line 6 and 7 to the following:
repo_id = "apple/coreml-stable-diffusion-2-base"
variant = "original/compiled"
I guess you have not downloaded the compiled models.
python -m python_coreml_stable_diffusion.torch2coreml --convert-unet --convert-text-encoder --convert-vae-decoder --convert-safety-checker -o ./models --bundle-resources-for-swift-cli
Ran the commands in the readme, checked them twice, they succeeded, but generation doesn't work: `% swift run StableDiffusionSample "a photo of an astronaut riding a horse on mars" --resource-path mlpackages/ --seed 93 --output-path outputs/
Building for debugging...
Build complete! (0.10s)
Loading resources and creating pipeline
(Note: This can take a while the first time using these resources)
Error: The file “merges.txt” couldn’t be opened because there is no such file.`