Files
aigen/docs/qwen21.md
T

2.7 KiB
Raw Blame History

Qwen Image 2.1 (engine qwen21) — host weights + Comfy graph

Host paths (this RTX 5080 box)

Role Resolved path
ComfyUI root (Klein / host agent ComfyUI (1)) C:\Users\ianjm\AppData\Local\Comfy-Desktop\ComfyUI-Installs\ComfyUI (1)\ComfyUI
Models root (Desktop Shared via shared_model_paths.yaml) C:\Users\ianjm\AppData\Local\Comfy-Desktop\ComfyUI-Shared\models

Weights must land under Shared so every Desktop instance sees them:

  • diffusion_models\qwen-image-2.1-Q8_0.gguf (~7.59 GiB) — from abenzerps/Qwen-Image-2.1-Uncensored-GGUF
  • text_encoders\qwen3vl_8b_int8_convrot.safetensors — from Comfy-Org/Qwen-Image-2.1 (INT8; BF16 8B VL OOMs on 16 GB)
  • vae\qwen_image_2.1_vae_bf16.safetensors — from Comfy-Org/Qwen-Image-2.1 (not the old Qwen-Image 1.0 VAE)

Custom node: custom_nodes\ComfyUI-GGUF (UnetLoaderGGUF). Do not install a second GGUF pack.

Setup

powershell -ExecutionPolicy Bypass -File scripts\setup-qwen21.ps1

DiT download uses the exact host invocation:

hf download hf://abenzerps/Qwen-Image-2.1-Uncensored-GGUF/qwen-image-2.1-Q8_0.gguf

That lands in the Hugging Face hub cache; the setup script copies it into Shared diffusion_models. The abenzerps GGUF ships with kv_count=0 (no general.architecture) and Q8_0-quantized 1D RMSNorm weights (logical 128 → packed 136), which breaks Comfy’s fused rms_rope. scripts/tag-qwen21-gguf.py rewrites the file with general.architecture=qwen_image and promotes small/1D tensors to F32 so city96 UnetLoaderGGUF can load it.

Restart Comfy only when idle (COMFY_CONTROL_URL/status → gpu.busy=false). Confirm object_info lists UnetLoaderGGUF and the three filenames.

App

  • Engine key: qwen21 · UI label: Qwen 2.1
  • Generate (T2I) and Edit (same checkpoint, second graph). Compose / Iterate / Video / Extend / Music stay disabled unless a graph exists.
  • Edit requires Start still → images.image_1; prompt slots use <image1> / <image2>. If the user omits <image1>, the runner prepends Keep the subject in <image1>.
  • Face / outfit locks stay Klein semantics — they do not drive Qwen slots.
  • Sampler defaults: euler / simple / cfg 1 / steps 25. Edit uses QwenImage21Cache (device auto, dtype int8). T2I uses ModelSamplingAuraFlow shift 3.1.
  • Default canvas 1024×1024 (aspect 16:9 / 9:16 / 1:1 → long-edge ~1024 via TextEncodeQwenImage21 resolution; multiples of 32). Edit with aspect auto follows image_1 aspect at ~1024.
  • No hero / locks / Klein LoRA stack on this engine.

Graphs: server/assets/studio2_qwen21_t2i.json, server/assets/studio2_qwen21_edit.json.