Flux Kohya Inference Sampler
Test your trained LoRA with Kohya's own sampler
- flux_models
- image
Once you've got a trained Flux LoRA, you want to see it work - and FluxKohyaInferenceSampler lets you do that using Kohya's own inference code, the same code path the training pipeline uses internally, rather than ComfyUI's normal sampler. That's the point of it: it renders your LoRA under conditions closest to how it was trained and validated, which is the most apples-to-apples test you can run.
For everyday use you'd load the finished LoRA in a regular Flux generation workflow. This node is the specialist tool for checking the LoRA in Kohya's world before you trust it in yours.
How it works
It loads your Flux models plus a trained LoRA and generates an image. The inputs:
flux_models(TRAIN_FLUX_MODELS) - from a FluxTrainModelSelect node, the same model bundle you trained with.lora_name- a dropdown of your trained LoRA files.lora_method(applyormerge) - whether to apply the LoRA as an adapter at inference or merge it into the weights.applyis the normal path.prompt- what to generate (defaults to the pack's cheerful "illustration of a kitten").steps(default 20),guidance_scale(default 3.5),width/height(default 512×512),seed- standard Flux generation controls. Note the 3.5 guidance default, which is the usual Flux value.use_fp8(default true) - run the base in fp8 to save VRAM.apply_t5_attn_mask(default true) - matches the T5 masking used in training.
The single output is an image (IMAGE) you wire to a Preview or Save node.
When you'd use it
Reach for this to sanity-check a freshly trained LoRA under training-faithful conditions - same sampler lineage, same masking, same model bundle. If it looks right here and wrong in your normal Comfy workflow, the difference is in your graph's settings, which is useful to know. For actual production generation, though, use a standard Flux workflow; this is a verification tool.
Installing the pack
ComfyUI Manager: search ComfyUI Flux Trainer, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-FluxTrainer
pip install -r ComfyUI-FluxTrainer/requirements.txt
Torch 2.4.0+ recommended, plus kijai's ComfyUI-KJNodes for the example workflows.
Common issues
512×512 default looks soft. The defaults render at 512 for speed. Flux looks better at 1024; bump width/height up when you want a real look at quality rather than a quick check.
Your LoRA isn't in the dropdown. The lora_name list reads from your LoRA folder. If the file you just trained isn't there, it's in the trainer's output directory - copy it into ComfyUI's loras folder (FluxTrainSaveModel's copy_to_comfy_model_folder toggle does this for you) and refresh.
It doesn't match your normal workflow's output. That's expected - this uses Kohya's inference path, not ComfyUI's sampler. Treat divergence as a clue about your regular graph's settings (guidance, sampler, resolution), not as a broken LoRA.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| flux_models | TRAIN_FLUX_MODELS | — | |
| lora_name | COMBO | The name of the LoRA. | |
| lora_method | COMBO | whether to apply or merge the lora weights | |
| steps | INT | 201–256 | sampling steps |
| width | INT | 51264–4096 | image width |
| height | INT | 51264–4096 | image height |
| guidance_scale | FLOAT | 3.501–32 | guidance scale |
| seed | INT | 420–18446744073709550000 | — |
| use_fp8 | BOOLEAN | true | use fp8 weights |
| apply_t5_attn_mask | BOOLEAN | true | use t5 attention mask |
| prompt | STRING | illustration of a kitten | prompt |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |