> For the complete documentation index, see [llms.txt](https://docs.clore.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clore.ai/guides/guides_v2-de/bildgenerierung/flux2-klein.md).

# FLUX.2 Klein

FLUX.2 Klein — Bildgenerierung in unter einer Sekunde auf Clore.ai-GPUs

FLUX.2 Klein von Black Forest Labs ist der Nachfolger von FLUX.1 und liefert die gleiche Bildqualität bei **20–60× höherer Geschwindigkeit**. Wo FLUX.1 10–30 Sekunden pro Bild brauchte, erzeugt FLUX.2 Klein in **unter 0,5 Sekunden** auf einer RTX 4090. Es ist ein 32B Diffusion Transformer-(DiT)-Modell mit einer Apache-2.0-Lizenz, und seit Januar 2026 wird es sogar experimentell in Ollama unterstützt.

## Hauptfunktionen

* **unter 0,5 Sekunden Generierungszeit**: 20–60× schneller als FLUX.1
* **32B DiT-Architektur**: Gleichbleibende Qualität wie FLUX.1 dev
* **Apache-2.0-Lizenz**: Vollständige kommerzielle Nutzung
* **Ollama-Unterstützung**: Experimentelle Bildgenerierung über Ollama (Jan. 2026)
* **Kompatibel mit ComfyUI**: Direkter Ersatz für FLUX.1-Workflows
* **LoRA + ControlNet**: Community-Adapter verfügbar

## Anforderungen

| Komponente | Minimum                 | Empfohlen     |
| ---------- | ----------------------- | ------------- |
| GPU        | RTX 3090 24 GB          | RTX 4090 24GB |
| VRAM       | 16 GB (mit Auslagerung) | 24 GB         |
| RAM        | 32 GB                   | 64 GB         |
| Festplatte | 40 GB                   | 60 GB         |
| CUDA       | 12.8+                   | 12.8+         |

**Empfohlene Clore.ai-GPU**: RTX 4090 24 GB ($0,14–0,42/Stunde) — Generierung unter einer Sekunde

### Geschwindigkeitsvergleich: FLUX.1 vs. FLUX.2 Klein

| GPU      | FLUX.1 dev (20 Schritte) | FLUX.2 Klein | Beschleunigung |
| -------- | ------------------------ | ------------ | -------------- |
| RTX 3090 | \~25 Sek.                | \~1,2 Sek.   | 20×            |
| RTX 4090 | \~12 Sek.                | \~0,4 Sek.   | 30×            |
| RTX 5090 | \~8 Sek.                 | \~0,25 Sek.  | 32×            |
| H100     | \~5 Sek.                 | \~0,15 Sek.  | 33×            |

## Schnellstart mit diffusers

```python
import torch
from diffusers import FluxPipeline

pipe = FluxPipeline.from_pretrained(
    "black-forest-labs/FLUX.2-klein",
    torch_dtype=torch.bfloat16
)
pipe.to("cuda")

# Bild in < 0,5 Sekunden generieren!
image = pipe(
    prompt="ein Cyberpunk-GPU-Mining-Rig in einem neonbeleuchteten Serverraum, fotorealistisch",
    height=1024,
    width=1024,
    num_inference_steps=4,  # Klein braucht nur 4 Schritte!
    guidance_scale=3.5,
).images[0]

image.save("output.png")
```

### Speichereffizienter Modus (16-GB-GPUs)

```python
pipe = FluxPipeline.from_pretrained(
    "black-forest-labs/FLUX.2-klein",
    torch_dtype=torch.bfloat16
)
pipe.enable_model_cpu_offload()  # Passt auf 16 GB
pipe.vae.enable_tiling()         # Spart ~2 GB

image = pipe("eine Berglandschaft bei Sonnenuntergang", num_inference_steps=4).images[0]
```

## ComfyUI-Workflow

FLUX.2 Klein funktioniert als direkter Ersatz in bestehenden FLUX.1-ComfyUI-Workflows:

1. Lade den FLUX.2-Klein-Checkpoint nach `ComfyUI/models/diffusion_models/`
2. Ändere in deinem Workflow den Checkpoint-Knoten so, dass er auf FLUX.2 Klein verweist
3. Reduziere die Schritte auf 4 (statt 20–50 bei FLUX.1)
4. Setze die Guidance-Scale auf 3,0–4,0

```bash
# Modell für ComfyUI herunterladen
cd ComfyUI/models/diffusion_models/
wget https://huggingface.co/black-forest-labs/FLUX.2-klein/resolve/main/flux2-klein.safetensors
```

## Batch-Generierung

Mit Generierung unter einer Sekunde ermöglicht FLUX.2 Klein massive Batch-Verarbeitung:

```python
import torch
from diffusers import FluxPipeline

pipe = FluxPipeline.from_pretrained(
    "black-forest-labs/FLUX.2-klein", torch_dtype=torch.bfloat16
).to("cuda")

prompts = [
    "ein roter Sportwagen auf einer Bergstraße, filmisch",
    "ein gemütliches Café-Interieur, warmes Licht",
    "ein Astronaut schwebt über der Erde, hyperrealistisch",
    "eine mittelalterliche Burg im Herbst, Fantasy-Kunst",
    # ... füge Hunderte weitere hinzu
]

for i, prompt in enumerate(prompts):
    image = pipe(prompt, num_inference_steps=4, guidance_scale=3.5).images[0]
    image.save(f"batch_{i:04d}.png")
    print(f"Generiert {i+1}/{len(prompts)}")

# Auf einer RTX 4090: ~100 Bilder in unter 1 Minute!
```

## LoRA-Unterstützung

```python
pipe = FluxPipeline.from_pretrained(
    "black-forest-labs/FLUX.2-klein", torch_dtype=torch.bfloat16
).to("cuda")

# Eine auf der FLUX-Architektur trainierte LoRA laden
pipe.load_lora_weights("your-lora/flux2-style-lora", weight_name="lora.safetensors")
pipe.fuse_lora(lora_scale=0.8)

image = pipe("ein Porträt im trainierten Stil", num_inference_steps=4).images[0]
```

## Tipps für Clore.ai-Nutzer

* **König der Stapelverarbeitung**: Bei 0,4 Sek./Bild kannst du auf einer RTX 4090 über 10.000 Bilder pro Stunde generieren
* **Nur 4 Schritte**: Nicht mehr verwenden — Klein ist für 4 Schritte optimiert (mehr verbessert die Qualität nicht)
* **Dieselben LoRAs wie FLUX.1**: Die meisten FLUX.1-LoRAs sind mit Klein kompatibel
* **ComfyUI direkt einsetzbar**: Einfach den Checkpoint austauschen, Schritte auf 4 ändern
* **RTX 3090 ist brauchbar**: 1,2 Sek./Bild sind bei 0,07–0,21 $/Std. immer noch großartig

## Fehlerbehebung

| Problem                    | Lösung                                                                                    |
| -------------------------- | ----------------------------------------------------------------------------------------- |
| OOM auf 24 GB              | Verwende `enable_model_cpu_offload()` + `vae.enable_tiling()`                             |
| Unscharfe Bilder           | Stelle sicher `num_inference_steps=4`, nicht weniger. Prüfe guidance\_scale 3,0–4,0       |
| Langsame erste Generierung | Normal — das Modell wird beim ersten Aufruf geladen (\~30 s). Danach: unter einer Sekunde |
| ComfyUI-Checkpoint-Fehler  | Stelle sicher, dass du die `.safetensors` Datei hast, nicht das diffusers-Format          |

## Weiterführende Lektüre

* [FLUX.1-Leitfaden](/guides/guides_v2-de/bildgenerierung/flux.md) — ursprünglicher FLUX-Leitfaden mit Details zu LoRA und ControlNet
* [ComfyUI-Leitfaden](/guides/guides_v2-de/bildgenerierung/comfyui.md) — ComfyUI-Einrichtung und Workflows
* [Black Forest Labs Blog](https://blackforestlabs.ai/)
* [HuggingFace-Modell](https://huggingface.co/black-forest-labs/FLUX.2-klein)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.clore.ai/guides/guides_v2-de/bildgenerierung/flux2-klein.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
