Replicate black-forest-labs/flux-2-klein-9b-base-lora
Klein 9B, the LoRA-ready base β fast inference aimed at fine-tunes
- IMAGE_1
- IMAGE_2
- IMAGE_3
- IMAGE_4
- IMAGE_5
- IMAGE
- API_JSON
There are two ways to run FLUX.2 Klein on Replicate: the general model, and this one - the -base-lora variant, which exists for LoRA inference. The README's own framing calls it "fast fine-tuned LoRA inference": it's Klein 9B as a base that Replicate can load LoRAs onto, so you can run somebody's fine-tune - a character, a style, an aesthetic trained into a low-rank adapter - without holding the 9B model or the LoRA on your machine. For a CPU-only ComfyUI install, this is the node that makes "run that community LoRA" a real, achievable thing.
The node itself looks a lot like the plain Klein node - which makes sense, same family, same schema shape. prompt in, IMAGE out (tensor), API_JSON alongside. Inputs that matter:
prompt(multiline) - the generation prompt. Same as the base model; the LoRA does the steering.aspect_ratio(default "1:1", twelve choices) - includingmatch_input_imageif you're working from a reference.output_megapixels(default "1", 0.25β4) - resolution tier. Keep it at 1 for iteration; the 9B model runs slower and dearer the higher you go.seed(default 0) - Replicate is stateless, so this is your reproducibility control.IMAGE_1throughIMAGE_5- reference images. Klein's unified generation/editing capability means the LoRA base can also take image references, which is how you combine a fine-tune with an image guide.output_format(jpg default, or webp/png) andoutput_quality(95) - encoding.disable_safety_checker(default false) - the hosted safety filter, on by default. Klein is already heavily safety-filtered by training (the KB's Flux 2 panel documents the model's "lobotomized" reception), so this toggle is a thin extra layer on top, not a key to anything the model itself rejects.dry_run/force_rerun- pack-wide: test for free, and force a fresh call past ComfyUI's cache.
The honest caveat, and it's an important one: in the current schema this node exposes no LoRA URL input. The README describes the model as LoRA-capable and the pack's HuggingFace nodes (HF Lora URL Builder, HF Lora Combiner) exist to assemble LoRA URL lists "for use with other nodes" - but the auto-generated schema for this node, as shipped, doesn't show a field to hand those URLs to. So the practical reality today: you get Klein 9B's fast inference with the LoRA-ready base model, and you should check the node's inputs in your own install (and the API_JSON output) to see whether a LoRA field is present before you build a workflow around it. Don't wire up HFLoraCombiner β this node and expect it to just connect; verify first.
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.
Where you'd reach for it over the plain Klein node: when the model you actually want is a LoRA fine-tune and you want the base that was built to serve it. And if the LoRA-input situation gets fixed in a schema refresh (the pack's import_schemas.py --update is how schemas get re-imported), this becomes the node for community fine-tunes on a GPU-less box - which, given the KB's note that the community still trains NSFW and style LoRAs on Klein 9B, is a bigger deal than the current node count suggests.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| dry_run | BOOLEAN | false | β |
| force_rerun | BOOLEAN | false | β |
| prompt | STRING | β | |
| aspect_ratioopt | COMBO | 1:1 | 12 options: 1:1, 16:9, 9:16, 3:2, 2:3, 4:3, +6 |
| output_megapixelsopt | COMBO | 1 | 5 options: 0.25, 0.5, 1, 2, 4 |
| seedopt | INT | 0 | β |
| IMAGE_1opt | IMAGE | β | |
| IMAGE_2opt | IMAGE | β | |
| IMAGE_3opt | IMAGE | β | |
| IMAGE_4opt | IMAGE | β | |
| IMAGE_5opt | IMAGE | β | |
| 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 | β |