Run It

Generating Images Locally

Stable Diffusion, running entirely on your own hardware - what tool to start with, what VRAM actually gets you, and where new images and models come from.

14 minute read

A different ecosystem than Ollama

Everything else in this pillar runs on Ollama. Image generation doesn't - it's a separate world built around Stable Diffusion, an open model family trained specifically to turn text prompts into images, with its own tools and its own hardware demands.

If Building a Full PC for Local AI was on your radar because of image generation specifically, this is the guide that cashes in that reasoning.

The good news: it's just as free and just as private as everything else here. Nothing about a prompt or a generated image leaves your machine.

Picking an interface

Three tools dominate local Stable Diffusion, and they trade off simplicity against control:

ToolBest forTradeoff
FooocusGetting started with minimal setupFewer advanced controls
AUTOMATIC1111The most widely used, most documented optionRequires Python and a bit more setup
ComfyUIFull control over the generation pipelineA real learning curve - node-based, not beginner-first

Start with Fooocus. It bundles sensible defaults and a simple interface, so you're generating images in minutes rather than debugging a Python environment first. Download it from its GitHub releases page, extract it, and run the included launcher - no separate install steps beyond that on Windows.

On Mac or Linux, or if you outgrow Fooocus: AUTOMATIC1111 is the community standard and works well cross-platform. It installs via a normal git clone plus a setup script, the same shape as most of the tools covered elsewhere on this site:
git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui.git
cd stable-diffusion-webui
./webui.sh
The first run downloads several gigabytes of dependencies automatically - that's normal, and only happens once.

VRAM and speed

Image generation is more VRAM-hungry per second of use than chat, because it's doing dense image math instead of predicting one token at a time.

4GB Minimum Runs older SD 1.5 models at modest resolutions.
8GB Comfortable Handles SDXL, the current standard model family, well.
12GB+ Power user Room for larger batches and higher resolutions.

CPU-only generation works, technically - but where a chat response takes seconds, a CPU-only image can take several minutes. If you're doing this regularly, a GPU stops being optional the way it can be for chat.

Getting a model

Fooocus and AUTOMATIC1111 both need at least one model checkpoint - the actual trained weights, separate from the interface itself. Hugging Face hosts the official Stable Diffusion releases and is the most straightforward source for a first model. Download the checkpoint file and drop it into the interface's models folder (Fooocus and AUTOMATIC1111 both show you this path on first run).

Community model sites vary in moderation. Sites like CivitAI host a huge range of community-trained models, including some with adult content mixed into general listings - use official Hugging Face releases if you'd rather not deal with that at all, and pay attention to what you're downloading either way.

What actually goes wrong

"CUDA out of memory" errors

Your GPU doesn't have enough VRAM for the resolution or batch size you asked for. Lower the resolution first - most interfaces also have a low-VRAM mode (AUTOMATIC1111's launch flags include --medvram and --lowvram) that trades speed for fitting into less memory.

Generation is extremely slow

Confirm the tool is actually using your GPU, not silently falling back to CPU - this happens most often when GPU drivers are outdated or missing, the same failure mode covered in Building a Full PC for Local AI. Check the interface's console output on startup; it usually states which device it's running on.

Images come out completely wrong or corrupted-looking

This is almost always a mismatched model type - loading an SDXL checkpoint with settings meant for SD 1.5, or vice versa. Check that the checkpoint's expected settings (resolution, in particular) match what the interface is configured for.

Common questions

Does Ollama do image generation too?
No. Ollama is built for text models. Image generation runs on a separate ecosystem - Stable Diffusion and the tools built around it - installed and run independently of Ollama.
Can I do this without a GPU?
Technically yes, but expect minutes per image instead of seconds. Image generation leans on a GPU far more heavily than text models do - see Building a Full PC for Local AI if this is your main reason for wanting one.

Go deeper

This guide covers one solid path. Here's where to go if you want something different.

Written from hands-on security operations experience. More about this site →