FLUX 3 Image Klein MLX

MLX builds of FLUX 3 Image Klein, made by Moonbox for Apple Silicon Macs. Each precision is a folder; keep a folder's files together. Only the parts listed below are converted: the rest of the pipeline comes from the original repository unless the section below says otherwise.

Files

The last column is how far each build is from the original PyTorch model on the same inputs (see the section below for what was measured).

Precision File Size sha256 Checked against the original
bf16 bf16/mflux_model.json 0.4 kB 1610a0326dd5 the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/text_encoder/0.safetensors 2.14 GB dccebdca9f44 the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/text_encoder/1.safetensors 2.12 GB 365b2938ddcb the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/text_encoder/2.safetensors 2.12 GB a7be75a14675 the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/text_encoder/3.safetensors 857.3 MB 0dee4ce64261 the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/text_encoder/chat_template.jinja 5.3 kB 3636d0f0bd6b the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/text_encoder/model.safetensors.index.json 20.4 kB ecb337de7dbe the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/text_encoder/tokenizer.json 11.4 MB be75606093db the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/text_encoder/tokenizer_config.json 0.7 kB e1125421b81c the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/transformer/0.safetensors 2.06 GB b5842940b00b the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/transformer/1.safetensors 2.13 GB 7a385fab2460 the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/transformer/2.safetensors 2.04 GB f93a712eec94 the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/transformer/3.safetensors 2.13 GB e713e4753150 the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/transformer/4.safetensors 2.04 GB 0ea07f6d3b57 the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/transformer/5.safetensors 699.1 MB 09c91c78e4a5 the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/transformer/model.safetensors.index.json 24.6 kB 89b2e4575f35 the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/vae/0.safetensors 168.1 MB 6093545b5c2a the original weights in bf16 (reference for the rows below; not compared with PyTorch)
bf16 bf16/vae/model.safetensors.index.json 16.5 kB 009c1b40da60 the original weights in bf16 (reference for the rows below; not compared with PyTorch)
8bit 8bit/mflux_model.json 0.4 kB 71e511d6f023 vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
8bit 8bit/text_encoder/0.safetensors 2.15 GB 8e48e90d97a8 vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
8bit 8bit/text_encoder/1.safetensors 1.70 GB 34e64c32ba88 vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
8bit 8bit/text_encoder/chat_template.jinja 5.3 kB 3636d0f0bd6b vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
8bit 8bit/text_encoder/model.safetensors.index.json 45.6 kB db3b01feaed6 vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
8bit 8bit/text_encoder/tokenizer.json 11.4 MB be75606093db vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
8bit 8bit/text_encoder/tokenizer_config.json 0.7 kB e1125421b81c vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
8bit 8bit/transformer/0.safetensors 2.13 GB 07318e4eda9b vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
8bit 8bit/transformer/1.safetensors 2.15 GB 2e6e0392ee1e vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
8bit 8bit/transformer/2.safetensors 1.61 GB 027c8e5bb276 vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
8bit 8bit/transformer/model.safetensors.index.json 61.8 kB 236cb93bb6f2 vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
8bit 8bit/vae/0.safetensors 166.2 MB f420463341ac vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
8bit 8bit/vae/model.safetensors.index.json 17.5 kB 4d629a6165dd vs bf16: PSNR 35.5 dB mean, LPIPS 0.016 mean / 0.038 worst
6bit 6bit/mflux_model.json 0.4 kB d4eabca20ab4 vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
6bit 6bit/text_encoder/0.safetensors 2.14 GB 6c3cfa234ad5 vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
6bit 6bit/text_encoder/1.safetensors 798.8 MB 9a3cfd477cc8 vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
6bit 6bit/text_encoder/chat_template.jinja 5.3 kB 3636d0f0bd6b vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
6bit 6bit/text_encoder/model.safetensors.index.json 45.6 kB 774528fa7426 vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
6bit 6bit/text_encoder/tokenizer.json 11.4 MB be75606093db vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
6bit 6bit/text_encoder/tokenizer_config.json 0.7 kB e1125421b81c vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
6bit 6bit/transformer/0.safetensors 2.13 GB 0d5325280f31 vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
6bit 6bit/transformer/1.safetensors 2.14 GB 89b83ede7a29 vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
6bit 6bit/transformer/2.safetensors 238.0 MB 5ac98488ba05 vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
6bit 6bit/transformer/model.safetensors.index.json 61.8 kB e607472a3e41 vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
6bit 6bit/vae/0.safetensors 165.6 MB c82ac46128a7 vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
6bit 6bit/vae/model.safetensors.index.json 17.5 kB a5a21d176b96 vs bf16: PSNR 26.4 dB mean, LPIPS 0.052 mean / 0.066 worst
4bit 4bit/mflux_model.json 0.4 kB a3e52259721a below threshold (experimental), vs bf16: PSNR 18.0 dB, LPIPS 0.252 mean / 0.425 worst
4bit 4bit/text_encoder/0.safetensors 2.04 GB 45044a1899ac below threshold (experimental), vs bf16: PSNR 18.0 dB, LPIPS 0.252 mean / 0.425 worst
4bit 4bit/text_encoder/chat_template.jinja 5.3 kB 3636d0f0bd6b below threshold (experimental), vs bf16: PSNR 18.0 dB, LPIPS 0.252 mean / 0.425 worst
4bit 4bit/text_encoder/model.safetensors.index.json 45.6 kB d4b942ce0c69 below threshold (experimental), vs bf16: PSNR 18.0 dB, LPIPS 0.252 mean / 0.425 worst
4bit 4bit/text_encoder/tokenizer.json 11.4 MB be75606093db below threshold (experimental), vs bf16: PSNR 18.0 dB, LPIPS 0.252 mean / 0.425 worst
4bit 4bit/text_encoder/tokenizer_config.json 0.7 kB e1125421b81c below threshold (experimental), vs bf16: PSNR 18.0 dB, LPIPS 0.252 mean / 0.425 worst
4bit 4bit/transformer/0.safetensors 2.14 GB 62c72cfbbb13 below threshold (experimental), vs bf16: PSNR 18.0 dB, LPIPS 0.252 mean / 0.425 worst
4bit 4bit/transformer/1.safetensors 977.0 MB 1008f3cefbc0 below threshold (experimental), vs bf16: PSNR 18.0 dB, LPIPS 0.252 mean / 0.425 worst
4bit 4bit/transformer/model.safetensors.index.json 61.8 kB a7bc3c466f46 below threshold (experimental), vs bf16: PSNR 18.0 dB, LPIPS 0.252 mean / 0.425 worst
4bit 4bit/vae/0.safetensors 165.1 MB 52affd01aa5b below threshold (experimental), vs bf16: PSNR 18.0 dB, LPIPS 0.252 mean / 0.425 worst
4bit 4bit/vae/model.safetensors.index.json 17.5 kB e396f8330c32 below threshold (experimental), vs bf16: PSNR 18.0 dB, LPIPS 0.252 mean / 0.425 worst

