A beginner-friendly, thorough guide

Run Qwen and Qwen-Image on your own computer.

Two free, open-source AI models from the same family — one that writes text, one that generates images — both running locally on your machine, no subscriptions and no data leaving your computer. This guide teaches each one from scratch.

Free & open-source Apache 2.0 licensed Runs offline Beginner-friendly
01 / The key thing to understand first

Qwen and Qwen-Image are two different models.

Same family, same maker (Alibaba), but built for completely different jobs. This is the foundation for everything else — so let's make it crystal clear.

Qwen (the text model)

text in → text out

Like ChatGPT, Mistral, or Llama. You type a question or instruction; it writes back. Chatting, drafting, summarizing, answering, coding.

  • Runs through a tool called Ollama
  • One command to install and run
  • Lighter on your computer

Qwen-Image

text in → image out

A different kind of model entirely. You type a description; it generates a brand-new picture. Art, photos, posters, logos with readable text.

  • Runs through a tool called ComfyUI
  • A few files to set up
  • Heavier — needs more memory
Worth stating plainly

You can't merge these two into one model, and neither can do the other's job — a text model can't draw, an image model can't chat. They're separate downloads that run in separate programs. This guide gives each its own build section so you never mix them up.

02 / Which should you start with?

A suggested order.

If you're brand new, start with Qwen text. It's a single command, it's light enough to run on almost any computer, and getting it working gives you a quick win plus an understanding of the basics — downloading a model, running it locally, talking to it. Then move to Qwen-Image, which has a few more steps and asks more of your hardware, but is far less intimidating once the text model has shown you the ropes.

Each build section below is self-contained, so you can also jump straight to whichever one you came for.

Start here · easier

→ Build: Qwen Text

One command. Runs on most laptops. A 10-minute first win.

Then · a step up

→ Build: Qwen-Image

A program + three files. Needs more memory. An afternoon project.

How It Works / The mechanisms

What's actually happening inside each model.

Understanding this makes every setup step — and every setting you'll touch — make sense. Two models, two mechanisms.

QWEN TEXT — how a language model works

A text model like Qwen is, at heart, a very sophisticated next-word predictor. Trained on enormous amounts of text, it learned the statistical patterns of language — which words and ideas tend to follow which. When you type a prompt, it predicts the most fitting next piece of text, then the next, and the next, building a reply one small chunk (a "token") at a time.

It isn't looking anything up or copying stored answers; it's generating, guided by the patterns it absorbed in training. That's why it can write things it has never seen before — and also why it can occasionally state something wrong with confidence. The newest Qwen versions add a "thinking" mode, where the model works through reasoning steps before answering, trading speed for better answers on hard problems.

QWEN-IMAGE — how a diffusion model works

Qwen-Image works in a completely different way, called diffusion. During training it was shown millions of images, each gradually destroyed with random noise until it was pure static — and a neural network learned to reverse that, predicting and removing noise step by step to recover a clean image. Once trained, you can hand it pure random noise and it will "denoise" it into a brand-new picture.

Your prompt steers that process: a text encoder turns your words into a numerical target, so each denoising step is nudged toward "noise that, cleaned up, looks like this description." It all happens in a compressed latent space (small and fast), then a decoder expands the result to a full image. This is why it's called a latent diffusion model.

The Qwen-Image pipeline, stage by stage

Each stage is a component you'll actually install in the build section.

STAGE 1

Encode the prompt

A text encoder turns your words into a numerical guide.

STAGE 2

Start from noise

Random noise is created in the compressed latent space — the blank canvas.

STAGE 3

Denoise, guided

The diffusion model removes noise over many steps, steered toward your prompt.

STAGE 4

Schedule steps

A "sampler" sets how many steps and how big — speed vs. quality.

STAGE 5

Decode to pixels

The VAE decoder expands the finished latent into a full-resolution image.

Why this maps onto the build

For Qwen-Image you'll download exactly three files: the diffusion model (stage 3), the text encoder (stage 1), and the VAE (stages 2 & 5). The architecture isn't abstract — it's the thing you assemble.

Advanced — for the technically curious

Under the hood: the real architecture.

A deeper look than How It Works, with the actual technical terms. You don't need any of this to build or use the models — it's here for readers who want to understand what they're running.

