license: other
base_model:
- abenzerps/Qwen-Image-2.1-Uncensored-Quantized
tags: - gguf
- text-to-image
- qwen-image
- quantization
- mixed-precision
- stable-diffusion.cpp
- comfyui
library_name: gguf
pipeline_tag: text-to-image
language: - en
Qwen-Image-2.1 Uncensored — MIXED 4.39 GB (GGUF)
A per-layer mixed-precision quantisation of
abenzerps/Qwen-Image-2.1-Uncensored-Quantized,
built from its BF16 GGUF (14.23 GB).
4.391 GB · 4.94 bits/weight · relative weight error 0.0636
Every one of the 297 tensors was quantised independently, with all other
tensors held at full precision, and the format was then chosen per tensor to
minimise total reconstruction error under a size budget. Result: Q4_K quality
budget, ~10 % better fidelity than uniform Q4_K, at 4.39 GB instead of 4.00 GB.

Generated with this file: 1024×1024, 20 steps, euler, CFG 6.0, seed 42. No reference image.
Files
| file | size | bpw | rel. weight error | notes |
|---|---|---|---|---|
qwen-image-2.1-UC-MIXED-4.39G.gguf |
4.391 GB | 4.94 | 0.0636 | this model — recommended |
qwen-image-2.1-UC-Q4K-4.00G.gguf |
4.003 GB | 4.50 | 0.0829 | uniform Q4_K, for comparison |
Composition of the mixed build: Q4_K ×126, Q5_K ×105, F16 ×66. The 66 F16
tensors are the block RMS norms plus two odd-shaped tensors (ne0 = 64), which
cannot be block-quantised; they are ~0.01 % of the file.
How the bits were assigned
For each tensor, five encodings were built and the true error||W − W_q||_F² measured. Formats were then allocated globally to minimise
sum_tensors ||W − W_q||_F^2 subject to total size <= budget
which is the expected output-perturbation energy under an isotropic-input
assumption. The allocation is a Lagrangian λ-sweep over the measured
per-tensor byte/error pairs.

Sensitivity is nearly flat across depth (block-level relative error 0.043–0.084),
so most of the gain comes from choosing better formats for a subset of tensors
rather than from redistributing bits. Early blocks and the most sensitive lateattn.to_v / modulation.1 tensors receive Q5_K; the rest run Q4_K.

Quality
Measured by actually rendering, not only in weight space.
Engine stable-diffusion.cpp (master-975-95b3090, CUDA 12), RTX 4070 Laptop
8 GB with --offload-to-cpu, 1024×1024, 20 steps, euler, CFG 6.0.
| subject (same seed per row) | mixed vs BF16 | uniform Q4_K vs BF16 |
|---|---|---|
| elderly fisherman portrait | 26.56 dB | 23.21 dB |
| snowy alpine village | 18.05 dB | 19.12 dB |
| car at night | 31.45 dB | 29.18 dB |
| astronaut on the moon | 20.96 dB | 18.25 dB |
| mean | 24.25 dB | 22.44 dB |
The mixed build wins on 3 of 4 subjects. At 1:1 crop, skin pores, hair and
fabric weave are indistinguishable between BF16 and both quantised builds.

Differences between the two quantised builds at image level are mostly the
sampler amplifying sub-percent latent drift, not structural damage; the
weight-space numbers above are the reliable comparison.
Usage
stable-diffusion.cpp
sd-cli.exe \
--diffusion-model qwen-image-2.1-UC-MIXED-4.39G.gguf \
--vae qwen_image_2.1_vae_bf16.safetensors \
--llm Qwen3VL-8B-Instruct-Q4_K_M.gguf \
-p "a weathered stone lighthouse on a basalt cliff during a storm at blue hour" \
--cfg-scale 6.0 --sampling-method euler --steps 20 \
-W 1024 -H 1024 --seed 42 --offload-to-cpu -o out.png
Needs the Qwen-Image-2.1 VAE and a Qwen3-VL-8B text encoder; both are available
from Comfy-Org/Qwen-Image-2.1.
ComfyUI
Drop into models/diffusion_models/, load with Unet Loader (GGUF) from
ComfyUI-GGUF, and set the CLIPLoader
type to qwen_image.
Notes and caveats
- Use 1024 or larger. At 512×512 this model produces noise — including from
the pristine BF16 weights. It is a 1024-class model. - Dimensions should be divisible by 32.
- The error metric assumes isotropic inputs; activation-aware allocation would
need calibration data and was not used. - Q4_K is the lowest format implemented here, so 4.00 GB is the floor for
uniform builds. Q3_K/Q2_K are not included. - Generated samples inherit the uncensored behaviour and biases of the base
model. You are responsible for how you use it.
Credits
- Base: abenzerps/Qwen-Image-2.1-Uncensored-Quantized
- Upstream: Qwen/Qwen-Image-2.1
- Engine: leejet/stable-diffusion.cpp
Quantisation, measurements and samples produced locally. Licence follows the
base model (other); check its terms before redistribution or commercial use.