Qwen-Image-2.1

Text-to-image at 2048 px with legible lettering, driven by the LLM

Header plate: model name Qwen-Image-2.1 with the violet Qwen star mark and a QWEN / ALIBABA CLOUD vendor line, tagline "Text-to-image at 2048 px - words render right", and a spec matrix for params 7B image transformer, text encoder Qwen3-VL 8B, weights on disk 32.4 GB single files, resolution 2048 px native class, struck-through stock benchmark gen 116-122 s warm at 2K in 20 steps, Zagitta unlock gen 78.0 s, GPU 1 x RTX 3090, plus the chip comfyui qwen21.

Local image generation is powered by the LLMs. The request arrives through the orchestrator endpoint, the agent picks the generator, writes the prompt, frees one GPU, runs the diffusion job, and reads the result back before anything is published. Qwen-Image-2.1 is where lettering is routed: of the two installed generators, only its lettering has passed a quality-control read.

The weights arrived as a 14.2 GB bf16 image transformer, a 17.5 GB Qwen3-VL-8B text encoder and a 0.68 GB VAE. The first diffusers run produced 1024×1024 cleanly with a tiled VAE decode. A 2752×1536 attempt denoised in about 4 minutes (40 steps, ~6.2 s per step) and then died at the VAE decode, which needed ~2.4 GB of contiguous VRAM with about 385 MB free. The ComfyUI path solved the same job: single-file copies of the same weights, 20 steps at cfg 4.0, native 2K class output, decode included. The diffusers 2K blocker stayed open after that. The ComfyUI path is what runs.

Showcase

Night landscape of the aurora borealis over a frozen fjord, green and violet light reflected in the sea ice, snow-covered pines along the shore
Generated locally by Qwen-Image-2.1 at 2048×1152, 20 steps at cfg 4.0, seed 511, 122.1 s.
Art-deco travel poster, green aurora over snow-covered peaks, large cream capitals reading AURORA LINE, smaller capitals reading NIGHT TRAINS TO THE FJORDS
Generated locally by Qwen-Image-2.1 at 2048×1152, 20 steps at cfg 4.0, seed 512, 116.1 s.
Victorian glasshouse conservatory at first light, mist drifting over a wet stone path between ferns and palms, lanterns lit low
Generated locally by Qwen-Image-2.1 at 2048×1152, 20 steps at cfg 4.0, seed 513, 116.2 s.

Specifications

FieldValue
Architecture7B MMDiT image transformer + Qwen3-VL 8B text encoder + VAE (all bf16 on disk)
EngineComfyUI 0.41.0, headless, --offline, one server per batch
Served bynothing on the network: the orchestrator serves the driver LLM, not this model (see the orchestrator guide and “How they run” below)
Weightssingle files: transformer 14.2 GB, text encoder 17.5 GB, VAE 0.68 GB (32.4 GB per set)
Resolutions1024×1024 (diffusers and ComfyUI); 2048-class native via ComfyUI; upstream card: 2K native, 2048×2048 default with aspect ratios up to 2752×1536. On the diffusers path 2752×1536 denoises but VAE decode is blocked
Sampler defaultsComfyUI workflow: 20 steps, cfg 4.0, Euler. Diffusers script: 40 steps, fixed seed
Image editingone unified model for generation and editing: up to 10 reference images, transparent RGBA output and subject extraction (upstream card). The local edit graph was verified end-to-end (40 steps, cfg 1.0, Euler/simple)
GPU footprintSingle RTX 3090. Jobs run on the free card while the driver LLM keeps the other
VRAM observedpeak 23,728 MB on the job GPU during a 2048-class job (GPU-only sampling at one per second)
LicenceQwen Research License Agreement: non-commercial use only, research and evaluation; commercial use needs a separate agreement with Qwen. The 2.1 line moved off the Apache-2.0 terms that cover the original Qwen-Image family.
Role hereThe routing pick for anything that must carry words: the only one of the two whose lettering has passed QC. It also carries the edit path (photo in, rendition out)

Generation times

RunSizeStepsStockZagitta GPU Unlock
2048-class warm jobs, ComfyUI2048×115220116–122 s78.0–96.1 s
First job in a session, stages the weights2048×115220122.1–124.1 s80.1 s
Site art batch, warm jobs1664×9362070–80 s—
Diffusers attempt, decode blocked2752×153640~4 min denoise only—

