Voltar ao ranking

MochiDiffusion/MochiDiffusion

Swift

Run Stable Diffusion on Mac natively

appleapple-siliconmacosstable-diffusioncoremlaneneural-engineswiftswiftui
Crescimento de estrelas
Estrelas
7.9k
Forks
362
Crescimento semanal
Issues
3
2k4k6k
dez. de 2022fev. de 2024mai. de 2025jul. de 2026
README

Mochi Diffusion

Run Stable Diffusion and FLUX.2 Klein on Mac natively

English, 한국어, 中文

Screenshot

Features

  • Apple's Core ML Stable Diffusion implementation to achieve maximum performance and speed on Apple Silicon based Macs while reducing memory requirements
  • Extremely fast and memory efficient (~150MB with Neural Engine)
  • Runs well on all Apple Silicon Macs by fully utilizing Neural Engine
  • Generate images locally and completely offline
  • Generate images based on an existing image (commonly known as Image2Image)
  • Generate images using ControlNet
  • Generated images are saved with prompt info inside EXIF metadata (view in Finder's Get Info window)
  • Built-in gallery with import/save/sync support
  • Use custom Stable Diffusion Core ML models
  • No worries about pickled models
  • macOS native app using SwiftUI
  • Iris FLUX.2 (Klein) pipeline support

Downloads

Latest version

Community models

ControlNet models

Stable Diffusion 1.5 with ControlNet

FLUX.2-klein-4B (distilled)

FLUX.2-klein-9B (distilled)

When using a model for the very first time, it may take up to 2 minutes for the Neural Engine to compile a cached version. Afterwards, subsequent generations will be much faster.

Compute Unit

  • CPU & Neural Engine provides a good balance between speed and low memory usage
  • CPU & GPU may be faster on M1 Max, Ultra and later but will use more memory

Depending on the option chosen, you will need to use the correct model version (see Models section for details).

Models

You will need Core ML Stable Diffusion or FLUX.2 Klein models in order to use Mochi Diffusion.

Core ML Stable Diffusion

  1. Convert or download Core ML models
    • split_einsum version is compatible with all compute unit options including Neural Engine
    • original version is only compatible with CPU & GPU option
  2. By default, the app's model folder will be created under your home directory. This location can be customized under Settings
  3. In the model folder, create a new folder with the name you'd like displayed in the app then move or extract the converted models here
  4. Your directory structure should look like this:
<Home Directory>/
└── MochiDiffusion/
    └── models/
        ├── stable-diffusion-2-1_split-einsum_compiled/
        │   ├── merges.txt
        │   ├── TextEncoder.mlmodelc
        │   ├── Unet.mlmodelc
        │   ├── VAEDecoder.mlmodelc
        │   ├── VAEEncoder.mlmodelc
        │   └── vocab.json
        ├── ...
        └── ...

FLUX.2 Klein

No conversion is required for FLUX.2 Klein models.

  1. Download the text_encode, tokenizer, transformer, and vae for a FLUX.2 Klein model from the Downloads links above (or use download_model.sh)
  2. Place in MochiDiffusion's model folder
  3. Your directory structure should look like this:
<Home Directory>/
└── MochiDiffusion/
    └── models/
        ├── flux-klein-4b/
        │   ├── text_encoder/
        │   ├── tokenizer/
        │   ├── transformer/
        │   └── vae/
        ├── ...
        └── ...        

(see iris.c issue #12) for specific guidance for flux-klein-4b)

Compatibility

  • Apple Silicon (M1 and later)
  • macOS 15.6 and later
  • Xcode 26.0 or later (to build)

Privacy

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

Contributing

Mochi Diffusion is always looking for contributions, whether it's through bug reports, code, or new translations.

  • If you find a bug, or would like to suggest a new feature or enhancement, try searching for your problem first as it helps avoid duplicates. If you can't find your issue, feel free to create a new issue. Don't create an issue for your question as those are for bugs and feature requests only.

  • If you're looking to contribute code, feel free to open a Pull Request. I recommend installing swift-format to catch lint issues.

  • If you'd like to translate Mochi Diffusion to your language, please visit the project page on Crowdin. You can create an account for free and start translating and/or approving.

Credits

Repositórios relacionados
jaywcjlove/awesome-mac

 This project is dedicated to collecting high-quality macOS software and organizing them systematically by different categories for easy search and use.

SwiftCreative Commons Zero v1.0 Universalmacossoftware
git.io/macx
108.4k8.2k
dkhamsing/open-source-ios-apps

:iphone: Collaborative List of Open-Source iOS Apps

Creative Commons Zero v1.0 Universaliosswift
51.3k6k
utmapp/UTM

Virtual machines for iOS and macOS

SwiftApache License 2.0utmqemu
getutm.app
34.7k1.8k
MonitorControl/MonitorControl

🖥 Control your display's brightness & volume on your Mac as if it was a native Apple Display. Use Apple Keyboard keys or custom shortcuts. Shows the native macOS OSDs.

SwiftMIT Licensemacoskeyboard
monitorcontrol.app
33.8k983
CodeEditApp/CodeEdit

📝 CodeEdit App for macOS – Elevate your code editing experience. Open source, free forever.

SwiftMIT Licensemacosapple
codeedit.app
23k1.2k
drduh/macOS-Security-and-Privacy-Guide

Community guide to securing and improving privacy on macOS.

MIT Licenseapplemacos
drduh.github.io/macOS-Security-and-Privacy-Guide/
22.5k1.5k
nikitabobko/AeroSpace

AeroSpace is an i3-like tiling window manager for macOS

SwiftMIT Licensei3wmmacos
nikitabobko.github.io/AeroSpace/guide
21.9k597
trycua/cua

Scale computer-use 2.0 with open-source drivers, cross-OS fleets, and benchmarks for training, evaluation, and data generation.

HTMLMIT Licenseapplecua
cua.ai
20.4k1.4k
iCHAIT/awesome-macOS

 A curated list of awesome applications, softwares, tools and shiny things for macOS.

macosmac
18.9k1.3k
seemoo-lab/openhaystack

Build your own 'AirTags' 🏷 today! Framework for tracking personal Bluetooth devices via Apple's massive Find My network.

SwiftGNU Affero General Public License v3.0appleoffline-finding
owlink.org
13.2k663
SVProgressHUD/SVProgressHUD

A clean and lightweight progress HUD for your iOS and tvOS app.

Objective-CMIT Licenseobjective-chud
github.com/SVProgressHUD/SVProgressHUD
12.5k2.7k
futurice/ios-good-practices

Good ideas for iOS development, by Futurice developers.

Otherbest-practicesswift
futurice.com
11k1.2k