Instructions to use black-forest-labs/FLUX.2-small-decoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use black-forest-labs/FLUX.2-small-decoder with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("black-forest-labs/FLUX.2-small-decoder", dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Diffusion Single File
How to use black-forest-labs/FLUX.2-small-decoder with Diffusion Single File:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
Update README.md
Browse files
README.md
CHANGED
|
@@ -12,12 +12,15 @@ tags:
|
|
| 12 |
|
| 13 |

|
| 14 |
|
| 15 |
-
|
| 16 |
|
| 17 |
-
|
| 18 |
-
- **~1.4x** faster decode
|
| 19 |
-
- **~1.4x** less VRAM
|
| 20 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 21 |
|
| 22 |
Compatible with all open FLUX.2 models:
|
| 23 |
- [FLUX.2-klein-4B](https://huggingface.co/black-forest-labs/FLUX.2-klein-4B)
|
|
|
|
| 12 |
|
| 13 |

|
| 14 |
|
| 15 |
+
`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.
|
| 16 |
|
| 17 |
+
# **Key Features**
|
|
|
|
|
|
|
| 18 |
|
| 19 |
+
1. **~1.4x faster decoding** compared to the full decoder.
|
| 20 |
+
2. **~1.4x less VRAM** at decode time, enabling higher resolutions without running out of memory.
|
| 21 |
+
3. **~28M decoder parameters** (vs ~50M in the full decoder) thanks to narrower channel widths (`[96, 192, 384, 384]` vs `[128, 256, 512, 512]`).
|
| 22 |
+
4. **Minimal quality loss** — images are almost identical.
|
| 23 |
+
5. Available under the Apache 2.0 license.
|
| 24 |
|
| 25 |
Compatible with all open FLUX.2 models:
|
| 26 |
- [FLUX.2-klein-4B](https://huggingface.co/black-forest-labs/FLUX.2-klein-4B)
|