The model is the prompt upsampler for FLUX 3 Image Klein. It's a Qwen3.5-9B vision-language fine-tune that expands a short request (plus up to 10 reference images, plus optional bounding boxes) into the full scene caption FLUX 3 Klein needs. A short prompt sent to the image model as typed gives generic output. This repo is Apache-2.0 like its upstream. The FLUX 3 Klein image model itself is under the FLUX Kommunity License (mlx-community/flux-3-image-klein-bf16).
It loads with MLXVLM (mlx-swift-lm, qwen3_5) and with Python mlx-vlm. The upstream card is the reference for:
the system prompts (system_prompts.json: t2i, i2i, t2i_bbox, i2i_bbox);
the edit scaffold;
the decoding: greedy, presence penalty 1.5 for text-to-image and 0 for edits, enable_thinking=False, at most 3,584 new tokens.
Two details matter:
The presence penalty counts generated tokens only, as vLLM does. mlx-lm's presence penalty also counts the prompt.
References are prepared first: alpha over white, LANCZOS to 1 MP for one reference, 724² for two, 512² for 3–10, sides multiples of 32, then a JPEG q92 round trip.
import Flux3KleinUpsampler
let up = try await Flux3PromptUpsampler.load(directory: snapshotURL)
let caption = try await up.upsample("A man walking with his dog, afternoon sun")
Parity (the Swift/MLX port vs BFL's reference, flux3/pup.py)#
Check
Result
Prompt tokens vs the HF processor (t2i, t2i+boxes, 1-ref and 2-ref edits, edit+boxes)
exact, 737–1,914 tokens
Box planning / reconcile vs bbox.py
13/13 cases exact
1-ref edit caption on BFL's own reference pixels (bf16)
identical to BFL's caption, word for word
Text-to-image caption, man_dog (bf16)
0.991 word similarity to BFL's
Greedy decoding is chaotic near ties. BFL's own captions for the same request differ between their runs (0.25–1.0 similarity), so exact match is not the bar.