QWEN TEXT — transformer internals
Base architecture
A decoder-only Transformer. Recent Qwen (Qwen3) ships in both dense models (0.6B–32B) and Mixture-of-Experts variants.
Attention
Grouped-Query Attention (GQA) — multiple query heads share key/value heads, cutting memory use and speeding inference.
Feed-forward
SwiGLU activations in the feed-forward blocks, a gated variant that improves quality over plain ReLU/GELU.
Tokenizer
Byte-level BPE (byte-pair encoding) with a ~151,000-token vocabulary, covering 100+ languages.

What "Mixture-of-Experts" actually means

In a dense model, every parameter fires for every token — powerful but expensive. An MoE layer instead holds many parallel "expert" feed-forward networks (Qwen3's MoE models have 128 experts) and a small router picks just a few (8 of 128) for each token.

The payoff: the flagship Qwen3-235B-A22B has 235 billion total parameters but only ~22 billion active per token. You get the knowledge capacity of a huge model at roughly the inference cost of a much smaller one. That "A22B" in the name means "22B active."

Thinking vs. non-thinking mode

Qwen3 unifies two behaviors in one model: a thinking mode that generates internal reasoning steps before answering (better at math, logic, code) and a non-thinking mode for fast direct replies. This is why you saw /set think in the build steps — you're toggling which pathway the model uses.

QWEN-IMAGE — diffusion internals
Core architecture
A 20B-parameter MMDiT — Multimodal Diffusion Transformer. Modern image models replaced the older U-Net backbone with a transformer.
Where it operates
In latent space: a VAE compresses images ~8× per side before any diffusion happens, so the heavy math runs on a small representation.
Conditioning
A Qwen2.5-VL text encoder converts your prompt into embeddings that condition every denoising step (this is the separate encoder file you install).
License
Apache 2.0 — fully open for commercial use, the same permissive license as the Qwen text models.

Why "MMDiT" and not the older U-Net

Early diffusion models (the original Stable Diffusion) used a U-Net as the denoiser. Newer ones, including Qwen-Image, use a Diffusion Transformer (DiT) — the same transformer architecture that powers language models, adapted to denoise images. The "MM" (multimodal) means text and image information are processed together rather than bolted on, which is a big part of why Qwen-Image is unusually good at rendering text inside pictures.

Sampling: steps, schedulers, and guidance

The reverse denoising isn't one operation — it's a scheduler running a chosen number of steps (often 20). More steps generally means finer detail at the cost of time. Classifier-free guidance (CFG) controls how strongly the model obeys your prompt versus generating freely — too low drifts off-prompt, too high looks over-baked. These are the dials behind the workflow settings you adjusted in the build.

The honest boundary of "building your own model"

Everything in this guide is running and configuring existing models. Fine-tuning (adapting one to your own data, often via LoRA) is the realistic next step up. Training from scratch — what Alibaba did to create these — costs millions in compute and isn't a hobby project. Knowing where that line sits is part of understanding the technology honestly.

TRACK 1 — TEXT

Build it: run Qwen text in three steps.

The easiest way to run any open text model locally is a free tool called Ollama. Start here if you're new — it's genuinely about ten minutes.

What you're doing

Install Ollama (the engine that runs the model), then type one command that downloads and starts Qwen. That's the whole job.

Install Ollama

  1. Go to ollama.com/download and get the Windows installer.
  2. Run it and click through — no settings to change.
  3. Ollama now runs quietly in the background.

✓ Ollama is the "engine." It handles all the hard parts of loading a model.

Download and run Qwen with one command

  1. Press the Windows key, type PowerShell, press Enter.
  2. Type the command below and press Enter.
  3. The first run downloads the model (a few GB — give it a few minutes); after that it's instant.
Windows PowerShell
# downloads + runs the default Qwen text model
ollama run qwen3

# or pick a size to match your RAM (see Hardware tab)
ollama run qwen3:4b     # small & fast
ollama run qwen3:14b    # stronger, needs more memory
About versions

Qwen's text models update often (qwen3, and newer). ollama run qwen3 is a reliable starting point; you can browse current versions and sizes on Ollama's model library. Pick a size smaller than your available memory.

Chat with it

When you see the >>> prompt, the model is running. Type a question and press Enter. That's it — you're running your own AI.

  1. Ask it to write, explain, brainstorm — see what it's good at.
  2. Type /bye or close the window to stop.
  3. To return later, just run ollama run qwen3 again — no re-download.

Newer Qwen models have a thinking mode for harder questions — toggle it with /set think and /set nothink.

TRACK 2 — IMAGE

Build it: install Qwen-Image and make a picture.

Three phases: set up the program, install the model, then generate. Image models don't use Ollama — they run in ComfyUI. Take it one checkbox at a time; the first run takes an afternoon, and that's normal.

The shape of the whole job

Install one program (ComfyUI), add one small extension (the GGUF loader), download three model files that together are Qwen-Image, and load one workflow that wires them up. Then type a prompt.

A Set up the program

Install ComfyUI

  1. Download the Windows desktop installer from the official ComfyUI site.
  2. Run it and click through like any app.
  3. Open ComfyUI once to confirm it shows a canvas.

✓ Check: ComfyUI opens to a workspace with connected boxes.

Update ComfyUI

  1. Open the Manager (a button inside ComfyUI).
  2. Click Update ComfyUI.
  3. Restart ComfyUI when it finishes.
Don't skip this

Out-of-date ComfyUI is the #1 cause of beginner errors. Always update before downloading models.

Install the GGUF loader extension

GGUF is the compressed format that lets the big model fit on a normal computer. ComfyUI reads it via a free extension, ComfyUI-GGUF (by "city96").

  1. In the Manager, open Custom Nodes Manager.
  2. Search ComfyUI-GGUF, click Install.
  3. Restart ComfyUI.

✓ You can skip this and let the workflow auto-install it in Phase C.

B Install Qwen-Image (the model)

Pick which size to download

Qwen-Image comes in compressed sizes ("quants"). Smaller = less memory, slightly lower quality. For a first try, Q4_K_M is the sweet spot.

Q2_K ~7 GB · lowest Q3_K_M ~9.7 GB Q4_K_M ~13 GB · start here Q5_K_M ~15 GB Q8_0 ~22 GB · best

Rule of thumb: pick a size smaller than your total RAM+VRAM (see Hardware).

Download the three files that make up Qwen-Image

Qwen-Image isn't one file — it's three pieces working together, the pipeline stages from How It Works:

WhatFile (typical name)Where to get it
Diffusion model
(the denoiser)
qwen-image-Q4_K_M.ggufThe city96/Qwen-Image-gguf repo on Hugging Face
Text encoder
(reads your prompt)
qwen_2.5_vl_7b_fp8_scaled.safetensorsLinked from the Qwen-Image docs
VAE
(decodes to pixels)
qwen_image_vae.safetensorsLinked from the Qwen-Image docs
Why no hard-coded link

Filenames change as Qwen updates. Open the official Qwen-Image GitHub (linked at the bottom) or the ComfyUI Qwen-Image tutorial for the current files. Match the names above closely; small version suffixes are fine.

Put each file in its correct folder

  1. Diffusion .ggufComfyUI/models/diffusion_models/ (or unet/)
  2. Text encoder → ComfyUI/models/text_encoders/
  3. VAE → ComfyUI/models/vae/
how it should look on disk
ComfyUI/
└── models/
    ├── diffusion_models/
    │   └── qwen-image-Q4_K_M.gguf
    ├── text_encoders/
    │   └── qwen_2.5_vl_7b_fp8_scaled.safetensors
    └── vae/
        └── qwen_image_vae.safetensors
If a model is "missing" later

It's almost always in the wrong folder. A misplaced file won't appear in the dropdowns — check the folder first.

C Generate your first image

Load the Qwen-Image workflow

  1. In ComfyUI, open the Templates / Workflow menu and look for a Qwen-Image template.
  2. Or download a Qwen-Image workflow .json from the ComfyUI / Unsloth tutorial and drag it onto the canvas.
  3. If any boxes are red ("missing nodes"), open Manager → Install Missing Nodes → restart.

✓ Check: connected boxes, none red.

Point the three loader boxes at your files

  1. Unet / GGUF Loader → your qwen-image-Q4_K_M.gguf
  2. Text encoder (CLIP) loaderqwen_2.5_vl_7b_fp8_scaled.safetensors
  3. Load VAEqwen_image_vae.safetensors
  4. Set image size to 1024×1024 for a fast first run.

Write a prompt and run it

  1. Type your description in the positive prompt box.
  2. Leave the negative prompt as-is for now.
  3. Click Queue (or Ctrl+Enter) and wait.
example positive prompt to try
a quiet bookshop on a rainy evening, warm light in
the window, a wooden sign reading "OPEN LATE",
photograph, shallow depth of field

The first run is slow (it loads the model into memory); later runs are faster. CPU: minutes. Capable GPU: seconds. When the image appears, you've done it.

Iterate — change one thing at a time

  1. Reword the prompt → sharpens the guidance.
  2. Raise the step count → more detail, slower.
  3. Fix the seed → reproduce the same image exactly.
Evidence-based prompt tips

Use "photograph" rather than "photorealistic" for realism. Write negative prompts in plain language, not keyword lists (Qwen's own guidance). Put in-image text in quotes.

Applications / Who uses this and why

What these models are actually used for.

Running an AI locally isn't just a hobby exercise — it solves real problems for individuals and organizations. Here's the practical landscape.

Why local, specifically

People choose local open models over cloud AI services for three concrete reasons: privacy (your data never leaves your machine — decisive for regulated fields), cost (no per-use API bills; at high volume a one-time hardware spend pays for itself), and control (it works offline and can be customized). These are the real drivers behind everything below.

QWEN TEXT — for individuals
✍️

Writing & editing

Drafting emails, summarizing documents, rewriting and proofreading — all offline and private.

💻

Coding help

Explaining code, generating snippets, debugging. Qwen's coder variants are a popular local pairing with editors.

🌍

Translation

Qwen supports 100+ languages, useful for translating and practicing without sending text to a service.

📚

Learning & tutoring

Explaining concepts, math help, study questions — a patient tutor that runs on your own laptop.

🔒

Private journaling/notes

Querying or organizing personal notes where you'd never want the content uploaded anywhere.

🧩

Brainstorming

Ideas, outlines, planning — a thinking partner available offline, with no usage meter running.

QWEN-IMAGE — for individuals
🎨

Art & illustration

Concept art, hobby projects, personal creative work in any visual style you can describe.

🖼️

Posters & cards

Its strong text rendering makes flyers, greeting cards, and posters with readable words practical.

📱

Social & hobby content

Custom images for blogs, channels, game assets, or tabletop campaigns — unlimited and free to run.

How industries use them

Documented, real-world deployments of local Qwen-class models across sectors.

Healthcare
Medical document analysis and decision support — kept on-premises because patient data can't go to a third-party cloud. Local models make this compliant.
Legal
Searching and summarizing long contracts and case files using long-context retrieval (RAG), with confidential documents never leaving the firm's network.
Finance
Automated reporting, risk analysis, and compliance checks — areas where data sovereignty rules often forbid sending information to external APIs.
Software
Code generation, review, and documentation using Qwen's coder variants, integrated into private development tools to keep proprietary source in-house.
Customer service
Multilingual chatbots and virtual assistants. One documented deployment answered queries in under 300ms with an 87% satisfaction rate, fully on local hardware.
Manufacturing
An industrial-inspection company generates reports combining photos, diagrams, and technical text — vision-language models reading and structuring shop-floor data.
Operations / admin
Extracting structured data from scanned invoices and forms (documented at 95%+ accuracy), and turning messy tables into clean datasets.
Design / marketing
Image generation for product mockups, ad concepts, and campaign visuals — iterated locally without per-image cloud fees or licensing friction (Apache 2.0).
The pattern to notice

Across every sector, the same logic recurs: a smaller open model run locally handles high-volume, privacy-sensitive, or cost-sensitive work, while teams reserve big cloud APIs for the hardest reasoning. Most real deployments are hybrid — and "run it yourself," which is exactly what this guide teaches, is the foundation of that approach.

Hardware / Requirements

What your machine needs.

The text model is light; the image model is heavier. For both, the governing constraint is memory.

FOR QWEN TEXT
8 GB RAM

Small sizes

Runs a small Qwen (e.g. 4B) for chat and drafting. Slow but functional on CPU.

16 GB RAM

The comfortable start

Runs an 8B Qwen smoothly. The realistic sweet spot for most beginners.

12 GB+ VRAM GPU

Fast & larger

A graphics card runs bigger Qwen sizes (14B+) quickly. Optional — CPU works, just slower.

FOR QWEN-IMAGE
The governing rule

Your total usable memory (RAM + any VRAM) should exceed the model file's size. For a ~13 GB Q4 file, aim for ~14 GB+ combined. Fit the model and it runs; exceed your memory and it fails or crawls.

Entry — no GPU

CPU + 16 GB RAM

Runs without a graphics card, just slower (minutes per image). Workable for learning.

Recommended

8–12 GB VRAM GPU

A consumer NVIDIA card runs quantized Qwen-Image in seconds, not minutes.

Apple Silicon

M-series, 16–32 GB

Unified memory is shared, so a mid-spec M-series Mac handles both models comfortably.

How a big model fits in less memory: a technique called quantization stores the model's numbers at lower precision (4-bit instead of 16-bit), shrinking the file 50–75% with only a small quality cost. The Q4 in a filename means 4-bit — the recommended starting point.

Sequence that saves money

Run on the computer you already own first, even CPU-only. Confirm you enjoy the work before buying hardware. That ordering avoids wasted spending.

Glossary / Terms

The vocabulary, defined.

Every technical term in this guide, in plain language.

Qwen
Alibaba's family of open AI models. "Qwen" usually means the text model; "Qwen-Image" is the separate image generator.
LLM (text model)
Large Language Model — predicts text one token at a time. Qwen, Mistral, Llama are LLMs.
Diffusion model
Generates images by starting from random noise and removing it step by step, guided by your prompt. Qwen-Image is one.
Ollama
The free tool that downloads and runs text models with one command. The engine for the text track.
ComfyUI
The free program that runs image models as a visual node graph. The environment for Qwen-Image.
Token
A chunk of text (~¾ of a word) that a language model reads and writes. "Tokens per second" measures speed.
Thinking mode
A Qwen text feature where the model reasons step by step before answering — better on hard problems, slower.
Latent space
A compressed representation where diffusion math happens instead of on full pixels — far less memory.
Text encoder
Turns your image prompt into numbers the diffusion model uses as a target. One of Qwen-Image's three files.
VAE
Variational Autoencoder. Its decoder expands the finished latent into a real image. The third file.
Seed
The number setting the initial random noise. Same seed + same prompt = same image. Useful for experiments.
GGUF
A compressed, quantized model file format that lets large models run on modest hardware.
Quantization (Q4)
Storing model numbers at lower precision to shrink size. "Q4" = 4-bit, the beginner sweet spot.
Parameters (e.g. 8B, 20B)
The model's learned values. More generally means more capable and more memory-hungry.
Apache 2.0
A permissive open-source license used by Qwen — free to use, modify, and even commercialize, with minimal restrictions.
Help / Troubleshooting

Common problems, real fixes.

Grouped by track. These are the issues you're genuinely likely to hit.

QWEN TEXT (Ollama)
"ollama is not recognized" in PowerShell
The install isn't on your system path yet. Close PowerShell and open a fresh window. If that fails, reinstall Ollama and restart your computer.
The model replies very slowly
You're running on CPU rather than a GPU — normal, just slower. Try a smaller size (e.g. qwen3:4b), and close other heavy apps.
The download stalls or fails
It's a multi-GB download; a shaky connection can interrupt it. Just run the same ollama run command again — it resumes rather than restarting.
Which Qwen text version should I use?
Start with ollama run qwen3. Versions update often; browse Ollama's model library for current ones. Pick a size smaller than your available memory.
QWEN-IMAGE (ComfyUI)
A model isn't showing in the dropdown
Almost always a file in the wrong folder. GGUF → models/diffusion_models/ (or unet/), encoder → models/text_encoders/, VAE → models/vae/. Fix it and refresh.
Red "missing node" boxes in the workflow
The workflow needs an extension you don't have — usually the GGUF loader. Open ComfyUI Manager → Install Missing Nodes, then restart.
It won't load the model / general errors
Update ComfyUI to the latest version (Manager → Update ComfyUI) and update the GGUF node too. Stale versions are the most common culprit.
"Out of memory" when generating
Use a smaller quant (Q4 instead of Q8), a smaller resolution (1024×1024), and close other programs. Your total RAM+VRAM must exceed the model file size.
Text inside my image is garbled
Qwen-Image is unusually good here but not flawless. Keep text short, wrap it in quotes, and use a current model version.
Can I use generated images commercially?
Qwen-Image's Apache 2.0 license is permissive, but verify the current terms for the specific version you download before commercial use. For learning, you're fine.

Two models, one machine, zero subscriptions.

Start with the text model for a quick win, then graduate to images. Both run entirely on your own computer, free and offline.

Qwen-Image on GitHub →