rovo79 / mochi-diffusion

Run Stable Diffusion on Apple Silicon Macs natively

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Mochi Diffusion

Run Stable Diffusion on Apple Silicon Macs natively

Screenshot

Description

This app uses Apple's Core ML Stable Diffusion implementation to achieve maximum performance and speed on Apple Silicon based Macs while reducing memory requirements.

Features

  • Generates images locally and completely offline
  • Extremely memory efficient compared to PyTorch (~4GB)
  • Generated images are saved with prompt info inside EXIF metadata
  • Can use custom Stable Diffusion Core ML models
  • No worries about pickled models
  • macOS native app using SwiftUI

Releases

Download the latest version from the releases page.

Running

When trying to open the app for the first time, Gatekeeper will prevent you from doing so because the app is not code signed. In order to bypass this warning, you need to right-click on the app and select "Open". You will have to do this twice in order to get the option to open the app.

Models

You will need to convert or download Core ML models in order to use Mochi Diffusion.

Download preconverted Stable Diffusion v1.5 model here or few others I've converted here.

  1. Convert or download Core ML models (do one of the following)
  2. Open Mochi Diffusion and in the sidebar click the button with the Folder icon next to the Models list to open the models folder
  3. Create a new folder with the name of the model you want displayed in Mochi Diffusion
  4. Move all Core ML model & related files to the newly created folder
  5. Repeat steps 3 & 4 for each model

Compatibility

  • Apple Silicon (M1 and later), macOS Ventura 13.1 and later, Xcode 14.2 (to build)
  • Performance (after initial generation, which is slower)
    • ~10s in macOS on MacBook Pro M1 Max (64 GB).
    • ~20s in macOS on MacBook Pro M1 Pro (32 GB).

Privacy

All generation happens locally and absolutely nothing is sent to the cloud.

Credits

About

Run Stable Diffusion on Apple Silicon Macs natively

License:GNU General Public License v3.0


Languages

Language:Swift 100.0%