The first time I've read about AI image generation was when Midjourney was released. Their community showcase showed the most refined, detailed generated images. I played around but couldn't get the same quality as the showcase images. Time for me to see which tools I could use to generate images locally.
In this article I will use some terms regarding AI image generation:
After some time a friend introduced me to Draw Things This was a special app. Instead of a cloud service, these AI images were generated on my iPhone!. When installed, it downloads the models and off you go. I was blown away that this actually ran locally on iOS.
When Stable Diffusion and Dall-E were introduced, I thought this was only for people with a decent video card in their computer. Fortunately my Mac Studio could achieve way more than I expected.
My Mac Studio is nothing fancy. Just the cheapest one out there with a Apple M1 Max and 32GB of RAM, running MacOS Ventura 13.1
Of course, running iOS apps on macOS is possible with an Apple Sillicon processor. Draw Things turns out to have a wonderful desktop user interface (UI), which makes it very simple to use on your desktop Mac.
Installing the appropriate models could be difficult for many programs. The majority of the time, downloading the models requires going to a website. For Draw Things, however, all you need to do is choose your chosen model, and Draw Things will download it immediately.
I really wondered where all the models were downloaded because they take lots of diskspace. After some searching I've found ~/Library/Containers/
which contains the folder Draw Things
. This folder will show up in your terminal as a large GUID like 7D9459A9-60E1-4A50-84AC-D23B3F10478F
, therefore use Finder. This probably differs per computer. In this folder you'll find Data/Library/Application Support/model_zoo
which contains all the models
The first app I've used on my Mac Studio was DiffusionBee It is described as “Stable Diffusion App for AI Art”. DiffusionBee supports: Text to Image, Image to Image, Inpainting and Outpainting.
DiffusionBee is able to load custom models. Unfortunately I didn’t succeed in loading any custom model successfully.
With new techniques and innovation in the field of AI image generation I noticed DiffusionBee wasn’t keeping up. Their Github showed a last commit of November 23 last year. Time to look for another tool.
When I first stated DiffusionBee it downloaded 8.5 GB of AI models. Since I don’t have infinite disk space I was quite curious where all these models were stored. In my homedir it created a .diffusionbee
folder. Here are all models and generated images stored.
Mochi Diffusion which currently only supports text to image was the second tool I explored. It had a great advantage over DiffusionBee: Core ML support.
Core ML is optimized for on-device performance of a broad variety of model types by leveraging Apple hardware and minimizing memory footprint and power consumption.
Given that I use a Mac, this was a major advantage. Mochi Diffusion is a native Mac app working on the Core ML framework. A framework tailored for the M1 processor in my computer. This was a significant improvement over DiffusionBee. Due to the fact that DiffusionBee is an Electron application, MacOS functionalities were not utilized.
Development on Mochi Diffusion is very active. They release their work at an astounding rate. At the moment, I see a new release virtually daily. It currently just supports text to image. I have no doubt that they'll eventually add image to picture and other features.
There is a catch to all this greatness. Since Mochi Diffusion is using Core ML, you can only use AI models compiled to Core ML models. Fortunately the developers composed a list on Hugging Face with all converted Core ML models. Hidden in their wiki there is a page on How to convert ckpt or safetensors files to Core ML
In Mochi Diffusion it is completely up to you where you store your models. In the app prefereces you can set the model location to any folder you'd like.
My final tool is AUTOMATIC1111's Stable Diffusion web UI; "A browser interface based on Gradio library for Stable Diffusion", as they describe it. It supports Text to Image, Image to Image, Inpainting, Outpainting, upscaling and many other features are supported.
The UI differs from the former mentioned tools. This is a web application which needs to be start in the terminal. After starting you can access the Stable Diffusion web UI in your browser.
The main disadvantage is this right away. For the other tools, all you have to do is download the models and copy them to your application folder. To even begin using the Stable Diffusion web UI, you must first install Python and a few other utilities. One of my upcoming posts will go into detail about these steps.
For me this tool is best one I've found so far to run on my Mac. The header of this article is generated with Stable Diffusion web UI as well. If you like to recreate this image use the following settings:
Model: openjourney-v2
Prompt: illustration of Artificial intelligence
Steps: 30
Sampler: Euler a
CFG scale: 7
Seed: 7
Size: 1024x512
Directly in the Stable Diffusion web UI folder there is a folder called models
with various subfolders for all the models. I'll place mine in the Stable-diffusion
child folder.
Mochi Diffusion is, in my opinion, the best software to start with if you're fresh to the topic of AI picture production. DiffusionBee is always a backup option if you truly need inpainting.
Try the Stable Diffusion web UI once you are familiar with all of the AI jargon used in the product. It is by far the most thorough and comprehensive user interface I've ever used. At first, the sheer number of setup options could be a little intimidating. The default settings, in my opinion, are excellent for getting started.