FLUX.2-klein-4B-ONNX-WebGPU

The transformer of black-forest-labs/FLUX.2-klein-4B, converted to ONNX for running in a web browser with ONNX Runtime Web's WebGPU backend, as used by Quick Inference.

Changes from the original

  • The transformer only: one ONNX graph taking the noisy latents (x, one token per 16 × 16 pixels, 128 values each), their positions (x_ids), the timestep (0–1), the text features (ctx, three Qwen3 layers side by side) and their positions (ctx_ids), and returning the flow-matching velocity (pred). Its inputs and outputs match MarkShark2/flux2-klein-4b-onnx-webgpu-q4, whose text encoder and VAE decoder go with it.
  • The linear layers in the blocks are quantised to 4 bits (round to nearest, block size 32); attention and the projections run in float16, the residual streams, norms, modulation and rotary embedding in float32.

These are modified files: their outputs are close to, but not identical to, the original model's.

Licence

Apache 2.0, as the original (LICENSE.md).

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

Model tree for danyalmalik/FLUX.2-klein-4B-ONNX-WebGPU

Quantized
(68)
this model