How to run

Each folder is the whole pipeline (Qwen3-VL text encoder, transformer, VAE, processor) saved by mflux 0.24.0 from the original weights at the revision below. Run it with mflux:

pip install mflux==0.24.0
hf download moonbox-ai/flux-3-image-klein-MLX --include "8bit/*" --local-dir klein3
mflux-generate-flux3 --model klein3/8bit --base-model flux3-image-klein --steps 16 \
  --prompt "A red fox in fresh snow at sunrise, photo" --width 1024 --height 1024 --seed 7 --output fox.png

8bit/, 6bit/ and 4bit/ quantize the transformer's and the text encoder's linear layers (MLX affine, group size 64); the VAE stays bf16. No fp16 folder: mflux computes in bf16 whatever the weights are.

How they were checked. Each quantized pipeline against bf16/ from the same initial noise, 3 prompts at 512x512, 16 steps. Pass: LPIPS <= 0.15 on every prompt. bf16/ itself is the original weights in bf16; it wasn't compared with a PyTorch run (diffusers' FLUX.3 pipeline is modular and loads its parts by repo id).

Precision Size PSNR vs bf16 (mean) LPIPS (mean / worst) Status
bf16/ 18.5 GB reference - the original weights
8bit/ 9.9 GB 35.5 dB 0.016 / 0.038 passes
6bit/ 7.6 GB 26.4 dB 0.052 / 0.066 passes
4bit/ 5.3 GB 18.0 dB 0.252 / 0.425 below threshold, experimental

