carson-katri / dream-textures

Stable Diffusion built-in to Blender
GNU General Public License v3.0
7.82k stars 427 forks source link

Add CoreML backend #658

Open carson-katri opened 1 year ago

carson-katri commented 1 year ago

This adds a new backend for macOS that uses apple/ml-stable-diffusion. Models are converted to CoreML automatically on their first use.

To build the package backend, use the new package_backend.py script:

/Applications/Blender\ 3.5.app/Contents/Resources/3.5/python/bin/python3.10 scripts/package_backend.py --backend community_backends/coreml --output __packaged__

If the requirements.txt file within the backend is unchanged, it can be built faster with --no-deps.