Skip to page content
SAVRN
Search Plan a project

Open-weight model · Image to image

FLUX.2-klein-4B-bnb-nf4

by Ed cukrus/FLUX.2-klein-4B-bnb-nf4

FLUX.2-klein-4B-bnb-nf4 is an open-weight model for image to image from Ed, released under Apache License 2.0. It has 2.1B parameters. At 16-bit it needs about 5 GB of GPU memory, which fits on 1x MI300X from $1.85 an hour, at the lowest prices in the SAVRN Index.

FLUX.2-klein-4B (commit e7b7dc27f91d) with the transformer quantized to bitsandbytes NF4. Loads with Flux2KleinPipeline.frompretrained. Image editing with 1-3 reference images, and text-to-image. Text encoder (Qwen3-4B) not included.

Parameters2.1B
Context—
Weights2.5 GB
Licenseapache-2.0
AccessOpen weights
Monthly Downloads—

Runs On

What it takes to serve FLUX.2-klein-4B-bnb-nf4 (2.1B parameters): the memory its weights need at each precision, and the cheapest way to rent enough data-center GPUs to hold them.

PrecisionWeightsMemory neededCheapest setupPer hourAlso fits
16-bit 4.2 GB 5.0 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
8-bit 2.1 GB 2.5 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00
4-bit 1.0 GB 1.3 GB 1x MI300X (192 GB)
Vultr
$1.85 1x H100 $1.99 · 1x MI325X $2.00

Memory is the weights at that precision plus 20% for the runtime and a short context; a long context needs more. Prices are the lowest on-demand hourly rates in the SAVRN Index, read Oct 18, 2026.

FLUX.2-klein-4B-bnb-nf4 on every accelerator the SAVRN Index prices, at every precision

Model Card

By Ed, published under apache-2.0, revision 7eb366ba1e7a.

FLUX.2-klein-4B (commit e7b7dc27f91d) with the transformer quantized to bitsandbytes NF4. Loads with Flux2KleinPipeline.frompretrained. Image editing with 1-3 reference images, and text-to-image. Text encoder (Qwen3-4B) not included. Load it from the base repo, or pass promptembeds. - kept in bf16 (~0.37 GB): xembedder, contextembedder, timeguidanceembed, doublestreammodulationimg, doublestreammodulationtxt, singlestreammodulation, normout, projout klein-quantize.py re-shards the single 7.75 GB file into 1 GB shards before quantizing, so peak memory stays around 2.2 GB. Runs on an 8 GB Jetson. Rendered with the same seed, initial noise and prompt embeddings in NF4 and bf16. 4 steps…

Read Ed's full model card

FLUX.2-klein-4B NF4

FLUX.2-klein-4B (commit e7b7dc27f91d) with the transformer quantized to bitsandbytes NF4. Loads with Flux2KleinPipeline.from_pretrained. Image editing with 1-3 reference images, and text-to-image.

bf16 NF4
transformer 7.75 GB 2.29 GB
VAE 168 MB 168 MB (unchanged)

Text encoder (Qwen3-4B) not included. Load it from the base repo, or pass prompt_embeds.

Quantization

  • NF4, double quant, bf16 compute
  • kept in bf16 (~0.37 GB): x_embedder, context_embedder, time_guidance_embed, double_stream_modulation_img, double_stream_modulation_txt, single_stream_modulation, norm_out, proj_out
  • VAE and scheduler unchanged

klein-quantize.py re-shards the single 7.75 GB file into 1 GB shards before quantizing, so peak memory stays around 2.2 GB. Runs on an 8 GB Jetson.

Sanity check vs bf16

Rendered with the same seed, initial noise and prompt embeddings in NF4 and bf16.

PSNR mean abs diff
edit, car to red 24.5 dB 9.2 / 255
text-to-image, fox 21.0 dB 15.3 / 255

Examples

4 steps, generated on a Jetson Orin Nano 8GB.

source "change the car's paint to glossy bright red, keep everything else the same" "add a golden retriever sitting on the sidewalk next to the car"
source "turn this photo into a loose watercolor painting" text-to-image: "a red fox standing in fresh snow, golden hour, photorealistic"

Usage

Requires diffusers 0.37+ and bitsandbytes with kernels for your GPU (on Jetson, build it from source with -DCOMPUTE_CAPABILITY=87).

import torch
from diffusers import Flux2KleinPipeline
from diffusers.utils import load_image
from transformers import AutoTokenizer, Qwen3ForCausalLM

base = "black-forest-labs/FLUX.2-klein-4B"
text_encoder = Qwen3ForCausalLM.from_pretrained(base, subfolder="text_encoder", torch_dtype=torch.bfloat16)
tokenizer = AutoTokenizer.from_pretrained(base, subfolder="tokenizer")