How these were made

From FLUX 3 Image Klein at revision 09561231f4: the original weights loaded in MLX and stored as bf16 or fp16, or quantized with MLX's affine quantization (8bit, 6bit, 4bit, group size 64; layers MLX can't quantize, such as convolutions and norms, stay bf16). Every build was checked against the original before upload; the sha256 column above is what the files must hash to.

License

FLUX Kommunity License (gated). These files are a derivative of the original model and carry its license: it is copied in this repository, and it governs your use of these files. The original model card follows unchanged.


Original model card

FLUX 3 Image Klein

Launch gallery

Teaser

FLUX 3 Image Klein is a 5.6B open weights model designed for image editing. Edit from an instruction, generate images from text, combine up to 10 references, or guide layouts with bounding boxes.

It takes a prompt and up to 10 reference images and returns one image. Editing, text-to-image and multi-reference compositions run through the same model, with Qwen3-VL-4B-Instruct as the text encoder.

The 5.6B parameter label refers to the image transformer; the text encoder is separate.

This repository holds the distilled checkpoint for image editing and generation. For fine-tuning, LoRA training and research, use FLUX 3 Image Klein Base.

Inference code, prompt upsampling and the bounding box format: black-forest-labs/flux-3-image-klein on GitHub.

Always run a prompt upsampler. FLUX 3 Image Klein is trained on full scene captions, for editing, text-to-image and layout with boxes alike; a short prompt sent as typed gives generic output. Use ours, flux-3-image-klein-pup, which the reference code, Diffusers and the ComfyUI workflows run by default, or any LLM you prefer with a system prompt that expands the request into one full scene caption (system_prompts.json has ours).

This repository includes the BF16 transformer and FP8 and NVFP4 variants, together with the Qwen3-VL-4B-Instruct text encoder and image autoencoder.

Checkpoint Format Steps Guidance Built for
Klein Base undistilled, bfloat16 50 3.5 fine-tuning, LoRA training, research
Klein distilled, bfloat16 16 none editing and generation, self-hosting; the checkpoint behind the BFL API

Key Features

  1. Image editing, text-to-image generation and multi-reference composition with up to 10 images in one model.
  2. Bounding boxes in the prompt. Place elements with boxes on a 0 to 1000 grid, then recolor, move, replace or remove them through the prompt. Boxes guide placement and scale; they do not constrain pixels to a hard mask.
  3. Text rendering within generated images.
  4. Released under the FLUX Kommunity License. The license permits non-commercial use and provides a commercial-output exception for Qualifying Users, subject to its terms. See License below.

Download

Download the root BF16 distilled package, including its text encoder and image autoencoder, without downloading the quantized variants:

from huggingface_hub import snapshot_download

snapshot_download(
    repo_id="black-forest-labs/flux-3-image-klein",
    local_dir="weights/flux-3-image-klein",
    allow_patterns=[
        "model.safetensors", "config.json", "manifest.json",
        "ae.safetensors", "text_encoder/*",
        "README.md", "LICENSE.md", "NOTICE.md",
    ],
)

