Replicate black-forest-labs/flux-2-klein-9b
FLUX.2 Klein, no VRAM required β Replicate does the lifting
- IMAGE_1
- IMAGE_2
- IMAGE_3
- IMAGE_4
- IMAGE_5
- IMAGE
- API_JSON
This is the workhorse text-to-image node in this pack, and probably the one you'll reach for first. FLUX.2 Klein is Black Forest Labs' size-distilled line - the KB's Flux 2 panel describes it as the January 2026 answer that "reopened the consumer front," with Klein 9B the main rival to Z-Image for editing and generation. Locally it still wants around 13GB of VRAM. On Replicate, via this node, your only hardware requirement is an internet connection. For a CPU-only ComfyUI install, this is how you get FLUX-quality generation at all.
The flow is standard for the pack: your prompt goes out to black-forest-labs/flux-2-klein-9b, and you get back an IMAGE tensor plus API_JSON (the payload that was sent). Inputs that matter:
prompt(multiline) - the actual text-to-image prompt. The only required input beyond the pack-wide flags.aspect_ratio(default "1:1", twelve choices) andmegapixels(default "1", from 0.25 up to 4) - your composition and resolution knobs. Klein is a 9B model; it does 4 MP but the higher you go the slower and pricier each call gets.seed(default 0) - set it for reproducibility. Replicate is stateless, so ComfyUI's normal seed handling doesn't apply; this is your seed.go_fast(default true) - the distilled fast path. Leave it on unless you specifically want the slower, higher-quality pass.output_format(jpg default, or webp/png) andoutput_quality(95) - encoding of the returned image. PNG if you're going to keep editing; jpg if it's a deliverable.disable_safety_checker(default false) - Replicate's hosted models ship with a safety filter. Klein is already heavily safety-filtered by training (the KB's panel documents the "lobotomized" complaint), so this toggle is your only lever on top of that - and flipping it off doesn't undo the model's own filtering.IMAGE_1throughIMAGE_5- reference images. This is the part people miss: Klein is a unified generation/editing model, and these inputs let you feed it up to five reference images alongside the prompt. Even if you're using the base node "for generation," that's how you do image-guided work without a separate edit node.
dry_run and force_rerun are the pack-wide pair: dry-run tests your wiring with no API call (it returns your first input image as a mock), and force_rerun busts ComfyUI's output cache when you want a genuinely new call.
Install is the shared pack flow - ComfyUI Manager (search ComfyUI-API-DockerCPU), or:
cd ComfyUI/custom_nodes
git clone https://github.com/trustypangolin/ComfyUI-API-DockerCPU
cd ComfyUI-API-DockerCPU
pip install -r requirements.txt
Set REPLICATE_API_TOKEN and restart. It's under π¨ DockerCPU API/π¨ Replicate.
The honest economics: this is a pay-per-image model, and the two cost multipliers are megapixels and go_fast. Run at 1 MP with go_fast and you're in cheap-territory; jump to 4 MP with fast off and every generation is a noticeably bigger bill. Also remember the IMAGE_1..5 inputs aren't just decoration - if you've got a ComfyUI node graph already producing reference frames, wiring them in turns this from a plain text-to-image node into an image-edit/consistency node without swapping anything else. That's the node's sleeper feature.
Inputs (15)
| Name | Type | Default | Description |
|---|---|---|---|
| dry_run | BOOLEAN | false | β |
| force_rerun | BOOLEAN | false | β |
| prompt | STRING | β | |
| IMAGE_1opt | IMAGE | β | |
| IMAGE_2opt | IMAGE | β | |
| IMAGE_3opt | IMAGE | β | |
| IMAGE_4opt | IMAGE | β | |
| IMAGE_5opt | IMAGE | β | |
| aspect_ratioopt | COMBO | 1:1 | 12 options: 1:1, 16:9, 9:16, 3:2, 2:3, 4:3, +6 |
| megapixelsopt | COMBO | 1 | 5 options: 0.25, 0.5, 1, 2, 4 |
| seedopt | INT | 0 | β |
| go_fastopt | BOOLEAN | true | β |
| output_formatopt | COMBO | jpg | 3 options: webp, jpg, png |
| output_qualityopt | INT | 950β100 | β |
| disable_safety_checkeropt | BOOLEAN | false | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | β |
| API_JSON | STRING | β |