FLUX.2 klein 4B
Generate images in four steps.

FLUX.2 klein 4B is Black Forest Labs’ compact image-generation and editing model. Deploy its four-step sampling pipeline on AI Fabric to build image previews and reference-based variations into your creative application.

€5 in free credits for every new customer.

Plan your deployment

AI Fabric access is opening gradually. GPU configuration is confirmed during onboarding.

Image previews and creative variations.

Build a short loop from brief to preview to revision. Keep each image’s settings so a promising result can become a repeatable production asset.

01

Build a visual concept explorer.

Let users change a brief and compare a small set of candidates. Keep the seed and settings with each image so a selected direction can be reproduced during the next iteration.

02

Generate tailored interface illustrations.

Create visual drafts from a product-specific art brief, then review them for layout and contrast. Save approved assets in the application’s delivery format rather than relying on an expiring worker file.

03

Prototype reference-based variations.

Offer an editing workflow around an approved reference image. Test how changes to the prompt affect the subject and composition before letting the workflow publish anything automatically.

Model capabilities and upstream setup: FLUX.2 klein 4B publisher reference. Reviewed .

Deployment preparation

Run FLUX.2 klein 4B with Diffusers.

The publisher’s distilled 4B example uses four inference steps and CPU offloading. Keep those settings as a reproducible baseline, then test the image sizes and reference inputs your product will actually accept.

  1. Prepare a compatible Diffusers, PyTorch, Transformers and Accelerate environment for Flux2KleinPipeline.
  2. Run one prompt at the selected image size and record cold-start time separately from a warm generation.
  3. Package the pipeline, persist the returned image and expose a job result through your application backend.
AI Fabric preparation guide
python
import torch
from diffusers import Flux2KleinPipeline

pipe = Flux2KleinPipeline.from_pretrained(
    "black-forest-labs/FLUX.2-klein-4B",
    torch_dtype=torch.bfloat16,
)
pipe.enable_model_cpu_offload()
image = pipe(
    prompt="A paper-cut city powered by wind and sunlight",
    width=1024, height=1024,
    guidance_scale=1.0, num_inference_steps=4,
    generator=torch.Generator("cuda").manual_seed(7),
).images[0]
image.save("concept.png")

Upstream-style Diffusers baseline. CPU offloading also needs host RAM. Validate peak memory and runtime on your selected AI Fabric card.

GPU memory & performanceBlack Forest Labs quotes about 13 GB of VRAM for this variant. Treat that as an upstream reference, not a Blade capacity or speed guarantee; verify the complete worker on the selected card.

In your applicationCancel or deduplicate superseded preview jobs when users change prompts quickly. Otherwise a responsive-looking interface can accumulate expensive unused generations.

AI Fabric availability & costRTX A4500 (20 GB) and RTX 2000 Ada (16 GB) are the GPU options. Access, runtime settings and billing are confirmed during onboarding. No Blade latency or throughput benchmark is published for this configuration.

Add image previews to a creative assistant.

Your assistant can draft the brief and call a backend image tool. Give the user the returned preview before requesting another variation. Track prompt, seed and approved output so the conversational history maps to actual image files.

01 / InputCreative brief
02 / ProcessFour-step image worker
03 / ResultPreview → refine or save

FLUX.2 klein 4B
deployment FAQ.

Which FLUX.2 klein version does this page cover?

The distilled 4B checkpoint. Do not transfer its memory or step count to the base or 9B variants without checking their own setup.

Will images generate in under a second on Blade?

That is not an established Blade benchmark. Measure the selected GPU, resolution, offloading setup and complete request path before promising interactive latency.

How is this different from calling the hosted FLUX API?

AI Fabric gives you a worker configuration to prepare and operate. The managed Models route has its own hosted configuration and per-image pricing; it is a different integration choice.

How much does running FLUX.2 klein 4B on AI Fabric cost?

Measure cost per approved image at the intended size and sampling settings. Include discarded previews and cancelled or repeated jobs when estimating an interactive application.

The GPU billing unit and idle policy are confirmed during onboarding. Managed Models API rates do not apply to this deployment.

Checkpoint: black-forest-labs/FLUX.2-klein-4B. Access requirements and licence: FLUX.2 klein 4B publisher reference.

Browse all AI Fabric model guides ↗

Contact the team

Loading the form…