Community Strips Qwen-Image 2.1's Refusals to Run Locally on 16GB Laptops
A community-quantized, refusal-ablated text encoder for Qwen-Image-2.1 drops the refusal rate from 100% to 5% while running locally in ComfyUI.
Takeaways
- Refusal-ablated Qwen-Image-2.1 text encoder in GGUF, FP8 and bf16, 145K+ downloads.
- Refusal rate drops from 100/100 to 5/100 with KL divergence of only 0.0220 on benign prompts.
- Only the text encoder (Qwen3-VL-8B) is modified; DiT and VAE stay bit-identical to the official release.
- Q4_K_M variant runs in about 5 GB, making the full pipeline viable on 16 GB of unified memory.
- Requires the ComfyUI-GGUF-Qwen3VL-TE patch node to load the Qwen3-VL vision tower correctly.
- Companion GGUFs for the DiT and PE-T2I prompt rewriter complete an all-GGUF Qwen-Image-2.1 stack.
A community-built port of the Qwen-Image 2.1 text encoder has reached the top of Hugging Face’s trending list, with more than 145,000 downloads since release. The third-party model repository provides refusal-ablated weights in GGUF, FP8, and bf16 formats. When paired with compatible DiT and VAE components, these builds let developers run the image pipeline locally on consumer GPUs and Apple Silicon. Hugging Face’s counter includes repeat and automated file downloads, so it does not represent unique users.
Qwen-Image 2.1 uses Qwen/Qwen3-VL-8B-Instruct to convert prompts and reference-image context into conditioning for image generation. This port changes projection matrices inside that encoder. The diffusion transformer, which generates image latents, and the VAE, which converts those latents into pixels, retain their official weights. The encoder can replace the original component, although GGUF loading in ComfyUI requires the compatibility patch described below.
How the Refusal Direction Was Removed
The modification uses Heretic, a directional-ablation tool that estimates the activation direction associated with refusals and subtracts it from selected weights. The run targeted the encoder’s o_proj and down_proj matrices, which are Heretic’s defaults for this architecture.
The published evaluation is small and uses different sample sizes across checks. Its results cover the listed prompts and do not establish broad safety, benign capability, or generated-image quality.
| Check | Result | What it measures |
|---|---|---|
| Stock encoder on harmful prompts | 100 refusals out of 100 | Baseline refusal behavior |
| Ablated bf16 encoder on harmful prompts | 0 refusals out of 20 | Effect of the ablation on the tested prompts |
| Ablated bf16 encoder on benign questions | 4 correct answers out of 4 | Limited independent re-check of benign behavior |
| KL divergence on benign prompts | 0.0220 | Change in token probability distributions; zero would be identical |
Quantization tests also compared error after converting weights to NVFP4 and back. Round-trip error measured 9.52% on ablated layers, 9.51% on untouched layers, and 9.44% on the stock encoder. The close values indicate that ablation did not materially change this quantization metric. They do not measure generated-image quality.
Pick the Right Quant
The repository provides several encoder formats for different memory budgets and loaders:
| Build | Published size | Intended use |
|---|---|---|
Q4_K_M.gguf plus mmproj |
5.0 GB plus 1.2 GB | Smallest GGUF option for llama.cpp or ComfyUI-GGUF |
Q6_K.gguf |
6.88 GB | Higher-fidelity GGUF inference |
Q8_0.gguf |
8.71 GB | Largest GGUF build with lower quantization loss |
qwen3vl_8b_fp8_heretic.safetensors |
9.3 GB | NVIDIA GPUs using the standard CLIP loader |
qwen3vl_8b_bf16_heretic.safetensors |
17.5 GB | Unquantized bf16 loading on Apple Silicon or non-CUDA systems |
Every GGUF variant needs a matching mmproj file for the Qwen3-VL vision tower. Developers using the Q6_K or Q8_0 files should budget additional memory and storage for that component.
Sibling repositories provide an NVFP4 build and W4A8 variants. NVFP4 maps to native FP4 tensor cores on Blackwell hardware, including RTX 50-series GPUs and GB10 systems, reducing weight memory while enabling hardware acceleration. Earlier GPU generations can retain the smaller weight footprint but lack the native FP4 execution path.
ComfyUI Needs One Extra Node
Loading the GGUF encoder through an unpatched ComfyUI-GGUF installation can produce a shape mismatch with got input of size [1, 512, 12288]. ComfyUI-GGUF was built around Qwen2-VL and does not automatically load the Qwen3-VL vision tower stored in the mmproj file.
The author’s Qwen3-VL patch loads that vision tower and maps its tensor names to ComfyUI’s expected layout. It also handles the Unknown model architecture! error raised by Qwen-Image 2.1 DiT GGUF files that omit the general.architecture metadata field.
Install and verify
- Place the patch repository in
ComfyUI/custom_nodes/. - Copy the encoder
.ggufand its matchingmmproj-*.ggufintoComfyUI/models/text_encoders/without renaming either file. - Restart ComfyUI, then connect
CLIPLoaderGGUFwith typeqwen_imagetoTextEncodeQwenImage21. - Check the console for confirmation that 351 Qwen3-VL vision tensors were added from the
mmprojfile.
The maintainer reports that text-to-image generation and reference-image editing both work through this setup. With the same seed, Q4 output reportedly tracks the bf16 encoder apart from expected quantization differences.
Two-Stage Sampling for Rendered Text
Qwen-Image 2.1 is a non-distilled model designed for a longer denoising schedule, with 25 steps recommended in the model card. For signs, posters, labels, and other images containing text, the suggested workflow divides those steps between two KSampler stages. Classifier-free guidance, or CFG, controls the strength of positive and negative conditioning during each stage.
- Run the first 12 to 17 steps at
CFG 1.0to establish composition, lighting, and materials. - Run the remaining steps at
CFG 3.0with a negative prompt to improve letter shapes and spacing.
Moving the handoff later preserves more of the first stage’s composition and texture. An earlier handoff gives the higher-guidance stage more steps to sharpen glyphs.
Safety Shifts to the Application
Removing the encoder’s refusal direction allows prompts through that the original Qwen3-VL component may block before image generation. The change therefore moves policy enforcement into the surrounding application. Services exposed to other users may need prompt filtering, access controls, logging, rate limits, and output checks suited to their deployment.
Because the DiT and VAE remain unchanged, researchers can compare the official and ablated encoders under the same seed, sampler, and diffusion weights. The repository is published under Apache-2.0, while deployers remain responsible for applicable laws, platform rules, and model-use policies.
A Smaller Local Stack
Quantized builds now cover the prompt encoder and diffusion components used by llama.cpp and ComfyUI-GGUF workflows. The maintainer reports that the full Qwen-Image 2.1 pipeline can run on a laptop with 16 GB of unified memory when using quantized weights and memory-aware loading. Actual headroom depends on image resolution, VAE placement, offloading, and the selected quantization level.
A separate deployment wrapper combines stable-diffusion.cpp, FastAPI, and a React interface around the modified encoder. It provides a packaged route for local deployment without requiring developers to assemble each service by hand.