FLUX.2 klein base 4B
FLUX.2 klein base 4B from black-forest-labs. Source-based hardware guidance from its published configuration.
At a glance
- Parameters
- 3.88B
- Architecture
- unknown
- License
- apache-2.0
- Software
- Diffusers
Will it run on your machine?
Save your machine to see a personalized rating and its reasoning.
Add my hardwareWays to run it
Diffusers · See official guide
Repository-specific command in publisher documentation; confirm dependencies and hardware in the source.
import torch
from diffusers import Flux2KleinPipeline
device = "cuda"
dtype = torch.bfloat16
pipe = Flux2KleinPipeline.from_pretrained("black-forest-labs/FLUX.2-klein-base-4B", torch_dtype=dtype)
pipe.enable_model_cpu_offload() # save some VRAM by offloading the model to CPU
prompt = "A cat holding a sign that says hello world"
image = pipe(
prompt=prompt,
height=1024,
width=1024,
guidance_scale=4.0,
num_inference_steps=50,
generator=torch.Generator(device=device).manual_seed(0)
).images[0]
image.save("flux-klein.png")Explore its uses
Keep exploring
Qwen-Image 2.1
Generate and edit images, including transparent images and edits guided by reference images.
FLUX.1 schnell
A 12-billion-parameter image model designed for generation in one to four steps.
FLUX.2 Klein · 4B
FLUX.2 klein 4B is a compact 4-billion-parameter rectified flow transformer from Black Forest Labs, released under the Apache 2.0 license. It unifies text-to-image generation and multi-reference image editing in a single model, supporting image-to-image pipelines. According to the model card, it is designed for speed, with end-to-end inference reportedly as low as under a second, and can run on consumer hardware with as little as 13GB VRAM, such as RTX 3090/4070 GPUs. It is intended for local development, edge deployment, and production use, with reference implementations available via GitHub, Diffusers, and ComfyUI, as well as a BFL API.