README.md
| 1 | --- |
| 2 | license: other |
| 3 | license_name: qwen-research |
| 4 | base_model: |
| 5 | - Qwen/Qwen-Image-2.1-Turbo |
| 6 | base_model_relation: quantized |
| 7 | pipeline_tag: text-to-image |
| 8 | library_name: gguf |
| 9 | tags: |
| 10 | - gguf |
| 11 | - qwen |
| 12 | - image-generation |
| 13 | - comfyui |
| 14 | - comfyui-gguf |
| 15 | - mlx |
| 16 | - fp8 |
| 17 | - nvfp4 |
| 18 | --- |
| 19 | |
| 20 | # Qwen-Image-2.1 Turbo Quantized |
| 21 | |
| 22 | <div align="center"> |
| 23 | |
| 24 | [](https://abenzerps.com/request-a-model/) |
| 25 | [](https://github.com/abenzerps) |
| 26 | |
| 27 | </div> |
| 28 | |
| 29 | <p align="center"> |
| 30 | <img src="./assets/Qwen-Image-2.1-Benchmark.png" alt="Qwen-Image-2.1 benchmark comparison" width="1010"> |
| 31 | </p> |
| 32 | |
| 33 | **The base model, [Qwen-Image-2.1-Turbo](https://huggingface.co/Qwen/Qwen-Image-2.1-Turbo), natively supports uncensored image generation.** No built-in safety checker or content filter is applied, and no special settings are needed. |
| 34 | |
| 35 | **1024 × 1024 generation takes approximately 10–20 seconds on GPU after warm-up, depending on hardware.** |
| 36 | |
| 37 | - **Base Model:** [Qwen/Qwen-Image-2.1-Turbo](https://huggingface.co/Qwen/Qwen-Image-2.1-Turbo) · **7B** visual generation architecture |
| 38 | - **Turbo Generation:** **8 denoising steps** · upstream default **CFG = 1** |
| 39 | - **Available Formats:** **GGUF** · **FP8 / INT8 ConvRot / NVFP4 Safetensors** · **MLX 4-bit / 6-bit / 8-bit** |
| 40 | |
| 41 | ## Turbo Quantized Files |
| 42 | |
| 43 | | **Quantization** | **File** | **Size** | |
| 44 | | --- | --- | ---: | |
| 45 | | FP8 | [**qwen-image-2.1-turbo-fp8.safetensors**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/qwen-image-2.1-turbo-fp8.safetensors) | 7.13 GB | |
| 46 | | INT8 ConvRot | [**qwen-image-2.1-turbo-int8_convrot.safetensors**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/qwen-image-2.1-turbo-int8_convrot.safetensors) | 7.26 GB | |
| 47 | | NVFP4 | [**qwen-image-2.1-turbo-NVFP4.safetensors**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/qwen-image-2.1-turbo-NVFP4.safetensors) | 4.20 GB | |
| 48 | | MLX 4-bit | [**qwen-image-2.1-turbo-MLX-4bit.safetensors**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/qwen-image-2.1-turbo-MLX-4bit.safetensors) | 4.00 GB | |
| 49 | | MLX 6-bit | [**qwen-image-2.1-turbo-MLX-6bit.safetensors**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/qwen-image-2.1-turbo-MLX-6bit.safetensors) | 5.78 GB | |
| 50 | | MLX 8-bit | [**qwen-image-2.1-turbo-MLX-8bit.safetensors**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/qwen-image-2.1-turbo-MLX-8bit.safetensors) | 7.56 GB | |
| 51 | | Q8_0 | [**qwen-image-2.1-turbo-Q8_0.gguf**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/qwen-image-2.1-turbo-Q8_0.gguf) | 7.59 GB | |
| 52 | | Q6_K | [**qwen-image-2.1-turbo-Q6_K.gguf**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/qwen-image-2.1-turbo-Q6_K.gguf) | 5.88 GB | |
| 53 | | Q5_K_M | [**qwen-image-2.1-turbo-Q5_K_M.gguf**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/qwen-image-2.1-turbo-Q5_K_M.gguf) | 4.94 GB | |
| 54 | | Q4_K_M | [**qwen-image-2.1-turbo-Q4_K_M.gguf**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/qwen-image-2.1-turbo-Q4_K_M.gguf) | 4.05 GB | |
| 55 | | Q4_0 | [**qwen-image-2.1-turbo-Q4_0.gguf**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/qwen-image-2.1-turbo-Q4_0.gguf) | 4.05 GB | |
| 56 | |
| 57 | **Choosing a format:** Start with **Q4_K_M** for GGUF or **INT8 ConvRot** for ComfyUI Safetensors. See **Usage** for runtime instructions and model setup. |
| 58 | |
| 59 | ## Text Encoders & VAE |
| 60 | |
| 61 | Companion model files packaged for ComfyUI: |
| 62 | |
| 63 | | **Type** | **File** | **Precision** | **Size** | |
| 64 | | --- | --- | --- | ---: | |
| 65 | | Text Encoder | [**text_encoders/qwen3vl_8b_bf16.safetensors**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/text_encoders/qwen3vl_8b_bf16.safetensors) | BF16 | 17.53 GB | |
| 66 | | Text Encoder | [**text_encoders/qwen3vl_8b_int8_convrot.safetensors**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/text_encoders/qwen3vl_8b_int8_convrot.safetensors) | Int8 | 9.35 GB | |
| 67 | | VAE | [**vae/qwen_image_2.1_vae_bf16.safetensors**](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/vae/qwen_image_2.1_vae_bf16.safetensors) | BF16 | 0.68 GB | |
| 68 | |
| 69 | ## Usage |
| 70 | |
| 71 | | I want to use… | Choose… | |
| 72 | | :--- | :--- | |
| 73 | | **ComfyUI** | **GGUF** or **FP8 / INT8 ConvRot / NVFP4 Safetensors** | |
| 74 | | **A command-line runtime** | **GGUF** or supported **Safetensors** with **stable-diffusion.cpp** | |
| 75 | | **MLX / MFLUX** | **MLX 4/6/8-bit**; follow the setup below | |
| 76 | |
| 77 | **Recommended Turbo baseline:** **Euler · CFG 1.0 · 8 steps with the official sigma schedule · 1024 × 1024 · batch 1**. Keep the seed fixed when comparing results. Start with **Q4_K_M** for GGUF or **INT8 ConvRot** for Safetensors. |
| 78 | |
| 79 | <details> |
| 80 | <summary><b>ComfyUI — GGUF & Safetensors</b></summary> |
| 81 | |
| 82 | Update [ComfyUI](https://github.com/Comfy-Org/ComfyUI) and open **Qwen Image 2.1 Turbo — Text to Image** in the Template Library ([official workflow JSON](https://github.com/Comfy-Org/workflow_templates/blob/main/templates/image_qwen_image_2_1_turbo_t2i.json)). Use the **Turbo** template to keep its correct sampling schedule. |
| 83 | |
| 84 | Download **one diffusion model**, the **text encoder**, and the **VAE** from the tables above: |
| 85 | |
| 86 | | Component | File | Folder inside ComfyUI | |
| 87 | | :--- | :--- | :--- | |
| 88 | | Diffusion — choose one | `qwen-image-2.1-turbo-Q4_K_M.gguf` **or** `qwen-image-2.1-turbo-int8_convrot.safetensors` | `models/diffusion_models/` | |
| 89 | | Text encoder | `qwen3vl_8b_int8_convrot.safetensors` | `models/text_encoders/` | |
| 90 | | VAE | `qwen_image_2.1_vae_bf16.safetensors` | `models/vae/` | |
| 91 | |
| 92 | Restart ComfyUI after adding the files. Open the template's subgraph to access its internal loaders if needed. |
| 93 | |
| 94 | **Safetensors** |
| 95 | |
| 96 | 1. In **Load Diffusion Model** (`UNETLoader`), select your Turbo `.safetensors` file and leave `weight_dtype` at **default**. |
| 97 | 2. In **Load CLIP**, select the text encoder and set `type: qwen_image`. Select the VAE in **Load VAE**. |
| 98 | 3. Enter your prompt and run. Leave optional prompt enhancement off for the initial setup. |
| 99 | |
| 100 | **GGUF** |
| 101 | |
| 102 | Install [leejet/ComfyUI-GGUF](https://github.com/leejet/ComfyUI-GGUF) using ComfyUI's Python environment, then restart: |
| 103 | |
| 104 | ```bash |
| 105 | git clone https://github.com/leejet/ComfyUI-GGUF custom_nodes/ComfyUI-GGUF |
| 106 | python -m pip install -r custom_nodes/ComfyUI-GGUF/requirements.txt |
| 107 | ``` |
| 108 | |
| 109 | 1. Replace **Load Diffusion Model** with **Unet Loader (GGUF)** and select your `.gguf` file. |
| 110 | 2. Reconnect its **MODEL** output to the same downstream input, keeping the template's **Qwen Image 2.1 Cache** and sampler chain. |
| 111 | 3. Select the same text encoder and VAE as above, then run. The text encoder still uses the regular **Load CLIP** node with `type: qwen_image`. |
| 112 | |
| 113 | Keep the cache at **auto / default**. Try **2048 × 2048** for more detail once the initial setup works. It needs more memory and time; model file size is not total VRAM use. If memory is insufficient, reduce resolution or use a smaller GGUF; `--lowvram` is another option. |
| 114 | |
| 115 | **FP8:** The included file has corrected scaling keys and was tested with the standard ComfyUI loader and stable-diffusion.cpp. Keep `weight_dtype` at **default** in ComfyUI. |
| 116 | |
| 117 | </details> |
| 118 | |
| 119 | <details> |
| 120 | <summary><b>Turbo sampling — the exact eight-step schedule</b></summary> |
| 121 | |
| 122 | Keep **ManualSigmas → SamplerCustomAdvanced** from the official template: |
| 123 | |
| 124 | ```text |
| 125 | 1.0, 0.978453, 0.95418, 0.926626, 0.89508, 0.845148, 0.704534, 0.414568, 0 |
| 126 | ``` |
| 127 | |
| 128 | Nine sigma values define **eight steps**. Setting a regular KSampler to eight steps with `simple` does not reproduce this schedule. At **CFG 1**, negative prompts have no effect. The full Turbo checkpoint needs no additional Turbo or Lightning LoRA. |
| 129 | |
| 130 | </details> |
| 131 | |
| 132 | <details> |
| 133 | <summary><b>Command-line usage — GGUF & Safetensors</b></summary> |
| 134 | |
| 135 | **1. Install the runtime** |
| 136 | |
| 137 | Use a current [stable-diffusion.cpp release](https://github.com/leejet/stable-diffusion.cpp/releases) for your operating system, or build it from source. The Bash commands below build the NVIDIA CUDA version; install Git, CMake, a C++ compiler, and the CUDA Toolkit first: |
| 138 | |
| 139 | ```bash |
| 140 | git clone --recursive https://github.com/leejet/stable-diffusion.cpp |
| 141 | cd stable-diffusion.cpp |
| 142 | cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DSD_CUDA=ON |
| 143 | cmake --build build --config Release -j |
| 144 | ``` |
| 145 | |
| 146 | On Apple Silicon, replace `-DSD_CUDA=ON` with `-DSD_METAL=ON`. For a CPU-only build, omit that option. |
| 147 | |
| 148 | **2. Download the three required files** |
| 149 | |
| 150 | Choose **one Turbo diffusion model**, the text encoder, and the VAE from the tables above. Put them inside the runtime directory: |
| 151 | |
| 152 | ```text |
| 153 | stable-diffusion.cpp/ |
| 154 | ├── build/bin/sd-cli |
| 155 | └── models/ |
| 156 | ├── qwen-image-2.1-turbo-Q4_K_M.gguf |
| 157 | ├── qwen3vl_8b_int8_convrot.safetensors |
| 158 | └── qwen_image_2.1_vae_bf16.safetensors |
| 159 | ``` |
| 160 | |
| 161 | **3. Generate an image** |
| 162 | |
| 163 | Run from `stable-diffusion.cpp/`: |
| 164 | |
| 165 | ```bash |
| 166 | ./build/bin/sd-cli \ |
| 167 | --diffusion-model models/qwen-image-2.1-turbo-Q4_K_M.gguf \ |
| 168 | --llm models/qwen3vl_8b_int8_convrot.safetensors \ |
| 169 | --vae models/qwen_image_2.1_vae_bf16.safetensors \ |
| 170 | --sigmas qwen-image-2.1-turbo \ |
| 171 | --steps 8 --cfg-scale 1.0 --sampling-method euler \ |
| 172 | --width 1024 --height 1024 --seed 42 \ |
| 173 | --offload-to-cpu \ |
| 174 | -p "A natural light portrait photograph" -o output.png |
| 175 | ``` |
| 176 | |
| 177 | The result is saved as **`output.png` in the current directory**. Replace the prompt with your description. On Windows, the built executable is typically `build\bin\Release\sd-cli.exe`; it accepts the same arguments. |
| 178 | |
| 179 | **4. Switch to Safetensors** |
| 180 | |
| 181 | Download `qwen-image-2.1-turbo-int8_convrot.safetensors` into `models/` and change only the `--diffusion-model` filename. Keep the text encoder, VAE, and Turbo sampling settings unchanged. |
| 182 | |
| 183 | </details> |
| 184 | |
| 185 | <details> |
| 186 | <summary><b>MLX — MFLUX (4 / 6 / 8-bit)</b></summary> |
| 187 | |
| 188 | Use **MFLUX** with these MLX weights. This is a separate workflow from ComfyUI. The preparation below uses **this repository's selected quantized transformer** and downloads the text encoder, VAE, and configuration files from the official Turbo checkpoint. |
| 189 | |
| 190 | **1. Install MFLUX** |
| 191 | |
| 192 | Use Python **3.11 or newer** in a supported MLX environment: **Apple Silicon / macOS 14+**, or **Linux with CUDA 13 support**. Create an environment: |
| 193 | |
| 194 | ```bash |
| 195 | python3 -m venv .venv |
| 196 | source .venv/bin/activate |
| 197 | python -m pip install --upgrade pip |
| 198 | python -m pip install mflux==0.24.0 |
| 199 | ``` |
| 200 | |
| 201 | **2. Prepare the local model once** |
| 202 | |
| 203 | Set `bits` to **4**, **6**, or **8** below. The first run also downloads the companion components; the MLX file size in the table covers the transformer only. This step arranges the files and adds loader metadata without re-quantizing the weights. |
| 204 | |
| 205 | ```bash |
| 206 | python - <<'PY' |
| 207 | import json, shutil |
| 208 | from pathlib import Path |
| 209 | from huggingface_hub import hf_hub_download, snapshot_download |
| 210 | |
| 211 | bits = 4 |
| 212 | assert bits in (4, 6, 8) |
| 213 | root = Path("qwen-turbo-mlx") |
| 214 | snapshot_download( |
| 215 | "Qwen/Qwen-Image-2.1-Turbo", local_dir=root, |
| 216 | allow_patterns=["model_index.json", "processor/**", "scheduler/*.json", |
| 217 | "transformer/config.json", "text_encoder/**", "vae/**"], |
| 218 | ) |
| 219 | source = hf_hub_download( |
| 220 | "abenzerps/Qwen-Image-2.1-Turbo-Quantized", |
| 221 | f"qwen-image-2.1-turbo-MLX-{bits}bit.safetensors", |
| 222 | ) |
| 223 | with open(source, "rb") as src: |
| 224 | header = json.loads(src.read(int.from_bytes(src.read(8), "little"))) |
| 225 | header["__metadata__"] = {**header.get("__metadata__", {}), |
| 226 | "quantization_level": str(bits)} |
| 227 | raw = json.dumps(header, separators=(",", ":")).encode() |
| 228 | raw += b" " * (-len(raw) % 8) |
| 229 | target = root / "transformer/model.safetensors" |
| 230 | temporary = target.with_suffix(".tmp") |
| 231 | with temporary.open("wb") as dst: |
| 232 | dst.write(len(raw).to_bytes(8, "little")) |
| 233 | dst.write(raw) |
| 234 | shutil.copyfileobj(src, dst, 16 * 1024 * 1024) |
| 235 | temporary.replace(target) |
| 236 | print(f"Ready: {root}") |
| 237 | PY |
| 238 | ``` |
| 239 | |
| 240 | **3. Generate an image** |
| 241 | |
| 242 | ```bash |
| 243 | mflux-generate-qwen-2.1 \ |
| 244 | --model ./qwen-turbo-mlx \ |
| 245 | --base-model qwen-image-2.1-turbo \ |
| 246 | --prompt "A natural light photograph of a red ceramic cup" \ |
| 247 | --width 1024 --height 1024 --steps 8 --seed 42 \ |
| 248 | --low-ram --output output.png |
| 249 | ``` |
| 250 | |
| 251 | The image is saved as **`output.png` in the current directory**. Allow extra time for model loading and compilation before sampling starts. Later runs need only the generation command with the environment activated. Keep the Turbo defaults of **8 steps and guidance 1**. To change precision, repeat preparation with another `bits` value; the generation command stays the same. |
| 252 | |
| 253 | </details> |
| 254 | |
| 255 | ## Credits & License |
| 256 | |
| 257 | - **Original model — [Qwen](https://huggingface.co/Qwen/Qwen-Image-2.1-Turbo):** Developed Qwen-Image-2.1-Turbo and released the original model weights. |
| 258 | - **Companion models — [Comfy-Org](https://huggingface.co/Comfy-Org/Qwen-Image-2.1):** Provided the ComfyUI-ready text encoder and VAE files. |
| 259 | - **ComfyUI workflow — [ComfyUI](https://github.com/Comfy-Org/ComfyUI) & [ComfyUI-GGUF](https://github.com/leejet/ComfyUI-GGUF):** The node-based generation interface and GGUF model loader used in this guide. |
| 260 | - **Command-line generation & GGUF tools — [stable-diffusion.cpp](https://github.com/leejet/stable-diffusion.cpp):** Tools for model conversion, GGUF quantization, and standalone image generation. |
| 261 | - **MLX generation — [MFLUX](https://github.com/mflux-community/mflux):** The MLX inference implementation used to load and run the 4/6/8-bit files in this guide. |
| 262 | - **Quantization support — [comfy-kitchen](https://github.com/Comfy-Org/comfy-kitchen):** Quantization tools and ComfyUI’s FP8/NVFP4 backend. |
| 263 | |
| 264 | - **Model license — [Qwen Research License](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/LICENSE)** |
| 265 | |
| 266 | **File integrity:** [SHA256SUMS](https://huggingface.co/abenzerps/Qwen-Image-2.1-Turbo-Quantized/blob/main/SHA256SUMS) |
| 267 | |