Flux LoRA Train End
Finalize the run and write out your finished LoRA
- network_trainer
- lora_name
- metadata
- lora_path
Every training graph needs a finish line, and FluxTrainEnd (its display name is "Flux LoRA Train End") is it. When your last FluxTrainLoop segment is done, this node closes the run out cleanly and writes the final LoRA to disk. It's the terminal node of the training chain - the point where "a trainer object flowing through my graph" becomes "a .safetensors file I can load and use."
It's a small node with an outsized job. Skipping a proper end step is how you end up with a half-saved run or no final file at all.
How it works
FluxTrainEnd takes the network_trainer (NETWORKTRAINER) after your final loop and finalizes it. It has one meaningful setting, save_state (default true), which controls whether the full training state gets saved alongside the LoRA - the optimizer state and everything needed to resume the run later, not just the adapter weights. Keep it on if you might want to continue training from here; the state files are large, so turn it off if you only care about the finished LoRA and want to save disk.
The outputs are all strings describing what it wrote:
lora_name- the name of the finished LoRA.lora_path- the full path to the file on disk. This is the one you'll actually use to go find it or feed it into a loader.metadata- the training metadata baked into the file (settings, etc.), handy for remembering how you trained it months later.
This is an output node, so it's a valid endpoint for the graph - it doesn't need anything downstream to fire.
Where it sits in the flow
A typical chain: Init → one or more FluxTrainLoop segments (with optional Validate/Save in between) → FluxTrainEnd. If you've been saving intermediate checkpoints with FluxTrainSaveModel along the way, End still gives you the clean final artifact and the state to resume from.
Installing the pack
ComfyUI Manager: search ComfyUI Flux Trainer, install, restart. Manually:
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 graphs.
Common issues
The final checkpoint isn't always your best one. This is the single most repeated finding in LoRA training: the last step often overfits. Don't assume FluxTrainEnd's output is automatically the keeper - compare it against the intermediate checkpoints you saved with FluxTrainSaveModel and the preview images from FluxTrainValidate, and pick the best, not the last.
save_state eats disk. Leaving it true writes the full resumable state every time, which is large. If you're done training and just want the LoRA, set it false.
You can't find your file. Read the lora_path output - it tells you exactly where the file landed. The base folder was set back on the Init node (output_dir / output_name), so if the path looks wrong, that's where it was decided.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| network_trainer | NETWORKTRAINER | — | |
| save_state | BOOLEAN | true | — |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| lora_name | STRING | — |
| metadata | STRING | — |
| lora_path | STRING | — |