anr2me/klein-build-small-starter
FLUX.2 [klein] 4B — Build Small Starter
A starting point for the Build Small Hackathon. One small, open-weights image model that does three things you can build a whole project on:
- Text → Image — type a prompt, get an image.
- Image → Image — drop a photo, restyle or edit it.
- Your LoRA — load a
.safetensorsyou trained and compare base vs your fine-tune.
The model is `FLUX.2-klein-4B`: 4 billion parameters, Apache 2.0, runs in ~13 GB VRAM, generates in about a second on a single GPU. It is well under the hackathon's 32B ceiling, the Space loads the open weights and runs them on its own GPU, and there's nothing to set up — no token, no gating. (klein also comes in a 9B and in 50-step base training variants — see "The klein family" below and the Train a LoRA tab.)
Use it
Just want to play? Open the tabs above.
Building a project? Click ⋮ → Duplicate this Space, pick a GPU (ZeroGPU works), and you have a running base to fork. Everything you need is in the Files tab — including how to train your own LoRA.
Why this fits "Build Small"
What's in the Files tab
The klein family
This Space runs klein 4B distilled. For reference, the full family is a 2×2: size (4B / 9B) × variant (distilled / base).
All four load with the same Flux2KleinPipeline — switching is a one-line model ID change. We kept this starter to the single 4B distilled model on purpose: it's the smallest, fastest, Apache-2.0, zero-setup option, which is exactly the "Build Small" thesis. The base checkpoints are LoRA-training targets (see Train a LoRA); the 9B models are gated on the Hub and need an HF_TOKEN.
Footgun worth knowing
In the editing call, image is the first positional argument and prompt is the second. Always pass both by keyword — pipe(prompt=…, image=…) — or your prompt silently binds to image. app.py already does this.
Links: [FLUX.2 [klein]](https://huggingface.co/black-forest-labs/FLUX.2-klein-4B) · GitHub (official inference code) · Docs · Build Small Hackathon
Built by Black Forest Labs for Build Small. Questions → docs.bfl.ai.