pipe = Flux2KleinPipeline.from_pretrained(
    "cukrus/FLUX.2-klein-4B-bnb-nf4",
    text_encoder=text_encoder, tokenizer=tokenizer, torch_dtype=torch.bfloat16,
).to("cuda")
pipe.vae.enable_tiling()

out = pipe(prompt="change the car's paint to glossy bright red, keep everything else the same",
           image=load_image("car.png"),  # or a list of up to 3
           num_inference_steps=4, guidance_scale=1.0,
           generator=torch.Generator("cuda").manual_seed(4200)).images[0]
out.save("edit.png")

Use num_inference_steps=4, guidance_scale=1.0. The pipeline defaults (50 / 4.0) are for the base model.

Without the text encoder

Pass prompt_embeds of shape (1, 512, 7680): Qwen3-4B hidden states 9, 18, 27 stacked, thinking off, right-padded to 512. Keep the pad positions, there is no text mask. Remote encoder service: qwen3-4b-remote-text-encoder.

Jetson Orin Nano 8GB

JetPack 7.2, CUDA 13.2, torch 2.12.1+cu132, diffusers 0.39. 1024x1024, 4 steps, VAE tiled at 512px, text encoder on a separate machine.

reference denoise total torch peak system RAM free (min)
text-to-image - 24.9 s 37.2 s 2.95 GB 2.54 GB
edit 512px 31.1 s 43.5 s 3.09 GB 2.37 GB
edit 768px 39.6 s 44-52 s 3.25 GB 1.83-2.26 GB
edit 1024px 52.2 s 57.9 s 3.46 GB 1.85 GB

Total includes ~8 s encoding for a new prompt. Each reference adds as many tokens as the output (1024px = 4096). References below 1 MP are faster but the framing drifts slightly.

License

Apache-2.0, same as FLUX.2-klein-4B by Black Forest Labs.

Identity and Version

Repository
cukrus/FLUX.2-klein-4B-bnb-nf4
Publisher
Ed
Task
Image to image
Modality
Image
Library
diffusers
Parameters
2.1B parameters
Languages
Not stated by the source
Revision
7eb366ba1e7ae2b6ba77c87f3460987b11a322df
First published
2026-10-15
Last updated
2026-10-15

Files and Weights

16 files, 2.5 GB in total. The weights are 2 files totalling 2.5 GB in safetensors.

Weights2 files · 2.5 GB
Configuration5 files · 7.7 KB
Documentation1 file · 4.3 KB
Other7 files · 9.9 MB
Repository1 file · 1.9 KB
Every file
FileTypeSizeSHA-256
transformer/diffusion_pytorch_model.safetensorsWeights2.3 GB e65a3248abee
vae/diffusion_pytorch_model.safetensorsWeights168.1 MB ca70d2202afe
klein-quantize.pyConfiguration4.8 KB —
model_index.jsonConfiguration395 B —
scheduler/scheduler_config.jsonConfiguration486 B —
transformer/config.jsonConfiguration1.2 KB —
vae/config.jsonConfiguration821 B —
README.mdDocumentation4.3 KB —
assets/car-dog-ref768.pngOther1.5 MB 9676637808de
assets/car-red-ref1024.pngOther1.4 MB 08cb3c1d8fe2
assets/fox-watercolor-ref768.pngOther1.8 MB edd5af928633
assets/nf4-vs-bf16.pngOther942.0 KB 0fc77020f7d4
assets/source-car.pngOther1.5 MB cb9a1d640c47
assets/source-fox.pngOther1.2 MB 3719a77bc2b3
assets/t2i-fox.pngOther1.6 MB b3d2991cac18
.gitattributesRepository1.9 KB —

License and Download

License
apache-2.0
Access
Open weights, no gate
Download size
2.5 GB
Download from Ed

Released by Ed through its official repository on Hugging Face. Read the license.

Built From

Memory Requirements

PrecisionWeights in memory
As published2.5 GB
16-bit4.2 GB
8-bit2.1 GB
4-bit1.0 GB

Weights only, from the published parameter count; the key-value cache and runtime add to this.

Questions About FLUX.2-klein-4B-bnb-nf4

How much GPU memory does FLUX.2-klein-4B-bnb-nf4 need?

About 5 GB at 16-bit and 1.3 GB at 4-bit: the weights (2.1B parameters) plus a working margin. A long context needs more.

What is the cheapest GPU to run FLUX.2-klein-4B-bnb-nf4 on?

At 16-bit, 1x MI300X from $1.85 an hour; at 4-bit, 1x MI300X from $1.85 an hour, at the lowest on-demand prices the SAVRN Index lists.

Can I use FLUX.2-klein-4B-bnb-nf4 commercially?

