FLUX.2 [klein] 4B โ Build Small starter
A 4-billion-parameter open-weights image model (Apache 2.0). text-to-image, image editing, run a LoRA, and train your own, in one pipeline. Runs on consumer GPUs (~13 GB) and on ZeroGPU โ fast (4 steps), and nothing to set up: no token, no gating.
Duplicate this Space or fork it as a starting point for your project.
Upload a photo and describe the change. Same model, pipe(prompt=โฆ, image=โฆ). Good for restyling, edits, and turning a friend's photo into something new.
| Input image | Edit prompt | Output |
|---|
Compare base vs a LoRA at the same seed, side by side. Two ways to load one:
- Pick a ready-made klein LoRA from the Hub below (zero setup), or
- Upload your own
.safetensorsif you've trained one.
Some of these are image-edit LoRAs (sprite sheet, red-zoom): pick one and an input-image box appears, pre-filled with the repo's own example so it runs right away. The text-to-image ones (TRpFrog, sks dog) just need the prompt. The correct trigger fills in automatically.
Want to train your own? See the ๐ ๏ธ Train a LoRA tab. Browse more on the Hub: klein 4B LoRAs.
Auto-picks the right .safetensors and fills in the real trigger word.
Train a LoRA in 3 steps
Teach klein a specific style, character, or look of your own. About 30 min on a ~$0.50 GPU. Worth doing when none of the ready-made LoRAs in the ๐ฏ Your LoRA tab give you the look you want.
FLUX.2 [klein]
Compact, open-weights image models from Black Forest Labs. Generate and edit images in one pipeline, run on consumer GPUs.
Models โ this Space runs klein 4B distilled. The family is a 2ร2: size (4B / 9B) ร variant (distilled / base)
- FLUX.2-klein-4B โ 4B distilled, 4 steps, Apache 2.0 (what this Space runs)
- FLUX.2-klein-base-4B โ 4B base, 50 steps, Apache 2.0 (LoRA-training target)
- FLUX.2-klein-9B โ 9B distilled, 4 steps, higher fidelity, gated
- FLUX.2-klein-base-9B โ 9B base, 50 steps, gated
- All BFL models on Hugging Face
Code & docs
- github.com/black-forest-labs/flux2 โ official inference code (Apache 2.0)
- docs.bfl.ai โ API & model docs
- Training a klein LoRA ยท worked example
- ostris/ai-toolkit โ a popular community LoRA trainer (one of several)
This Space
- Built for the Build Small Hackathon
- Duplicate it, or open the Files tab to read
app.pyand the guides - Browse community klein LoRAs: 4B ยท 9B
FLUX.2 [klein] ยท GitHub ยท Docs ยท Build Small Hackathon