Instructions to use mlx-community/FLUX.2-klein-base-4B-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/FLUX.2-klein-base-4B-bf16 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir FLUX.2-klein-base-4B-bf16 mlx-community/FLUX.2-klein-base-4B-bf16
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
mlx-community/FLUX.2-klein-base-4B-bf16
MLX (bf16) snapshot of black-forest-labs/FLUX.2-klein-base-4B
(Apache-2.0) for Apple Silicon โ the quality tier companion to the distilled
FLUX.2-klein-4B-bf16. Same compact
rectified-flow MMDiT (5 double + 20 single blocks) + Qwen3-4B 3-layer-tap conditioner + FLUX.2
VAE, but the base checkpoint is not guidance-distilled: it runs classic two-pass
classifier-free guidance (guidance ~4.0) + negative prompts over ~28 steps for stronger prompt
adherence (dense scenes, text, fine attributes) at ~2ร the forward cost. Standard diffusers tree;
int8/int4 produced at load (int4 DiT ~2.35 GB โ q4 pipeline fits a 16 GB Mac).
4B only โ the 9B klein variants are FLUX Non-Commercial; this Apache-2.0 4B is the wrapped tier.
Use (Swift / MLXEngine)
import MLXKlein
import MLXToolKit
let pkg = Klein4BBaseT2IPackage(configuration: .base(quant: .int4, snapshotPath: "<this repo dir>"))
try await pkg.load()
let r = try await pkg.run(T2IRequest(
prompt: "a rustic picnic table with a chalkboard sign reading 'PICNIC', three green apples, "
+ "sunflowers, sunny meadow, photorealistic",
negativePrompt: "blurry, deformed, extra objects",
guidanceScale: 4.0, width: 1024, height: 1024, seed: 42)) as! T2IResponse
Quantized
Model tree for mlx-community/FLUX.2-klein-base-4B-bf16
Base model
black-forest-labs/FLUX.2-klein-base-4B