Flux 2 Klein — Pro Pack on RunComfy
runcomfy.com · 9B model · 4B model · GitHub
Black Forest Labs' Flux 2 Klein (the distilled, low-latency variant of Flux 2) hosted on the RunComfy Model API — no API key, async REST.
When to pick this model (vs siblings)
Flux 2 Klein's distinct strength is latency-first creative iteration: sub-second feedback enables live art-direction sessions and rapid product visualization that batch-style models can't sustain. Pick it when iteration speed matters more than ceiling resolution.
If the user said "Flux 2 Klein" / "BFL Klein" / "flux klein" explicitly, route here regardless. If they said "Flux 2" generically, ask whether they want Klein (fast) or Pro (max quality) before defaulting.
Prerequisites
- RunComfy CLI —
npm i -g @runcomfy/cli - RunComfy account —
runcomfy loginopens a browser device-code flow. - CI / containers — set
RUNCOMFY_TOKEN=<token>instead ofruncomfy login.
Endpoints + input schema
Two variants, same endpoint shape, same prompt grammar.
blackforestlabs/flux-2-klein/9b/text-to-image
The fidelity-first variant. Use for polish / final output.
blackforestlabs/flux-2-klein/4b/text-to-image
The latency-first variant. Sub-second 4-step inference. Use for live iteration / concepting.
Same field set as 9B. Default steps is effectively 4 — the variant is built for that step count.
Reference images (both variants)
Up to 4 simultaneous reference images are supported on the same endpoint for style transfer / guided composition. The exact field name in the JSON body is documented on the model's API tab — pass it through the CLI verbatim. Reference-image use enables editing-style workflows without a separate /edit endpoint.
How to invoke
Fast concepting (4B, sub-second):
Polish / final (9B, ~25 steps):
Wide-format poster:
The CLI submits, polls every 2s until terminal, then downloads any *.runcomfy.net / *.runcomfy.com URL from the result into --output-dir. Stdout is the result JSON. Stderr is progress.
For pipe-friendly usage:
Prompting — what actually works
These are model-specific patterns that empirically improve output quality.
Subject-first declarative grammar. The structure Flux 2 Klein was trained on is "Subject + action + scene + style + lighting + camera + quality". Front-load the subject; trail with directives. Example: "A vibrant hummingbird mid-flight sipping nectar from a bright pink hibiscus, iridescent feathers in morning sun, soft bokeh tropical garden, macro photography, razor-sharp detail, cinematic lighting".
Specificity wins over flowery language. "4k product photo, softbox lighting, reflective table, 35mm, f/2.8" guides predictably. "A really pretty product image" doesn't.
Step-count by phase.
- Concepting: 4–8 steps on the 4B variant — sub-second feedback for live exploration.
- Refinement: 8–15 steps still on 4B, locking in subject + framing.
- Polish: ~25 steps on the 9B variant — texture, microdetail, fine typography.
Multi-reference alignment. When passing reference images, keep their aesthetics aligned. Mixing a watercolor + a photoreal + a 3D render in the same call confuses the editor. Pick one consistent visual register across all refs.
Conditional edits: state what stays, then what changes. "Same composition and lighting as reference, but change the background from beach to mountain studio." This pattern holds composition stable.
For text rendering (Klein has the 8B Qwen3 embedder, decent but not GPT Image 2 territory): add "crisp typography, high-contrast label" and bump steps to ~25 if the text comes out soft. For heavy in-image text or multilingual rendering, route to GPT Image 2 instead.
Anti-patterns:
- Don't conflict adjectives. "minimalist + ornate" cancels.
- Don't exceed ~512 tokens. The model degrades, doesn't truncate gracefully.
- Don't ask for 4K — the model's resolution ceiling is ~2K.
- Don't ask for ultra-wide (>16:9) — the model crops.
Where it shines
Sample prompts (verified to produce strong results)
From the model page (BFL example):
Product-photo pattern:
Brand-consistent pair (multi-ref):
Limitations
- Resolution ceiling ~2K — for higher native res, route to Seedream 5.
- Aspect ratio cap 16:9 — extreme wide/tall ratios get cropped.
- Prompt cap ~512 tokens — longer degrades quality; doesn't truncate gracefully.
- Reference image cap 4 — more than 4 increases latency and dilutes guidance.
- Text rendering — the 8B Qwen3 embedder helps but GPT Image 2 still wins for embedded text precision.
Exit codes
The runcomfy CLI uses sysexits-style codes:
Full reference: docs.runcomfy.com/cli/troubleshooting.
How it works
- The skill invokes
runcomfy run blackforestlabs/flux-2-klein/<variant>/text-to-imagewith a JSON body matching the schema. - The CLI POSTs to
https://model-api.runcomfy.net/v1/models/blackforestlabs/flux-2-klein/<variant>/text-to-imagewith the user's bearer token. - The Model API returns a
request_id; the CLI pollsGET .../requests/<id>/statusevery 2 seconds. - On terminal status, the CLI fetches
GET .../requests/<id>/resultand downloads any URL whose host ends with.runcomfy.netor.runcomfy.cominto--output-dir. Other URLs are listed but not fetched. Ctrl-Cwhile polling sendsPOST .../requests/<id>/cancelso you don't get billed for GPU you stopped.
What this skill is not
Not a self-hosted Flux runner. Not a capability grant — depends on a working RunComfy account. Not multi-tenant.
Security & Privacy
- Token storage:
runcomfy loginwrites the API token to~/.config/runcomfy/token.jsonwith mode 0600 (owner-only read/write). SetRUNCOMFY_TOKENenv var to bypass the file entirely in CI / containers. - Input boundary: the user prompt is passed as a JSON string to the CLI via
--input. The CLI does NOT shell-expand the prompt; it transmits the JSON body directly to the Model API over HTTPS. No shell injection surface from prompt content. - Third-party content: image / mask / video URLs you pass are fetched by the RunComfy model server, not by the CLI on your machine. Treat external URLs as untrusted; image-based prompt injection is a known risk for any image-edit / video-edit model.
- Outbound endpoints: only
model-api.runcomfy.net(request submission) and*.runcomfy.net/*.runcomfy.com(download whitelist for generated outputs). No telemetry, no callbacks. - Generated-file size cap: the CLI aborts any single download > 2 GiB to prevent disk-fill from a malicious or runaway model output.

