Nodes/ComfyUI-FLUX-BFL-API/Flux 2 Klein 9B (BFL)
ComfyUI Node

Flux 2 Klein 9B (BFL)

Flux 2's mid-size model without the 9B download

By gelasdev·Created 2 years ago·Updated 26 days ago· 49
Flux 2 Klein 9B (BFL)
  • config
  • IMAGE
prompt
safety_tolerance2
output_formatjpeg
input_image
input_image_2
input_image_3
input_image_4
width0
height0
seed-1
webhook_url
webhook_secret

Flux 2 Klein 9B (BFL) is the middle child of the Flux 2 family, and for many people it's the sweet spot. Klein 9B is the size-distilled variant that fixed Flux 2's hardware problem - the one the community actually adopted as the main rival to Z-Image for editing, per BFL's own read of the landscape - and through this node you get it via the API with zero downloads. Where Klein 4B is the tiny, budget Apache-2.0 tier, 9B is the one that keeps the quality while staying lightweight: the strongest practical Flux 2 for a lot of jobs.

The local version is non-commercial (BFL's classic tiering - the useful weights stay non-commercial, the permissive tier is the smallest). The API version sidesteps that whole question: you're renting inference, not redistributing weights, so the license math changes. And if your GPU can't hold even the distilled model, the API is the only way you're touching Klein 9B at all.

How it works

Same pack machinery as every generation node: build the request from your prompt and up to four base64 reference images, POST to flux-2-klein-9b, poll get_result?id=... every 5 seconds, return an IMAGE. It inherits Flux 2's signature trick - reference images in context for character/object/style consistency - in the smaller model's four-image envelope.

The inputs that matter

  • prompt - the description and the edit/keep instructions.
  • input_image … input_image_4 - up to four references, base64 from Image to Base64 (BFL). This is where the quality lives; Klein 9B with a good reference set is the reason people rate it above Z-Image for editing.
  • width / height - optional (≥64), default lets BFL choose.
  • safety_tolerance - 0–5, default 2.
  • output_format - jpeg (default) or png.
  • Optional seed, webhook_url/secret, config.

Installing it

One pack, one install, nothing heavy:

cd ComfyUI/custom_nodes
git clone https://github.com/gelasdev/ComfyUI-FLUX-BFL-API.git

Restart, key in config.ini or a Flux Config (BFL) node. The only declared dependency is torch, already bundled with ComfyUI.

Where people get burned

  • Picking 9B for everything when 4B would do. If you're iterating on concepts, 4B is cheaper and near enough in quality. Reserve 9B for the edits and finals where the extra fidelity actually shows.
  • Forgetting the licensing difference from 4B. Local 9B is non-commercial; local 4B is Apache 2.0. On the API it's moot, but if you're comparing, know which side of that line you're standing on.
  • Black output. The pack's universal failure signal - moderation, API error, or poll timeout. [BFL] logs print a curl equivalent per call; replay it to see what the API actually returned.
  • Underusing references. A Klein 9B call with zero references is a plain text-to-image; with a reference set it becomes an editing/consistency tool. The model's reputation is built on the latter.

Bottom line: if you could only install one Klein node from this pack, 9B is the one - it's the tier that's good enough for real work but light enough to be practical, and the API version removes both the hardware and the licensing hurdles.

CategoryBFL/Flux2

Inputs (13)

NameTypeDefaultDescription
promptSTRING
safety_toleranceINT20–5
output_formatCOMBOjpeg2 options: jpeg, png
input_imageoptSTRING
input_image_2optSTRING
input_image_3optSTRING
input_image_4optSTRING
widthoptINT0
heightoptINT0
seedoptINT-1
webhook_urloptSTRING
webhook_secretoptSTRING
configoptBFL_CONFIG

Outputs (1)

NameTypeDescription
IMAGEIMAGE