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.
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)
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
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
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.
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.
→ Build: Qwen Text
One command. Runs on most laptops. A 10-minute first win.
→ Build: Qwen-Image
A program + three files. Needs more memory. An afternoon project.
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.
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 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.
Encode the prompt
A text encoder turns your words into a numerical guide.
Start from noise
Random noise is created in the compressed latent space — the blank canvas.
Denoise, guided
The diffusion model removes noise over many steps, steered toward your prompt.
Schedule steps
A "sampler" sets how many steps and how big — speed vs. quality.
Decode to pixels
The VAE decoder expands the finished latent into a full-resolution image.
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.
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.
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.
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.
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.
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.
Install Ollama (the engine that runs the model), then type one command that downloads and starts Qwen. That's the whole job.
Install Ollama
- Go to ollama.com/download and get the Windows installer.
- Run it and click through — no settings to change.
- 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
- Press the Windows key, type
PowerShell, press Enter. - Type the command below and press Enter.
- The first run downloads the model (a few GB — give it a few minutes); after that it's instant.
# 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
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.
- Ask it to write, explain, brainstorm — see what it's good at.
- Type
/byeor close the window to stop. - To return later, just run
ollama run qwen3again — no re-download.
Newer Qwen models have a thinking mode for harder questions — toggle it with /set think and /set nothink.
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.
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.
Install ComfyUI
- Download the Windows desktop installer from the official ComfyUI site.
- Run it and click through like any app.
- Open ComfyUI once to confirm it shows a canvas.
✓ Check: ComfyUI opens to a workspace with connected boxes.
Update ComfyUI
- Open the Manager (a button inside ComfyUI).
- Click Update ComfyUI.
- Restart ComfyUI when it finishes.
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").
- In the Manager, open Custom Nodes Manager.
- Search
ComfyUI-GGUF, click Install. - Restart ComfyUI.
✓ You can skip this and let the workflow auto-install it in Phase C.
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.
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:
| What | File (typical name) | Where to get it |
|---|---|---|
| Diffusion model (the denoiser) | qwen-image-Q4_K_M.gguf | The city96/Qwen-Image-gguf repo on Hugging Face |
| Text encoder (reads your prompt) | qwen_2.5_vl_7b_fp8_scaled.safetensors | Linked from the Qwen-Image docs |
| VAE (decodes to pixels) | qwen_image_vae.safetensors | Linked from the Qwen-Image docs |
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
- Diffusion
.gguf→ComfyUI/models/diffusion_models/(orunet/) - Text encoder →
ComfyUI/models/text_encoders/ - VAE →
ComfyUI/models/vae/
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
It's almost always in the wrong folder. A misplaced file won't appear in the dropdowns — check the folder first.
Load the Qwen-Image workflow
- In ComfyUI, open the Templates / Workflow menu and look for a Qwen-Image template.
- Or download a Qwen-Image workflow
.jsonfrom the ComfyUI / Unsloth tutorial and drag it onto the canvas. - 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
- Unet / GGUF Loader → your
qwen-image-Q4_K_M.gguf - Text encoder (CLIP) loader →
qwen_2.5_vl_7b_fp8_scaled.safetensors - Load VAE →
qwen_image_vae.safetensors - Set image size to 1024×1024 for a fast first run.
Write a prompt and run it
- Type your description in the positive prompt box.
- Leave the negative prompt as-is for now.
- Click Queue (or
Ctrl+Enter) and wait.
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
- Reword the prompt → sharpens the guidance.
- Raise the step count → more detail, slower.
- Fix the seed → reproduce the same image exactly.
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.
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.
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.
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.
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.
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.
What your machine needs.
The text model is light; the image model is heavier. For both, the governing constraint is memory.
Small sizes
Runs a small Qwen (e.g. 4B) for chat and drafting. Slow but functional on CPU.
The comfortable start
Runs an 8B Qwen smoothly. The realistic sweet spot for most beginners.
Fast & larger
A graphics card runs bigger Qwen sizes (14B+) quickly. Optional — CPU works, just slower.
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.
CPU + 16 GB RAM
Runs without a graphics card, just slower (minutes per image). Workable for learning.
8–12 GB VRAM GPU
A consumer NVIDIA card runs quantized Qwen-Image in seconds, not minutes.
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.
Run on the computer you already own first, even CPU-only. Confirm you enjoy the work before buying hardware. That ordering avoids wasted spending.
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.
Common problems, real fixes.
Grouped by track. These are the issues you're genuinely likely to hit.
"ollama is not recognized" in PowerShell
The model replies very slowly
qwen3:4b), and close other heavy apps.The download stalls or fails
ollama run command again — it resumes rather than restarting.Which Qwen text version should I use?
ollama run qwen3. Versions update often; browse Ollama's model library for current ones. Pick a size smaller than your available memory.A model isn't showing in the dropdown
models/diffusion_models/ (or unet/), encoder → models/text_encoders/, VAE → models/vae/. Fix it and refresh.Red "missing node" boxes in the workflow
It won't load the model / general errors
"Out of memory" when generating
Text inside my image is garbled
Can I use generated images commercially?
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 →