Stock times are wall-clock per image inside one open ComfyUI session; server start and model staging sit in the first job. The site art batch is the provenance files under the site image originals. Zagitta GPU Unlock replays the same driver and settings on the unlocked card in one shared session (seeds 911–913, three runs): staging job 80.1 s, warm jobs 78.0 and 96.1 s — the run-to-run spread on this model is real, and so is the gain: every unlocked job beat every stock warm job.

GPU unlock: doubled tensor-core rate

The RTX 3090’s tensor-core rate is capped by its VBIOS well below what the silicon can do. gpu_unlock — an out-of-tree kernel module from the upstream Zagitta/gpu-unlock project — lifts that cap before the NVIDIA driver binds: one opt-in kernel argument and a reboot on this node, BF16 matrix throughput 70.7 → 112.0 TFLOPS (+58%), FP32 CUDA cores untouched. No VBIOS write: a boot without the argument is locked, and a power cycle re-locks the card.

This model denoises and decodes in native BF16, so it takes nearly the whole doubled rate; the GGUF-quantized LLMs that drive it are bandwidth-bound and measure unchanged. The one controlled comparison on this node — identical seed, prompt and binaries, locked and unlocked boots on the same day, 1024×1024 at 20 steps, both runs:

RunLockedUnlocked
1024×1024, 20 steps, seed 42, both runs (same-day A/B)49.42 / 45.10 s39.45 / 35.35 s (−21% time)

Execution time from the ComfyUI server log, model staging excluded. Showcase timings in this post predate the unlock.

The full same-day locked↔unlocked record — methodology, the 11-model LLM sweep, the synthetic GEMM check and the rollback kit — lives in the Zagitta GPU Unlock article.

How they run: the LLM is the control plane

The orchestrator never serves an image model. What it serves is the chat model that drives the whole job: An LLM running through the orchestrator receives a prompt to generate an image, picks an image generator, and writes the prompt for the image generator. The imagegen skill wraps the mechanics into one command:

/mnt/data/scripts/imggen-run /mnt/data/imggen/venv/bin/python 
  /mnt/data/scripts/comfyui-gen.py --model qwen21 
  --prompt "..." --out /mnt/data/imggen/out/x.png --width 2048 --height 1152

imggen-run reads a GPU requirement per script from imggen-models.conf. For a single-GPU model it switches inference to imagegen-single mode: it stops the slot on the free GPU (here, slot 1), pins the job to that card with CUDA_VISIBLE_DEVICES=1, and leaves the slot the agent session itself is running on untouched. The generation job and the LLM that launched it share the hardware at the same time.

On exit the handler restores the stopped slot and its boot model, then verifies GET :8010/health before reporting success. The exit code tells the agent what happened:

Exit codeMeaningWhat the agent does
0job done, orchestrator restoredread the image and check it
1job error (OOM, crash)lower steps/resolution, retry
2orchestrator did not restorerun the recovery script before touching inference again
124 / -15 / -9timeout / killed / crashcheck logs, lower steps

While a job holds the free GPU, requests that would need it get a clean HTTP 503 explaining the pause. Sessions on the resident slot continue normally. The evict/restore cycle costs roughly 60 s for the dual-GPU boot, so batches run all images in one session. Before any image reaches the site, the agent reads it with vision and checks it against the prompt (the QC gate in docs/IMAGE-STYLE.md): wrong lettering, extra people or garbled detail fails the read and the image is re-rolled, twice at most.

Memory & CPU

Peak job-GPU use measured 23,728 MB of the card’s 24,576 MB while generating at 2048-class sizes (sampled once per second, across two batches). The weight set measures 32.4 GB on disk, so ComfyUI streams rather than pins: staging happens against the 128 GB of system RAM, and the same session switched from this model to the second one mid-batch without a restart (both showcase batches did exactly that). The LLM slot on the other card never left VRAM: this article was drafted while the batch ran, through the same endpoint, at full speed.

Local config

The GPU-policy line for this model in imggen-models.conf, and the batch driver’s workflow numbers:

# imggen-models.conf (script  gpus  cuda_device)
comfyui-gen.py qwen21     1  1

