~/runthismodel
daemon okbuild 5a3c91d00:00:00Z

Can M3 Max run Stable Diffusion XL (CoreML)?

S

Yes — runs locally

~74 tok/sec · Instant — feels like typing. No noticeable delay.

Your VRAM
128 GB
Model size
3.5B
Best quant
CoreML
VRAM needed
3.3 GB

The verdict

The M3 Max (128 GB VRAM) handles Stable Diffusion XL (CoreML) comfortably using the CoreML quantization, which fits in 3.3 GB. Expected throughput is around 74 tokens/second, which feels Instant — feels like typing. No noticeable delay. in interactive use. Higher quality image generation. CoreML optimized for iOS. Requires 6GB+ usable memory (iPad/Mac recommended).

Setup tutorial: Stable Diffusion XL (CoreML) on M3 Max

AI-generated, GPU-specific. Verified commands for your exact hardware.

TL;DR

Run Stable Diffusion XL (CoreML) on an Apple M3 Max with Grade S performance, using the CoreML quantization. Expect ~793 tok/sec and 3.3GB VRAM usage.

Prerequisites

Before starting, ensure you have at least 10GB of free disk space, macOS 12.3 or later, and Xcode Command Line Tools installed. You can install Xcode CLT by running `xcode-select --install` in your terminal.

Expected performance

With the Apple M3 Max, expect the model to run at approximately 793 tokens per second, using around 3.3GB of VRAM. Given the 128GB VRAM, you will have 124.7GB of headroom for additional context, allowing for larger batch sizes and more complex image generation tasks.

1. Install runtimeOllama (preferred on Apple Silicon)

brew install ollama
ollama init

2. Download the model

Download the CoreML quantized model (2.8GB) from Hugging Face.

ollama pull apple/coreml-stable-diffusion-xl-base-ios

3. Run it

ollama run apple/coreml-stable-diffusion-xl-base-ios
ollama serve apple/coreml-stable-diffusion-xl-base-ios

4. Optimize for M3 Max

For optimal performance on the Apple M3 Max, leverage the Metal Performance Shaders (MPS) and the Metal framework. Utilize the unified memory architecture to efficiently manage the 128GB VRAM. Ensure that the MPS layers are enabled to take full advantage of the GPU's capabilities. The large VRAM allows for high-resolution image generation without memory constraints.

Troubleshooting

Insufficient VRAM for model execution

Ensure that no other resource-intensive applications are running. Close any unnecessary processes to free up VRAM.

Slow performance or low tok/sec

Check if the MPS layers are enabled. Run `ollama config set use_mps true` to enable them.

Model fails to load

Verify the integrity of the downloaded model files. Re-run the `ollama pull` command to re-download the model.

Alternative runtimes

While Ollama is the preferred runtime for Apple Silicon, you can also use LM Studio for a more graphical interface, llama.cpp for lightweight deployment, or MLX for advanced customization. Jan is another option for those who prefer a web-based interface. Choose the runtime based on your specific needs and preferences.

Other models that run great on M3 Max

FAQ (20)

What GPU do I need to run Stable Diffusion XL (CoreML)?

Stable Diffusion XL (CoreML) is optimized for iOS devices and does not require a specific GPU. It leverages the Metal Performance Shaders (MPS) framework on iPad and Mac.

Is Stable Diffusion XL (CoreML) good for coding?

Stable Diffusion XL (CoreML) is primarily designed for generating high-quality images and is not optimized for coding tasks.

Stable Diffusion XL (CoreML) vs Llama 3.1 8B?

Stable Diffusion XL (CoreML) is an image generation model with 3.5B parameters, while Llama 3.1 8B is a text generation model with 8B parameters. They serve different purposes and are not directly comparable.

Can I run Stable Diffusion XL (CoreML) on a Mac?

Yes, Stable Diffusion XL (CoreML) can run on a Mac, but it requires at least 6GB of usable memory and is optimized for iOS devices like iPads.

How much VRAM does Stable Diffusion XL (CoreML) need?

Stable Diffusion XL (CoreML) requires 3.3 GB of VRAM, which is consistent across different quantization levels.

Is Stable Diffusion XL (CoreML) censored?

The model is not inherently censored, but it adheres to the CreativeML OpenRail-M license, which may have usage guidelines and restrictions.

Is Stable Diffusion XL (CoreML) commercial-use allowed?

Yes, Stable Diffusion XL (CoreML) can be used commercially, but you must comply with the terms of the CreativeML OpenRail-M license.

Stable Diffusion XL (CoreML) context length?

The context length for Stable Diffusion XL (CoreML) is not specified, as it is primarily an image generation model and does not handle text input in the same way as language models.

Want personalized recommendations for your exact setup? Detect my hardware →