Flux 2 Klein 9B Base Trainer
edit trainerfal-ai/flux-2-klein-9b-base-trainer/edit
Teach Klein 9B a transformation with before and after image pairs.
Instead of learning what something looks like, an edit LoRA learns what a change looks like. The zip holds pairs named ROOT_start.ext and ROOT_end.ext; the model learns to turn every start into its end. Up to four extra reference images per pair (ROOT_start2..4) can condition the edit.
What goes in the zip
photo_start.jpg + photo_end.jpg per pair, identical composition between the two, only the transformation differing. 10 to 20 clean pairs go a long way. Put the instruction in default_caption.
Good starting point
steps: 1000learning_rate: 0.00005Parameters
Schema facts come straight from the fal API; the notes are ours.
Required
image_data_urlstringrequiredURL to a zip archive of your training images, optionally with matching .txt caption files.
In the atelier: The album you hand the painter. It is the single biggest factor in what the LoRA becomes.
Tip: 15 to 30 sharp, varied images beat 200 sloppy ones. Vary angle, lighting and background; keep the subject consistent.
Watch out: Duplicate or near-duplicate images push the LoRA toward memorizing instead of learning.
Raw schema description
URL to the input data zip archive. The zip should contain pairs of images. The images should be named: ROOT_start.EXT and ROOT_end.EXT For example: photo_start.jpg and photo_end.jpg The zip can also contain up to four reference image for each image pair. The reference images should be named: ROOT_start.EXT, ROOT_start2.EXT, ROOT_start3.EXT, ROOT_start4.EXT, ROOT_end.EXT For example: photo_start.jpg, photo_start2.jpg, photo_end.jpg The zip can also contain a text file for each image pair. The text file should be named: ROOT.txt For example: photo.txt This text file can be used to specify the edit instructions for the image pair. If no text file is provided, the default_caption will be used. If no default_caption is provided, the training will fail.
Optional
stepsintegerdefault: 1000100 – 10000How many training iterations the model runs on your dataset. More steps means the LoRA sees your images more times.
In the atelier: Practice repetitions. Too few and the painter never picks up the skill. Too many and he stops learning and starts memorizing your exact photos.
Tip: Around 1000 is a solid default for a 15 to 30 image subject dataset. Small datasets need fewer steps, not more.
Watch out: If outputs start reproducing your training photos almost exactly (same pose, same background), you overtrained. Go back down.
Raw schema description
Total number of training steps.
learning_ratenumberdefault: 5e-5How big each learning update is. Controls how aggressively the model changes per step.
In the atelier: The painter's eagerness. A high rate is frantic practice: fast but sloppy, and it can wreck habits he already had. A low rate is careful practice: slow, but precise.
Tip: Stay near the trainer's default unless you have a reason. If results look fried or oversaturated, lower it. If the subject barely shows after many steps, raise it slightly or add steps.
Watch out: Learning rate and steps trade off against each other. Doubling both at once is how datasets get burned.
Raw schema description
Learning rate applied to trainable parameters.
default_captionstringCaption used for any image that has no .txt caption file in the zip.
In the atelier: The note the painter assumes when a photo in the album has no note attached.
Tip: For edit trainers this often carries the whole instruction, like 'turn this sketch into a finished painting'.
Raw schema description
Default caption to use when caption files are missing. If None, missing captions will cause an error.
output_lora_formatenumdefault: falfal | comfyNaming scheme for the saved weights: 'fal' for fal inference endpoints, 'comfy' for ComfyUI workflows.
Tip: Use 'fal' if you plan to run the LoRA on fal endpoints. Pick 'comfy' only if your pipeline lives in ComfyUI.
Watch out: A LoRA saved in the wrong key format loads silently with no effect in some tools. If a LoRA seems to do nothing, check the format first.
Raw schema description
Dictates the naming scheme for the output weights
Call it
import { fal } from "@fal-ai/client";
const result = await fal.subscribe("fal-ai/flux-2-klein-9b-base-trainer/edit", {
input: {
"image_data_url": "https://your-cdn.com/dataset.zip",
"steps": 1000,
"learning_rate": 0.00005
},
logs: true,
});
console.log(result.data);