Text-to-Image
Diffusion Single File
English
comfyui
nvfp4
quantized
flux
flux-3

The NVFP4 BFL Should Have Released, Part 2!

FLUX 3 Image Klein (distilled, 16 steps), NVFP4 (BennyDaBall build)

banner

A mixed-precision NVFP4 build of FLUX 3 Image Klein, the distilled 16-step model, for ComfyUI: NVFP4 + 8-bit + bf16. The NVFP4 weights are solved with GPTQ plus a Schur Replay block-scale search that includes the Four Over Six scale points, and the sensitive layers stay 8-bit, re-quantized from BF16 with GPTQ.

On my RTX 5090 it renders 4.0% faster than BFL's INT8 ConvRot file and 7.8% faster than BFL's own NVFP4 file, it is 0.42 GB smaller than INT8, and it lands 2.9x closer to the BF16 model than BFL's NVFP4. INT8 ConvRot is still closer to BF16 on a typical image; all numbers are below.

Numbers (RTX 5090, stock ComfyUI, same graph, same captions and seeds)

File Size LPIPS vs BF16 (mean / median, lower = closer) SSIM s/img
BF16 (BFL) 11.10 GB reference 1 3.397
INT8 ConvRot (BFL) 5.83 GB 0.026 / 0.018 0.956 1.656
NVFP4 (BFL) 5.28 GB 0.142 / 0.122 0.785 1.725
NVFP4 (this repo) 5.41 GB 0.049 / 0.034 0.923 1.590
  • 16 hand-written captions x 6 seeds = 96 renders per file, each compared to the BF16 render with the same caption and seed. LPIPS (AlexNet), SSIM and mean absolute difference on the full 1024x1024 renders. BF16 re-render noise floor: 0.
  • This build is closer to BF16 than BFL's NVFP4 on 94 of 96 images (2.9x lower mean LPIPS, 3.6x lower median). INT8 ConvRot is closer to BF16 than this build on most images (88 of 96).
  • Speed: warm median of 5 runs after a cold run, all files back to back in one sitting (1024x1024, 16 steps). This build is 4.0% faster than INT8 ConvRot and 7.8% faster than BFL's NVFP4, which is 4.2% slower than INT8 on this setup (it keeps some large layers in bf16).
  • Text: 26 quoted strings x 3 seeds, read letter by letter by blind readers, with the hardest strings re-read for every file by the same two readers: BF16 77/78, INT8 77/78, this build 76/78, BFL NVFP4 76/78. Every file misses one stylized chalk "i" that BF16 also paints; this build's other miss is a watch date window that shows "4" instead of "14" on one seed, and BFL NVFP4's is a garbled "M3 x 8" tag.
  • Peak VRAM (whole GPU, includes about 3.3 GiB of desktop use): this build 16.2 GiB, INT8 16.5 GiB, BFL NVFP4 16.3 GiB, BF16 20.8 GiB.

comparison

The sheet shows three extra showcase captions rendered at 1936x1088 (16:9) on every file, same seed per row, seeds picked on looks rather than on scores. The number under each image is that image's LPIPS vs BF16; the header means are the 96-render gold set. Over all 9 showcase renders (3 captions x 3 seeds) this build averages 0.050, INT8 0.030 and BFL NVFP4 0.157.

Use it in ComfyUI

  1. Put flux3-image-klein-nvfp4-bdb.safetensors in ComfyUI/models/diffusion_models/.
  2. In BFL's stock Klein text-to-image workflow, pick it in the Load Diffusion Model node (weight_dtype default). Nothing else changes: same text encoder (qwen3vl_4b_bf16), same VAE, same sampler settings.
  3. NVFP4 layers need an NVIDIA Blackwell GPU (RTX 50 series / RTX PRO Blackwell) for the FP4 speed-up.

