Qwen3-VL-4B text encoder (GGUF)

Krea 2 / Mage-Flow が条件付けに使う Qwen3-VL-4B のテキスト塔だけを GGUF 化したものです。 VRAM にテキストエンコーダが乗り切らない環境向け(bf16 8.9GB → q4 で 2.4GB)。

ファイル サイズ HF bf16 との隠れ状態誤差
qwen3vl-4b-q8_0.gguf 4.3GB 約3%
qwen3vl-4b-q4_k_m.gguf 2.4GB 約17%

数値誤差はありますが、Mage-Flow-Turbo での同一シード生成画像は bf16 条件付けと見分けがつきませんでした(q8/q4 とも実測)。この系統の拡散モデルの条件付けは量子化にかなり頑健です。

使い方(llama.cpp — 動作確認済み)

llama-server -m qwen3vl-4b-q4_k_m.gguf --embeddings --pooling none -c 1024

/embeddingトークンID配列で POST({"content": [ids], "embd_normalize": -1})し、 先頭34トークン(システム/ユーザーテンプレート部)を剥がすと Krea/Mage の last_hidden_state 相当(トークン毎 2560 次元)が得られます。文字列で渡すと トークン化が HF と数トークンずれるので ID 渡し推奨。テンプレートは Krea/Mage 共通:

<|im_start|>system
Describe the image by detailing the color, shape, size, texture, quantity, text, spatial relationships of the objects and background:<|im_end|>
<|im_start|>user
{プロンプト}<|im_end|>
<|im_start|>assistant

翻訳などの通常のチャット生成(/v1/chat/completions)も同じサーバでそのまま動きます。

ComfyUI について(未検証)

ComfyUI-GGUF の CLIPLoader (gguf) で読める可能性がありますが未検証です。 まずは公式の qwen3vl_4b_fp8_scaled.safetensors(5.24GB、Comfy-Org/Krea-2)を試し、 それでも足りない場合の選択肢としてどうぞ。

変換メモ

  • 変換元: Mage-Flow 配布の qwen3vl_4b_bf16.safetensors(Krea 2 と同一重み)
  • llama.cpp b10194 convert_hf_to_gguf.py。config.json の architecturesQwen3VLForConditionalGeneration に書き換えると視覚塔を自動スキップして テキスト塔だけが変換されます
  • q4_k_m は q8_0 からの再量子化(llama-quantize --allow-requantize)
Downloads last month
142
GGUF
Model size
4B params
Architecture
qwen3vl
Hardware compatibility
Log In to add your hardware

4-bit

8-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for roller777/qwen3vl-4b-text-encoder-gguf

Quantized
(98)
this model