CoreMLStableDiffusion

Maintained By
Guernika

CoreMLStableDiffusion

PropertyValue
AuthorGuernika
LicenseCreativeML OpenRAIL-M
PlatformApple CoreML

What is CoreMLStableDiffusion?

CoreMLStableDiffusion is a specialized toolkit designed to convert and run Stable Diffusion models on Apple devices using CoreML framework. Created by Guernika, this implementation enables efficient deployment of Stable Diffusion models on iOS, iPadOS, and macOS platforms, with specific optimizations for Apple Neural Engine (ANE).

Implementation Details

The toolkit provides both GUI-based and command-line conversion utilities, supporting various model formats including Hugging Face models, local models, and CKPT files. It implements sophisticated attention mechanisms with options for SPLIT_EINSUM and ORIGINAL implementations, optimized for ANE deployment.

  • Supports model chunking for mobile deployment (sub-1GB chunks)
  • Includes comprehensive resource bundling for text tokenization
  • Provides automated conversion pipeline with error checking
  • Offers both easy and advanced conversion modes

Core Capabilities

  • Convert PyTorch Stable Diffusion models to CoreML format
  • Split UNet models for iOS/iPadOS compatibility
  • Bundle necessary resources for text tokenization
  • Support multiple attention implementations
  • Verify output correctness against original PyTorch models

Frequently Asked Questions

Q: What makes this model unique?

This implementation is specifically optimized for Apple devices, featuring specialized attention mechanisms and model chunking capabilities that make it possible to run Stable Diffusion on iOS and iPadOS devices efficiently.

Q: What are the recommended use cases?

The model is ideal for developers looking to implement Stable Diffusion on Apple platforms, particularly for iOS and iPadOS applications where memory constraints require optimized model deployment. It's particularly useful for applications requiring on-device image generation without cloud dependencies.

🍰 Interesting in building your own agents?
PromptLayer provides Huggingface integration tools to manage and monitor prompts with your whole team. Get started here.