+0
Daily
+0
Weekly
-2
Monthly
7,972
stars
366
forks
58
watchers
266
prs
151
issues
63
releases
README
Mochi Diffusion
Run Stable Diffusion and FLUX.2 Klein on Mac natively
English,
한국어,
中文
!Screenshot
Mochi Diffusion is a native macOS app for generating images locally using Apple's Core ML Stable Diffusion implementation to achieve maximum performance and speed with reduced memory requirements, and the Iris pipeline for running FLUX.2 Klein and Z-Image Turbo models with native Metal GPU acceleration
Features
- Generate images locally and completely offline
- Generated images are saved as PNG with their generation settings, which AUTOMATIC1111-compatible tools and Civitai uploads can read (view in Finder's Get Info window)
- Built-in gallery with import/save/sync support
- macOS native app using SwiftUI
Downloads
- Mochi Diffusion
- Latest version
- Core ML Stable Diffusion
- Community models
- ControlNet models
- Stable Diffusion 1.5 with ControlNet
- FLUX.2 Klein
- FLUX.2-klein-4B (distilled)
- FLUX.2-klein-9B (distilled)
- Z-Image Turbo
Models
You will need model files. Mochi Diffusion supports Core ML Stable Diffusion, FLUX.2 Klein, and Z-Image Turbo.
Core ML Stable Diffusion
Mochi Diffusion uses Stable Diffusion models which have been specially converted (Core ML) to run on Apple hardware. The advantage of this is that they are extremely fast and memory efficient, especially on Apple Silicon Macs with Neural Engine. The downside is that each model can only generate images of a fixed size which is baked in during the conversion.
Stable Diffusion allows generating images based on another “starting image”, or with ControlNet
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.
Usage
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:
/
└── MochiDiffusion/
└── models/
├── stable-diffusion-2-1_split-einsum_compiled/
│ ├── merges.txt
│ ├── TextEncoder.mlmodelc
│ ├── Unet.mlmodelc
│ ├── VAEDecoder.mlmodelc
│ ├── VAEEncoder.mlmodelc
│ └── vocab.json
├── ...
└── ...
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.
FLUX.2 Klein
No conversion is required for FLUX.2 Klein models.
Klein can use up to 4 “input images” in generations.