Instructions to use darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
Use pre-built binary
# Download pre-built binary from: # https://github.com/ggerganov/llama.cpp/releases # Start a local OpenAI-compatible server with a web UI: ./llama-server -hf darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M # Run inference directly in the terminal: ./llama-cli -hf darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggerganov/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-server llama-cli # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama-server -hf darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama-cli -hf darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
Use Docker
docker model run hf.co/darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
- LM Studio
- Jan
- vLLM
How to use darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
- Ollama
How to use darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF with Ollama:
ollama run hf.co/darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF with Docker Model Runner:
docker model run hf.co/darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
- Lemonade
How to use darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Qwen-Image-2.1-Text-Encoder-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Use Docker
docker model run hf.co/darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF:Qwen-Image-2.1 Text Encoder: GGUF
GGUF builds of the text encoder shipped in
Qwen/Qwen-Image-2.1 (text_encoder/). That encoder is stock
Qwen/Qwen3-VL-8B-Instruct: all 750 tensors match in name, shape
and dtype, and every sampled tensor is byte-identical. So these files also work as a general Qwen3-VL-8B-Instruct
GGUF.
| File | Quant | Size |
|---|---|---|
Qwen-Image-2.1-Text-Encoder-BF16.gguf |
BF16 (lossless) | 16.39 GB |
Qwen-Image-2.1-Text-Encoder-Q8_0.gguf |
Q8_0 | 8.71 GB |
Qwen-Image-2.1-Text-Encoder-Q6_K.gguf |
Q6_K, imatrix, see below | 7.06 GB |
Qwen-Image-2.1-Text-Encoder-Q4_K_M.gguf |
Q4_K_M, imatrix, see below | 5.67 GB |
Qwen-Image-2.1-Text-Encoder-mmproj-F16.gguf |
vision projector, F16 | 1.16 GB |
The mmproj file carries the vision tower, needed for image-conditioned (edit) prompts.
Q6_K and Q4_K_M are not stock recipes. Plain Q6_K visibly garbled rendered text, so both use:
- an importance matrix computed on ~1500 real image prompts wrapped in the pipeline's own encoder template
(
llama-imatrix --parse-special); - the last 4 decoder layers (32-35) kept at Q8_0, because the pipeline reads the last layer's output directly;
- token embeddings at Q8_0.
Recommendation: Q8_0 if it fits. Q6_K is the smallest build that rendered text correctly in testing. Q4_K_M is usable, but at the same seed it changes composition and can misspell rendered text.
How they were tested
For a diffusion text encoder, what matters is what the image model reads: the last decoder layer's hidden
states before the final norm, from the pipeline's own prompt templates. Chat quality and perplexity don't measure
that. Each quant was dequantized back into the HF model and run through diffusers' QwenImage21Pipeline.encode_prompt
on held-out prompts (12 text-to-image, 8 image-edit on 2 held-out images), then compared token by token with the bf16
original. Same-seed 1024px images were also rendered with each encoder.
| Build | Mean token cosine vs bf16 | Relative L2 error | Rendered text (same seed) |
|---|---|---|---|
| BF16 | 1.00000 (exact) | 0 | identical image |
| Q8_0 | 0.9938 | 0.070 (text-only 0.044, edit 0.110) | correct, same layout |
| Q6_K (imatrix recipe) | 0.9863 | 0.112 (text-only 0.079, edit 0.160) | correct, same layout |
| Q4_K_M (imatrix recipe) | 0.9319 | 0.295 (text-only 0.253, edit 0.358) | one of two titles misspelled ("224 Hours"), layout changed |
For comparison, stock-recipe Q6_K measured 0.979 / 0.145 and garbled a book title; stock Q4_K_M measured 0.872 / 0.394. Image-edit prompts (through the vision tower) always err more than text-only ones.
Q8_0, Q6_K and Q4_K_M were also run in llama-server with the mmproj. Each answered text questions correctly and described
a held-out photo accurately.
Use
llama-server -m Qwen-Image-2.1-Text-Encoder-Q8_0.gguf --mmproj Qwen-Image-2.1-Text-Encoder-mmproj-F16.gguf --jinja -ngl 99
Converted with llama.cpp's convert_hf_to_gguf.py (bd4f514) and quantized with llama-quantize (Q8_0 without imatrix; Q6_K / Q4_K_M as described above).
License: Apache-2.0, the license of Qwen3-VL-8B-Instruct. (The rest of Qwen-Image-2.1 is under the Qwen Research License; this repository contains only the encoder.)
- Downloads last month
- 1,722
4-bit
6-bit
8-bit
16-bit
Model tree for darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF
Base model
Qwen/Qwen3-VL-8B-Instruct
Install from pip and serve model
# Install vLLM from pip: pip install vllm# Start the vLLM server: vllm serve "darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF"# Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "darrellbest/Qwen-Image-2.1-Text-Encoder-GGUF", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'