# one image, GPU 1, LLM stays on GPU 0
IMGGEN_JOB_TIMEOUT=1800 /mnt/data/scripts/imggen-run 
  /mnt/data/imggen/venv/bin/python /mnt/data/scripts/comfyui-gen.py 
  --model qwen21 --prompt "..." 
  --out /mnt/data/imggen/out/x.png --width 2048 --height 1152

The ComfyUI side is a plain T2I graph: UNETLoader + CLIPLoader (type qwen_image) + VAELoader on the three single files, prompt through CLIPTextEncode, one KSampler (Euler/normal, 20 steps, cfg 4.0), VAEDecode, save. Built-in workflow ids exist for t2i, image edit and background removal; the edit graph feeds reference images through TextEncodeQwenImage21.

Build it yourself

Hardware. Model runs on one RTX 3090 (24 GB). A 16 GB card runs 1024-class sizes; the 2K class wants the full 24 GB and a second pass if the decode tightens. Set the GPU aside for the job or run the LLM driver on the other card.

  • CPU: AMD Ryzen 9 5900X, 12 cores / 24 threads, Zen 3
  • Motherboard: ASUS ROG STRIX X570-E GAMING WIFI II (AM4, ATX)
  • GPU: 2× NVIDIA GeForce RTX 3090, 24 GB VRAM each (the model needs one card)
  • Total VRAM: 48 GB (2 × 24 GB)
  • System RAM: 128 GB DDR4 (~121.5 GiB usable)
  • Storage: 2 TB KIOXIA EXCERIA NVMe SSD
  • OS: Ubuntu 26.04.1 LTS, headless
  • CUDA: toolkit at /usr/local/cuda-13.1
  • PCIe topology: both GPUs on the CPU root complex. X8/x8 split when both slots populated (normal for this board); Gen1 at idle → PCIe 4.0 x8 under load. Nvidia-smi topo -m shows PHB between GPUs. No NVLink
  • Cooling/chassis: open mining rig (GPU spacing + rig fans, no case). GPU 0 peaks ~73–74 °C under dual load. Routine sw_thermal/sw_power_cap throttle to ~76 °C is normal
  • Kernel mitigations in place: pcie_aspm=off, LimitMEMLOCK=infinity, orchestrator MemoryMax=110G

Download. The open Comfy-Org repack, fetched from the HuggingFace CDN with curl -C - because the hf downloader’s Xet backend hangs on this host:

# three single files into ComfyUI's model dirs:
#   models/diffusion_models/qwen_image_2.1_bf16.safetensors
#   models/text_encoders/qwen3vl_8b_bf16.safetensors
#   models/vae/qwen_image_2.1_vae_bf16.safetensors
curl -L -C - -o qwen_image_2.1_bf16.safetensors 
  https://huggingface.co/Comfy-Org/Qwen-Image-2.1/resolve/main/split_files/diffusion_models/qwen_image_2.1_bf16.safetensors

On the official Qwen repos the full pipeline also loads under diffusers; locally the ComfyUI path is the one that reaches 2K, so the diffusers tree kept the extra split copies and the blocker note.

Serve it. No server: the gen script starts ComfyUI headless on a localhost port, submits the workflow JSON to POST /prompt, waits on the history, downloads the file and shuts the server down. One session per batch; every image in the batch shares the staged weights.

Gotchas

  • The hf download / Xet CAS path hangs on this host. Use snapshot_download() or direct CDN curl -C -.
  • device_map="auto" is not supported by the diffusers pipeline; use "balanced" or manual placement.
  • Diffusers at 2752×1536: denoising completes, the VAE decode does not (~2.4 GB contiguous needed). Tiled decode at 1024 works; nobody has made 2K tile here.
  • ComfyUI needed one source patch in comfy/text_encoders/llama.py to dodge a Triton compile failure on Python 3.14.
  • GPU placement is policy, not magic: without the imggen-models.conf line the batch picked the wrong card and OOM’d on first launch (the same trap applies to any new gen script).
  • The 503 the orchestrator returns while the free GPU is taken is by design: it names the pause and tells the client how to wait.

Links. Qwen/Qwen-Image-2.1 (official card) · QwenLM/Qwen-Image-2.1 (GitHub) · Comfy-Org/Qwen-Image-2.1 (the installed repack) · ComfyUI

Leave a Reply

Your email address will not be published. Required fields are marked *