The only difference between the four workflows used for the table is the diffusion model filename:

   "class_type": "UNETLoader",
   "inputs": {
-   "unet_name": "flux3-image-klein-bf16.safetensors",
+   "unet_name": "flux3-image-klein-nvfp4-bdb.safetensors",
    "weight_dtype": "default"
   }

Test setup: ComfyUI 0.43.0, comfy-kitchen 0.2.40, torch 2.14.0 + CUDA 13.0, launched with --use-ck-attention (Comfy Kitchen int8 attention for every file in the table). Klein (distilled), 1024x1024 (showcase sheet 1936x1088), 16 steps, CFG 1, euler / simple, ModelSamplingFlux shift 2.77259 as in BFL's workflow, empty negative prompt, prompt upsampler off. BFL recommends their prompt upsampler for the best-looking images; it was left off here so every file gets the identical caption.

How it was made

  • Mixed precision: NVFP4 (W4A4, static activation scales calibrated on Klein's own trajectories) + 8-bit in BFL's INT8 ConvRot format (with its int8 attention markers) + bf16 for the small embedding and modulation layers. 19 of the 172 quantized layers (0.94B weights, about 18%) are NVFP4. Which layers stay 8-bit was chosen by measured damage per millisecond, from per-layer sensitivity scans on held-out captions, with the budget set so the file stays at least 4% faster than INT8.
  • NVFP4 weights: GPTQ (Frantar et al., 2022) with the block scale chosen inside the GPTQ loop by Schur Replay (arXiv 2609.36654) with a replay window of 8, whose candidate set includes the Four Over Six points (arXiv 2512.02010, MIT Han Lab and NVIDIA) under the 4/6 global scale. Both papers evaluate language models; applying them to a DiT is my own integration.
  • 8-bit weights: re-quantized from BF16 with GPTQ in the rotated ConvRot basis, with each row's scale picked the same way Schur Replay picks block scales. That cuts the 8-bit layers' own weight error about 10x versus round-to-nearest (which is what BFL's INT8 file uses). Most of INT8's error comes from its 8-bit activations, so the end-to-end gain is small. 20 8-bit layers that text-to-image never runs, so calibration can't reach them, keep BFL's bytes.
  • Distilled Klein is a flow map: every transformer call, the text blocks included, is conditioned on the next sampler sigma. Calibration therefore records the real 16-step trajectories: 24 captions x all 16 steps at 1024x1024. The gold captions used for the numbers above were never used for calibration.
  • Every NVFP4 tensor is bit-exact to what ComfyUI's loader decodes, and every layer's bytes were read back after writing. Per-layer formats are in the file's comfy_quant metadata.

Files

File Size sha256
flux3-image-klein-nvfp4-bdb.safetensors 5,413,772,516 bytes (5.41 GB) f652be43bf699f28eb5db29561617eaca051ffac4e87f9df3a09c24a20f9c47c

bdb = BennyDaBall, so the file can sit next to BFL's flux3-image-klein-nvfp4.safetensors without a mix-up. Klein Base (50 steps) has its own build: BennyDaBall/flux-3-image-klein-base-NVFP4.

License and credits

FLUX 3 Image Klein is made by Black Forest Labs and released under the FLUX Kommunity License (LICENSE.md). This repository is a modified (quantized) derivative; see NOTICE.txt. It is not an official Black Forest Labs product and is not endorsed by Black Forest Labs. Use is limited to what the FLUX Kommunity License allows (non-commercial use, plus commercial use of outputs for Qualifying Users as defined there).

This FLUX Model is licensed by Black Forest Labs Inc. under the FLUX Kommunity License. Copyright Black Forest Labs Inc. IN NO EVENT SHALL BLACK FOREST LABS INC. BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH USE OF THIS MODEL.

Thanks to Comfy-Org and comfy-kitchen for the NVFP4 and INT8 ConvRot runtime this file is built for.

Downloads last month
130
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for BennyDaBall/flux-3-image-klein-NVFP4

Quantized
(41)
this model

Papers for BennyDaBall/flux-3-image-klein-NVFP4