MyGit

MochiDiffusion/MochiDiffusion

Fork: 351 Star: 7490 (更新于 2024-12-11 00:10:16)

license: GPL-3.0

Language: Swift .

Run Stable Diffusion on Mac natively

最后发布版本: v5.1 ( 2024-03-16 09:30:06)

GitHub网址

Mochi Diffusion

Run Stable Diffusion 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)
  • Convert generated images to high resolution (using RealESRGAN)
  • Autosave & restore images
  • Use custom Stable Diffusion Core ML models
  • No worries about pickled models
  • macOS native app using SwiftUI

Downloads

Latest version

Community models

ControlNet models

Stable Diffusion 1.5 with ControlNet

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 to convert or download Core ML models in order to use Mochi 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
        ├── ...
        └── ...

Compatibility

  • Apple Silicon (M1 and later)
  • macOS Sonoma 14.0 and later
  • Xcode 15.2 (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

最近版本更新:(数据更新于 2024-10-07 22:36:58)

2024-03-16 09:30:06 v5.1

2024-01-26 04:50:46 v5.0

2024-01-02 22:35:52 v4.7.1

2023-12-24 13:00:12 v4.7

2023-12-07 04:00:14 v4.6

2023-11-09 03:21:05 v4.5

2023-10-10 01:02:57 v4.4

2023-10-05 11:00:35 v4.3.1

2023-09-28 13:34:57 v4.3

2023-08-08 02:49:03 v4.2

主题(topics):

ane, apple, apple-silicon, coreml, macos, neural-engine, stable-diffusion, swift, swiftui

MochiDiffusion/MochiDiffusion同语言 Swift最近更新仓库

2024-12-21 13:48:53 argmaxinc/WhisperKit

2024-12-19 06:06:30 stripe/stripe-ios

2024-12-16 23:43:56 wordpress-mobile/WordPress-iOS

2024-12-04 20:33:05 Artificial-Pancreas/iAPS

2024-12-03 10:12:09 utmapp/UTM

2024-11-25 23:11:48 Alamofire/Alamofire