★ Reading this for free? Get 25 structured AI courses + per-chapter AI tutor — the first chapter of every course free, no card.Start free in 30 secondsOr own it all: Lifetime $149, pay once
Image Generation

Ollama Image Generation: Run Z-Image & FLUX.2 Locally (2026)

June 20, 2026
9 min read
Local AI Master Research Team

Want to go deeper than this article?

Free account unlocks the first chapter of all 25 courses — RAG, agents, MCP, voice AI, MLOps, real GitHub repos.

📚AI Learning Path

Ollama’s running. Here’s what to build with it. Go from “ollama run” to RAG apps, agents, and fine-tuned models — structured and hands-on. First chapter free.

Start free
Or own it for life — Lifetime $149, pay once

Yes — as of its January 20, 2026 release, Ollama can generate images locally. It is an experimental, macOS-only feature (Windows and Linux are "coming soon") and ships with two models: x/z-image-turbo (Alibaba Tongyi Lab's 6B model, photorealistic with bilingual English/Chinese text) and x/flux2-klein from Black Forest Labs (a fast 4B/9B family). You run them straight from the terminal, e.g. ollama run x/z-image-turbo "a cat holding a sign that says hello world". The best Ollama model for image generation right now is Z-Image-Turbo for quality and FLUX.2 Klein 4B for speed — but for serious work (LoRAs, ControlNet, inpainting) you still want ComfyUI or Forge.

This is genuinely new in 2026, which clears up a common misconception below: Ollama did not generate images before this release. For years it was a text-and-vision (image-in, text-out) runner only. Text-to-image is a fresh, clearly-labeled experimental capability — not something that quietly existed.

Did Ollama always generate images? (Clearing up the misconception)

No. This trips a lot of people up, so let's be precise. Before January 2026, Ollama ran language models and vision models — meaning it could read an image you handed it (with multimodal models like LLaVA or Llama 3.2 Vision) and describe it. It could not create images. There was no text-to-image in Ollama at all.

The January 20, 2026 release added experimental image generation as a distinct feature. So if you remember someone saying "Ollama does images," before 2026 they meant image understanding, not image generation. The two are completely different model types, and only the latter is what this guide is about.

Reading articles is good. Building is better.

Free account = the first chapter of all 25 courses, with a per-chapter AI tutor. No card.

What models can Ollama generate images with in 2026?

There are two, both pulled from Ollama's x/ (experimental) namespace. Here is the verified lineup with real download sizes from the Ollama model pages.

Model tagSourceParamsDefault quant + sizeLicenseBest for
x/z-image-turboAlibaba Tongyi Lab6Bfp8 (default) ~13 GB · bf16 ~33 GBApache 2.0Photorealism, bilingual EN/CN text
x/flux2-klein:4bBlack Forest Labs4B~5.7 GBApache 2.0Fast, commercial-friendly, readable text
x/flux2-klein:9bBlack Forest Labs9B~12 GBFLUX Non-Commercial License v2.1Higher fidelity (non-commercial only)

A few details that matter:

  • Z-Image-Turbo is a "turbo" few-step model. It was built by Alibaba's Tongyi Lab to produce a 1024×1024 image in roughly 8 sampling steps (8 NFEs), which is why it feels fast despite being the highest-quality option here. Its standout feature is accurate bilingual text rendering in English and Chinese — text inside the image actually reads correctly, which most open models botch.
  • FLUX.2 Klein comes in two sizes. The 4B is the default (and the one to start with): small, fast, and Apache 2.0 so you can use outputs commercially. The 9B is sharper but carries Black Forest Labs' FLUX Non-Commercial License v2.1, so do not ship its outputs in a paid product without a commercial agreement.
  • Both also publish smaller quantized tags (e.g. flux2-klein:4b-fp8, z-image-turbo:fp8) if you want a smaller download.

If you want the deeper architecture and ComfyUI workflow for Z-Image specifically, we have a dedicated walkthrough on running Z-Image-Turbo in ComfyUI.

How do I generate images with Ollama? (Exact commands)

First, make sure you are on macOS with a recent Ollama version — image generation does not run on Windows or Linux yet. Then pull and run a model. The model downloads on first run.

# Z-Image-Turbo (Alibaba Tongyi, 6B) — quality + bilingual text
ollama run x/z-image-turbo "a cat holding a sign that says hello world"

# FLUX.2 Klein 4B (Black Forest Labs) — fast, commercial-friendly
ollama run x/flux2-klein "a neon-lit Tokyo street at night, photorealistic"

# FLUX.2 Klein 9B — higher fidelity (non-commercial license)
ollama run x/flux2-klein:9b "a watercolor fox in a misty forest"

By default the generated image is saved to your current directory. If your terminal supports inline image rendering — Ghostty, iTerm2 and similar — the picture also previews right in the terminal window, no external viewer needed. That terminal-native preview is a deliberate part of the experience.

Inside an interactive session you can tune generation with slash commands:

# Inside an interactive run:
/set width 1024      # output width in pixels
/set height 1024     # output height in pixels

You can also control the number of steps (fewer = faster, more = more detailed), set a fixed random seed for reproducible results, and supply a negative prompt to steer away from unwanted elements. The official details live on the Ollama image generation blog post and the x/z-image-turbo model page.

How much VRAM / unified memory does Ollama image generation need?

Because the feature is macOS-only today, the practical resource is Apple Silicon unified memory (the same pool the GPU and CPU share). Use the download size as your floor and add headroom — the model has to live in memory while it runs. These are practical targets, framed approximately:

ModelDownload (default)Practical unified-memory floorComfortable on
x/flux2-klein:4b~5.7 GB~10-12 GB16 GB Mac (M-series)
x/z-image-turbo (fp8)~13 GB~16 GB24 GB+ Mac
x/flux2-klein:9b~12 GB~16 GB24 GB+ Mac
x/z-image-turbo (bf16)~33 GB~36 GB+48 GB / 64 GB Mac

Alibaba states Z-Image-Turbo was designed to fit 16 GB VRAM consumer devices at its native precision, which lines up with the fp8 row above. The takeaway: a 16 GB Apple Silicon Mac comfortably runs FLUX.2 Klein 4B and can handle Z-Image-Turbo fp8 with little else open; for the bf16 full-precision Z-Image you really want 36 GB+ of unified memory. To sanity-check any model against your machine before downloading 13-33 GB, our VRAM calculator is the quickest gut-check.

Own it instead of renting it

Run this on your own machine and stop paying every month

Pay once and keep it. No renewal, no per-token bill, and nothing you feed it ever leaves your hardware.

How fast is Ollama image generation on a Mac?

There is no controlled cross-machine benchmark published for these two models inside Ollama yet. Rather than quote a second-count that would not transfer to your Mac anyway, here is the arithmetic that bounds it — you can run it for your own machine in about ten seconds.

A diffusion model is streamed through memory once per sampling step, so the floor on generation time is set by memory bandwidth:

seconds per image (floor) = steps × (model size in GB ÷ memory bandwidth in GB/s)

Two inputs. Steps: Alibaba Tongyi Lab designed Z-Image-Turbo around 8 sampling steps for a 1024×1024 image — that is the "turbo" in the name — and FLUX.2 Klein is likewise a distilled few-step model. Bandwidth: your chip's unified-memory bandwidth is a fixed, published number; look it up on the tech-spec page for your exact Mac.

Worked example at 120 GB/s (substitute your own chip's published figure and redo the division):

ModelSize in memoryStepsArithmetic floor per image
x/flux2-klein:4b~5.7 GB~8~0.4 s
x/z-image-turbo (fp8)~13 GB~8~0.9 s
x/z-image-turbo (bf16)~33 GB~8~2.2 s

Read that as a floor, not a prediction. Real generation lands well above it: text encoding, the VAE decode pass, attention compute and macOS memory pressure all stack on top, and the very first run of a model includes the download and load. What the arithmetic does tell you reliably is the ratio — on the same Mac, the 4B is roughly twice as quick per step as Z-Image fp8 and around six times quicker than bf16. That ordering is what should drive your model choice. It also explains why the same model can be several times faster on a higher-bandwidth Mac with identical software: nothing changed except the divisor.

How is Ollama image generation different from ComfyUI?

This is the honest heart of the article. Ollama's image generation is fast to start and great for one-off prompts from the terminal, but it is intentionally minimal. ComfyUI (and Forge/A1111) are full image pipelines. Here is the real gap:

CapabilityOllama (2026, experimental)ComfyUI / Forge
PlatformsmacOS only (Win/Linux soon)Windows, Linux, macOS
InterfaceTerminal promptFull node graph / web UI
Model selection2 curated models (Z-Image, FLUX.2 Klein)Hundreds (SDXL, FLUX, SD3.5, custom)
LoRA supportNo (not yet)Yes
ControlNetNo (not yet)Yes
Inpainting / outpaintingNoYes
img2imgNoYes
Batch + automationLimitedExtensive (API, workflows)
Setup effortTrivial (one command)Moderate (install + nodes)

So when does each win?

  • Use Ollama image generation when you want a quick image from the command line, you are already running Ollama for text models, you are on a Mac, and you do not need fine control. It is the lowest-friction way to do ollama text to image.
  • Use ComfyUI or Forge the moment you need LoRAs, ControlNet, inpainting, img2img, specific checkpoints, or you are on Windows/Linux. For any serious or repeatable image work, ComfyUI is still the tool. Our complete ComfyUI guide covers that workflow end to end, and the broader local FLUX image generation guide goes deeper on the FLUX family outside Ollama.

Which is the best Ollama model for image generation?

For most people: Z-Image-Turbo for quality, FLUX.2 Klein 4B for speed.

  • Pick x/z-image-turbo if you want the most photorealistic output and especially if your images contain text (signs, logos, UI mockups, English or Chinese). Its bilingual text rendering is the single most differentiated thing in this lineup.
  • Pick x/flux2-klein:4b if you want fast iteration, a small ~5.7 GB download, and commercial usage rights (Apache 2.0). It is the friendliest starting point on a 16 GB Mac.
  • Pick x/flux2-klein:9b only if you need extra fidelity and your use is non-commercial — its FLUX Non-Commercial License v2.1 rules out shipping outputs in a paid product without a separate agreement.

Key Takeaways

  1. Ollama image generation is real and new in 2026 — released January 20, 2026, experimental, macOS only (Windows/Linux coming soon). It did not exist before this; earlier "Ollama + images" meant vision (image-in, text-out), not generation.
  2. Two models ship today: x/z-image-turbo (Alibaba Tongyi, 6B, fp8 ~13 GB, Apache 2.0, bilingual text) and x/flux2-klein (Black Forest Labs, 4B ~5.7 GB Apache 2.0 / 9B ~12 GB non-commercial).
  3. The commands are dead simple: ollama run x/z-image-turbo "your prompt" saves to the current directory and previews inline in Ghostty/iTerm2.
  4. Plan for memory: a 16 GB Apple Silicon Mac runs FLUX.2 Klein 4B and Z-Image-Turbo fp8; full bf16 Z-Image wants 36 GB+ unified memory.
  5. It is not a ComfyUI replacement. No LoRA, no ControlNet, no inpainting/img2img yet. For serious or repeatable work, ComfyUI/Forge are still required.

Next Steps

🎯
AI Learning Path

Ollama’s running. Here’s what to build with it.

Go from “ollama run” to RAG apps, agents, and fine-tuned models — structured and hands-on. First chapter free.

Or own it for life — Lifetime $149 $599, pay once
Once your hardware is sorted

Stop piecing Ollama together from blog posts

Ollama Mastery is 15 chapters end to end — install, model choice, Modelfiles, GPU offload, the API, and the 20 errors that actually happen. Plus 24 more courses.

$149 once unlocks everything, forever — about $0.27/chapter for life. Prefer to spread it out? Pro is $79/year (saves 27%) or $8.99/month.
Secure checkout by Lemon Squeezy — your card never touches this siteInstant access the moment you payFirst chapter of every course is free — try before you buy

Liked this? 25 full AI courses are waiting.

From fundamentals to RAG, agents, MCP servers, voice AI, and production deployment with real GitHub repos. First chapter free, every course.

Reading now
Join the discussion
TagsOllamaImage GenerationZ-Image-TurboFLUX.2Text-to-ImagemacOS

Local AI Master Research Team

Local AI Master writes hands-on courses and hardware guides for running AI on machines you own. Content is checked against current releases and corrected when readers tell us it is wrong.

Build Real AI on Your Machine

RAG, agents, NLP, vision, and MLOps - chapters across 25 courses that take you from reading about AI to building AI.

Want the structured version?

Hands-on courses on local AI, from $8.99 a month. The first chapter of each is free.

AI Learning Path
More on Local Image Generation
See the full Run FLUX.1 Locally guide.

Comments (0)

No comments yet. Be the first to share your thoughts!

📅 Published: June 20, 2026🔄 Last Updated: August 23, 2026✓ Manually Reviewed

Ready to Go Beyond Tutorials?

25 structured courses with hands-on chapters - build RAG chatbots, AI agents, and ML pipelines on your own hardware.

🎯
AI Learning Path

Go from reading about AI to building with AI

25 structured courses. Hands-on projects. Runs on your machine. Start free.

Or own it for life — Lifetime $149 $599, pay once

Was this helpful?

LM

Written by the Local AI Master Team

The team behind Local AI Master

We build Local AI Master around practical, testable local AI workflows: model selection, hardware planning, RAG systems, agents, and MLOps. The goal is to turn scattered tutorials into a structured learning path you can follow on your own hardware.

✓ Local AI Curriculum✓ Hands-On Projects✓ Open Source Contributor
📚
Free · no account required

Grab the AI Starter Kit — career roadmap, cheat sheet, setup guide

No spam. Unsubscribe with one click.

🎯
AI Learning Path

Ollama’s running. Here’s what to build with it.

Go from “ollama run” to RAG apps, agents, and fine-tuned models — structured and hands-on. First chapter free.

Or own it for life — Lifetime $149 $599, pay once
Free Tools & Calculators