To download a quantized distilled transformer instead, replace the three root transformer patterns (model.safetensors, config.json, and manifest.json) with variants/fp8r/* or variants/nvfp4/*. Keep ae.safetensors and text_encoder/* for the other components.

These files contain the model package, not a complete inference application. Use an inference implementation that supports flow-map sampling and this checkpoint format. Quantized packages need a loader that supports their format; their file size is not a measure of total GPU memory use.

Using with reference code

The distilled checkpoint is served on the BFL API as FLUX 3 Image Klein. The reference inference code is black-forest-labs/flux-3-image-klein.

From the reference implementation checkout, install the package and download the two components the CLI loads besides this checkpoint. The CLI reads its weights from weights/ (set WEIGHTS_DIR for another root), where the download above puts this repository.

pip install -e .

# safety classifier, always loaded
hf download Falconsai/nsfw_image_detection --local-dir weights/nsfw-classifier
# required prompt upsampler (18.8 GB), on by default; --no-pup is only for prompts that already are full captions
hf download black-forest-labs/flux-3-image-klein-pup --local-dir weights/pup

# image editing; repeat --image for up to 10 references
python scripts/cli.py "put a red bandana around the dog's neck" \
  --model distilled --image examples/inputs/3.png --out bandana.png

# text-to-image
python scripts/cli.py 'A chunky knitted diorama: three white cable-knit icebergs with tiny pale blue houses, a cream banner embroidered "KNITTED ICEBERG VILLAGE", a giant magenta knitted whale tail bursting from a yarn sea' \
  --model distilled --out knitted.png

Using with Diffusers

FLUX 3 Image Klein uses a modular pipeline. Pass prompt with image for editing; image can be one image or a list of up to 10 references. Pass prompt alone for text-to-image, or boxes for layout.

The pipeline runs the prompt upsampler first on every request, editing and text-to-image alike. It is a separate 9B model (black-forest-labs/flux-3-image-klein-pup) that ModularPipeline loads from the upsampler repository with the other components, so a short prompt is all it takes. Ask for prompt in output to see the caption the image model received.

pip install git+https://github.com/huggingface/diffusers.git
import torch
from diffusers import ModularPipeline
from diffusers.utils import load_image

pipe = ModularPipeline.from_pretrained("black-forest-labs/flux-3-image-klein")
pipe.load_components(dtype={"vae": torch.float32, "default": torch.bfloat16})
pipe.to("cuda")

# image editing; up to 10 references in a list
bandana = pipe(
    prompt="put a red bandana around the dog's neck",
    image=load_image("https://raw.githubusercontent.com/black-forest-labs/flux-3-image-klein/main/examples/inputs/3.png"),
    generator=torch.Generator().manual_seed(1),
    output="images",
)[0]
bandana.save("dog_bandana.png")

# text to image
image = pipe(
    prompt='A chunky knitted diorama: three white cable-knit icebergs with tiny pale blue houses, a cream banner embroidered "KNITTED ICEBERG VILLAGE", a giant magenta knitted whale tail bursting from a yarn sea',
    generator=torch.Generator().manual_seed(1),
    output="images",
)[0]
image.save("knitted.png")

Prompt upsampling

The pipeline runs the upsampler on every request. The caption it wrote comes back as prompt when you ask for it:

out = pipe(
    prompt='A chunky knitted diorama: three white cable-knit icebergs with tiny pale blue houses, a cream banner embroidered "KNITTED ICEBERG VILLAGE", a giant magenta knitted whale tail bursting from a yarn sea',
    output=["images", "prompt"],
)
print(out["prompt"])

The prompt upsampler turns a short request, together with the reference images when editing, into the full scene caption the model takes: medium and style, scene, lighting and camera, each subject with its colors, materials and position in the frame. It decodes greedily with thinking off; max_new_tokens caps the caption (3584 by default). Its model card has the decoding settings and the layout form (t2i_bbox, i2i_bbox), which takes a list of boxes and writes the box table after the caption.

Any other LLM can take its place: give it system_prompts["t2i"] (or "i2i" with the references) as the system prompt and the request as the user message. For that advanced path, and for any prompt that already is a full caption, remove the upsampler step so the caption is not expanded twice:

caption = out["prompt"]  # a full scene caption, from the upsampler or another LLM
blocks = ModularPipeline.from_pretrained("black-forest-labs/flux-3-image-klein").blocks
blocks.sub_blocks.pop("prompt_upsampler")
pipe = blocks.init_pipeline("black-forest-labs/flux-3-image-klein")
pipe.load_components(dtype={"vae": torch.float32, "default": torch.bfloat16})
pipe.to("cuda")

image = pipe(prompt=caption, generator=torch.Generator().manual_seed(1), output="images")[0]

Prompting

The caption controls composition; reference images anchor content, they do not lock structure.

  • Always run a prompt upsampler, ours or your own LLM: the model takes full scene captions (framing, subject, background, lighting), and a short prompt sent as typed gives generic output.
  • For edits, the prompt upsampler writes the caption from the instruction and the references: a complete caption of the reference with the edit folded in. The upsampler turns a one-line edit instruction ("make it blue") into that caption; sent as typed, the instruction reframes the shot. For style, describe the attributes (palette, stroke, texture) rather than naming an artwork.
  • For layout, append a JSON list of elements to the caption. Each box is [top, left, bottom, right] on a 0 to 1000 grid; tag the element in the caption with <id>:
Minimalist graphic illustration featuring a black silhouette of a person <silhouette_1> centered against a solid, vibrant chartreuse background <background_1>. The figure is captured in a dynamic, mid-stride running pose, facing toward the left side of the frame. [{"id": "background_1", "bbox": [0, 0, 1000, 1000], "desc": "A flat field of neon yellow-green with a subtle paper texture and fine, organic grain."}, {"id": "silhouette_1", "bbox": [150, 150, 850, 850], "desc": "A black silhouette of a person in motion, made of dense stippled ink."}]

For edits by box, refer to the n-th reference as <ref_image_n> and give each element from, src_bbox and tgt_bbox; a null target removes it. The full format with worked examples: Bounding boxes.

Limitations

  • This model is not intended or able to provide factual information.
  • While the model can output text, text rendered may be inaccurate or subject to distortion.
  • As a statistical model, this checkpoint may represent or amplify biases observed in the training data.
  • The model may fail to generate output that matches the prompts.
  • Prompt following is heavily influenced by the prompting style. Short prompts produce generic output.
  • Boxes set placement and scale, not a hard mask: an element can extend past its box, and small requested elements may not appear. Edits can change content outside the requested region.

Hardware

Peak GPU memory with the reference code, B200, 1024x1024, prompt upsampler off: 31 GB in BF16, 26 GB in FP8, 25 GB in NVFP4. The prompt upsampler adds about 28 GB on an 80 GB GPU.

Out-of-scope use

See Section 4 of the FLUX Kommunity License for the full restrictions. They include military purposes; surveillance, including related research and development; biometric processing; unlawful, unsafe, fraudulent, defamatory, or abusive activity; generating unlawful content, including child sexual abuse material or non-consensual intimate images; violating third-party rights, including rights of publicity or digital replica rights; and using the model, its Derivatives, or its Outputs to improve another AI model that performs a function similar to a FLUX Model or Derivative.

The license also covers export controls and sanctions. Its commercial-use exception is not blanket permission for commercial fine-tuning or distribution. Consult the full license for the terms that apply to each use.

Nothing contained in this model card should be interpreted as or deemed a restriction or modification to the license the model is released under.

Responsible AI Development

Black Forest Labs is committed to responsible model development and deployment. Prior to releasing FLUX 3 Image Klein, we evaluated and mitigated a number of risks, including child sexual abuse material (CSAM) and nonconsensual intimate imagery (NCII). For detailed information about our mitigations, evaluation processes, content provenance features, and policies, please see our post: Capable, Open, and Safe: Combating AI Misuse. To report safety concerns, contact safety@blackforestlabs.ai.

License

This model is released under the FLUX Kommunity License v.1.0: non-commercial use, plus commercial output generation by Qualifying Users with less than US$5M in gross annualized revenue, including affiliates, subject to the license terms. For other uses, see commercial licensing.

The Qwen3-VL-4B-Instruct text encoder is under Apache-2.0.

Trademarks and IP

Use of Black Forest Labs and FLUX trademarks requires prior written permission, except for required attribution or necessary descriptive references. Use must not cause confusion or imply sponsorship or endorsement. Third-party trademarks remain subject to their owners' policies.

Citation

If you use FLUX 3 Image in your work, please cite:

@misc{bfl2026flux3image,
  author       = {{Black Forest Labs}},
  title        = {{FLUX} 3 Image Klein},
  year         = {2026},
  url          = {https://bfl.ai/blog/flux-3-image-klein},
}
Downloads last month

-

Downloads are not tracked for this model. How to track
MLX
Hardware compatibility
Log In to add your hardware

Quantized

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

Model tree for moonbox-dev/flux-3-image-klein-MLX

Quantized
(44)
this model