Yes. FLUX.2-klein-4B-bnb-nf4 is released under Apache License 2.0. The Apache License 2.0 is a permissive open-source license. It permits commercial use, modification and redistribution. It requires keeping the license and copyright notices and any NOTICE file, stating significant changes, and it includes an express patent grant from contributors.

Similar Models

Model · Image to image

FLUX.2-klein-4B

Black Forest Labs

The FLUX.2 [klein] model family are our fastest image models to date. FLUX.2 [klein] unifies generation and editing in a single compact architecture, delivering state-of-the-art quality with end-to-end inference in as low as under a second. Built for applications that require real-time image generation without sacrificing quality, and runs on consumer hardware, with as little as 13GB VRAM. FLUX.2 [klein] 4B is a 4 billion parameter rectified flow transformer capable of generating images from text descriptions and supports multi-reference editing capabilities. Fully open under Apache 2.0. Our most accessible model runs on consumer GPUs like the RTX 3090/4070. Compact but capable: supports…

Open weights apache-2.0 3.9B parameters diffusers

Model · Image to image

FLUX.2-klein-base-4B

Black Forest Labs

The FLUX.2 [klein] model family are our fastest image models to date. FLUX.2 [klein] unifies generation and editing in a single compact architecture, delivering state-of-the-art quality with end-to-end inference in as low as under a second. Built for applications that require real-time image generation without sacrificing quality, and runs on consumer hardware, with as little as 13GB VRAM. FLUX.2 [klein] 4B Base is a 4 billion parameter rectified flow transformer capable of generating images from text descriptions and supports multi-reference editing capabilities. It's a full-capacity foundation model. Undistilled, preserving complete training signal for maximum flexibility. Ideal for…

Open weights apache-2.0 3.9B parameters diffusers

Model · Image to image

zen-image-edit-SDNQ-uint4-f16

GuiAworld

Qwen-Image-2.1 on a 0.8B text encoder. Text-to-image, character and scene editing, and transparent (RGBA) generation in one pipeline. The text encoder is replaced by Qwen3.5-0.8B plus a 158M adapter, fine-tuned to reproduce what the native encoder produced — both from plain text and from text read together with the reference images (Improved using Qwen). The adapter lives inside the DiT as its text-fusion block, so the whole model is one self-contained diffusers folder and no 17.5 GB encoder is needed anywhere. The sampler runs a plain static shift of 5.0 instead of the original dynamic shifting. The bundled adapter is revision v12: its attention-branch position table covers 2304 slots and…

Open weights other 4B parameters diffusers

Model · Image to image

FLUX.2-small-decoder

Black Forest Labs

FLUX.2 Small Decoder is a distilled VAE decoder that serves as a drop-in replacement for the standard FLUX.2 decoder. It delivers faster decoding and lower VRAM usage with minimal to zero quality loss. The encoder remains unchanged. 1. ~1.4x faster decoding compared to the full decoder. 2. ~1.4x less VRAM at decode time, enabling higher resolutions without running out of memory. 3. ~28M decoder parameters (vs ~50M in the full decoder) thanks to narrower channel widths ([96, 192, 384, 384] vs [128, 256, 512, 512]). 4. Minimal quality loss — images are almost identical. 5. Available under the Apache 2.0 license. Compatible with all open FLUX.2 models: - This model is not intended or able to…

Open weights apache-2.0 62M parameters diffusers

Model · Image to image

photo-to-sketch-unet

WILLIAMS OPOKU ANTWI

This model is a custom PyTorch U-Net architecture (SketchUNet) trained to convert RGB photos into target outline sketches using the rhfeiyang/photo-sketch-pair-500 dataset. - Combined Sketch Loss (L1 + Sobel Edge Loss): 0.14555 - Mean Absolute Error (L1 / MAE): 0.04962 This model converts an RGB image into a grayscale sketch using a PyTorch U-Net architecture. The model checkpoint is available as: Once the model architecture is defined, inference can be reduced to

Open weights mit 31M parameters

Model · Image to image

mini-unet-colorizer

Joe Bloggs

Status: evaluated app-testing candidate. Some broad color patches and incorrect object hues remain. Predicted colors are not evidence of original historical colors. This checkpoint has 3,968,892 learned parameters and 236 fixed color bins. It starts from the audited bin-mapping repair of main commit 6c47ea40724d8fcd67d4f36ce837dc1cb5b1b2a8 and changes all 65 learned parameter tensors. The color vocabulary is unchanged. The selected weights are update 748 of a completed 1,122-update BF16 L4 run using a 17,325-photo mixed training pool (11,943 Imagenette plus 5,382 COCO), batch 32, initial learning rate 1e-5, weighted classification loss and frozen BatchNorm running statistics. Selection…

Open weights apache-2.0 4M parameters