FLUX.2 [klein] 4B Edit -- prompt encoder (Qwen3-4B, CPU)
The text encoder of FLUX.2 [klein] 4B (Qwen3-4B,
Apache-2.0) for on-device use, shared by all latentdivergence/flux2-klein-edit-npu-* builds.
text/qwen3_te.onnx(+.data): the first 27 decoder layers of Qwen3-4B, every Linear as ONNX RuntimeMatMulNBits(8-bit, block 32). Inputsinputs_embeds[1,64,2560] andattention_mask[1,64] (right padded); outputprompt_embeds[1,64,7680] = hidden states after layers 9, 18 and 27, concatenated, exactly what diffusers'Flux2KleinPipeline._get_qwen3_prompt_embedsproduces.text/embed_q8.bin+embed_scale.bin: the token embedding table, int8 per row with float32 scales (row-major [151936, 2560]); look up the ids on the host.text/qwen_tokenizer.bin: Qwen2 byte-level BPE (vocab, merges, added tokens) in a compact binary for the app.text/qwen3_te.json: shapes and settings.
Prompt format: the Qwen3 chat template with one user turn, generation prompt, thinking disabled, padded to 64 tokens.
Licence: Apache-2.0 (see LICENSE.txt).
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support