Instructions to use ryluxapp/flux2-klein-4b-int4-mlx with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use ryluxapp/flux2-klein-4b-int4-mlx with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download ryluxapp/flux2-klein-4b-int4-mlx --local-dir flux2-klein-4b-int4-mlx
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
FLUX.2 klein 4B, int4, for Rylux
The weights Rylux uses for its object removal, in a form that fits in 8 GB of memory on a Mac. They are made to run with the Rylux helper (a patched flux-2-swift-mlx, commit 315c27e), not as a general-purpose FLUX.2 checkpoint.
Files
| File | What it is |
|---|---|
klein4b-int4.safetensors |
FLUX.2 [klein] 4B transformer, quantized to 4 bits (group size 64) for MLX. Made from black-forest-labs/FLUX.2-klein-4B with export-quantized. |
vae/diffusion_pytorch_model.safetensors, vae/config.json |
FLUX.2 small decoder, unchanged, from black-forest-labs/FLUX.2-small-decoder. |
prompt-embeds.safetensors |
The embedding (shape [1, 512, 7680], fp32) of one fixed prompt, computed with Qwen3-4B: "Fill the magenta area with the natural continuation of the surroundings. No new objects. Keep everything outside the magenta area exactly the same." Rylux does not need a text encoder. |
SHA256SUMS |
Checksums of the files above. |
How Rylux uses it
Rylux cuts a 768ร768 window around the object, paints the object's silhouette magenta, and gives it to the model as the reference image with the fixed prompt (4 steps, guidance 1). The result is pasted back inside the silhouette only. Everything runs on the Mac, nothing is uploaded.
License and sources
Apache License 2.0, like the models it derives from. See LICENSE and NOTICE for the sources, the exact revisions and what was changed. This is not an official release of Black Forest Labs. The terms and the responsible-use guidance of the original model cards apply: FLUX.2-klein-4B.
Quantized
Model tree for ryluxapp/flux2-klein-4b-int4-mlx
Base model
black-forest-labs/FLUX.2-klein-4B