Flux Train Validate
Generate preview images mid-training so you can see if it's working
- network_trainer
- validation_settings
- network_trainer
- validation_images
Training is a black box until you can see what the model has actually learned. FluxTrainValidate cracks it open: dropped into your training chain, it generates sample images from the LoRA as it currently stands, so you can watch your subject or style emerge step by step instead of finding out at the very end whether the whole run was worth it.
This is the payoff of training inside ComfyUI. You're already in the tool that makes images, so previewing a mid-training checkpoint is just another node - no exporting the LoRA, loading it in a separate graph, and hoping.
How it works
FluxTrainValidate takes the network_trainer (NETWORKTRAINER) mid-chain, runs a quick inference pass with the current weights, and passes the trainer back out so training continues uninterrupted. It outputs the forwarded network_trainer plus validation_images (IMAGE) - the preview(s) you wire into a Preview Image or Save Image node to actually look at.
There's one optional input, validation_settings (type VALSETTINGS), which is where you control how the previews are generated - steps, resolution, sampler, seed, guidance. For SDXL runs you feed it from an SDXLTrainValidationSettings node. The prompts themselves come from the sample_prompts field you set way back on the Init node, so what you type there is what gets rendered here.
Where it sits in the flow
The canonical pattern is Loop → Validate → Loop → Validate, optionally with a FluxTrainSaveModel next to each Validate. Train a segment, render a preview, judge it, train more. A fixed seed in your validation settings is what makes this useful - same seed each time means the only thing changing between previews is the training itself, so you can actually see progress rather than seed lottery.
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 surrounding graph.
Common issues
Validation costs time and VRAM. Generating a preview is a full inference pass on top of training, so validating too often slows the whole run down, and on a tight card the extra memory can tip you into an OOM. Validate every few hundred steps, not every handful.
Use a fixed seed, or you're comparing noise. If the seed changes between validations you can't tell whether a difference is the training improving or just a different random draw. Lock the seed in your validation settings.
Previews look rough early - that's normal. A LoRA at 200 steps won't look like the finished thing. Watch the trend across several validations rather than judging any single early one, and remember the goal is to catch the point where likeness peaks before overfitting, which is exactly what a series of previews lets you see.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| network_trainer | NETWORKTRAINER | — | |
| validation_settingsopt | VALSETTINGS | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| network_trainer | NETWORKTRAINER | — |
| validation_images | IMAGE | — |