Init Flux Training
Full Flux fine-tuning (DreamBooth) in ComfyUI, not a LoRA
- flux_models
- dataset
- optimizer_settings
- resume_args
- network_trainer
- epochs_count
- args
Note the missing word: this is InitFluxTraining, not LoRA Training. This node does a full fine-tune of the Flux model - the DreamBooth path - where you're updating the actual model weights instead of training a small adapter on top. It's the heavyweight cousin of InitFluxLoRATraining, and it's the one you reach for when a LoRA isn't cutting it and you want a full checkpoint out the other end.
Full fine-tuning consistently produces better quality than a LoRA - that's the settled community verdict - but it's far more demanding on hardware and it produces multi-gigabyte checkpoints instead of a tidy few-megabyte adapter. The usual advice holds: LoRA for personal and creative projects, full fine-tune for a base model you intend to distribute widely. Kijai's README flags this path as "untested" relative to the LoRA nodes, so go in expecting rough edges.
How it works
Same shape as the rest of the pack. Required inputs are flux_models (from FluxTrainModelSelect), a dataset JSON, and optimizer_settings. It builds the trainer and outputs network_trainer (NETWORKTRAINER) for a FluxTrainLoop node to step through, plus epochs_count and raw args. The difference from the LoRA node is what's not here - there's no network_dim/network_alpha, because you're not building a low-rank network, you're training the model itself.
The inputs that matter
learning_rate(default 4e-6) - much lower than the LoRA default, and correctly so. Full fine-tunes want a gentler learning rate because every weight is in play.blocks_to_swap- this is the load-bearing knob for full Flux fine-tuning. Block swapping offloads transformer blocks to system RAM, and it's what brought Flux DreamBooth down to famously low VRAM figures. Expect to need 32GB+ of system RAM to lean on it.cpu_offload_checkpointing(default true) andfp8_base- more memory relief. Full fine-tuning is a VRAM fight and these are your tools.optimizer_fusing(fused_backward_passorblockwise_fused_optimizers) - a memory optimization specific to the full-training path that fuses the optimizer step into the backward pass. Leave it on the default unless you have a reason.guidance_scale,timestep_sampling,discrete_flow_shift- the Flux flow-matching controls, shared with the LoRA node; the defaults are the starting point.
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. Critically, for full model training the README says you need the fp16 version of the main model - not the fp8 file you might use for LoRA work. And your VAE has to be the non-diffusers ae.safetensors.
Common issues
You almost certainly want a LoRA instead. Be honest about why you're here. Full fine-tuning eats VRAM, time, and disk, and for a character or style the community's near-universal answer is that a well-trained LoRA gets you most of the way at a fraction of the cost. Reach for this node when you're building a base model to hand out, not to teach Flux one face.
Wrong model precision. If you loaded the fp8 model expecting full training to work, it won't behave - full fine-tuning wants the fp16 main model per the README.
It's the untested path. Kijai's own words. The LoRA nodes get the attention; this one is more likely to surprise you. Do a short validation run and watch VRAM before you commit to a long job.
Inputs (32)
| Name | Type | Default | Description |
|---|---|---|---|
| flux_models | TRAIN_FLUX_MODELS | — | |
| dataset | JSON | — | |
| optimizer_settings | ARGS | — | |
| output_name | STRING | flux | — |
| output_dir | STRING | flux_trainer_output | path to dataset, root is the 'ComfyUI' folder, with windows portable 'ComfyUI_windows_portable' |
| learning_rate | FLOAT | 0.00000–10 | learning rate |
| max_train_steps | INT | 15001–100000 | max number of training steps |
| apply_t5_attn_mask | BOOLEAN | true | apply t5 attention mask |
| t5xxl_max_token_length | INT | 51264–4096 | dev and LibreFlux uses 512, schnell 256 |
| cache_latents | COMBO | caches text encoder outputs | |
| cache_text_encoder_outputs | COMBO | caches text encoder outputs | |
| weighting_scheme | COMBO | 5 options: logit_normal, sigma_sqrt, mode, cosmap, none | |
| logit_mean | FLOAT | 0.000–1 | mean to use when using the logit_normal weighting scheme |
| logit_std | FLOAT | 1.000–1 | std to use when using the logit_normal weighting scheme |
| mode_scale | FLOAT | 1.290–10 | Scale of mode weighting scheme. Only effective when using the mode as the weighting_scheme |
| loss_type | COMBO | l2 | loss type |
| timestep_sampling | COMBO | Method to sample timesteps: sigma-based, uniform random, sigmoid of random normal and shift of sigmoid (recommend value of 3.1582 for discrete_flow_shift) | |
| sigmoid_scale | FLOAT | 1.00–10 | Scale factor for sigmoid timestep sampling (only used when timestep-sampling is sigmoid |
| model_prediction_type | COMBO | How to interpret and process the model prediction: raw (use as is), additive (add to noisy input), sigma_scaled (apply sigma scaling) | |
| cpu_offload_checkpointing | BOOLEAN | true | offload the gradient checkpointing to CPU. This reduces VRAM usage for about 2GB |
| optimizer_fusing | COMBO | reduces memory use | |
| blocks_to_swap | INT | 00–100 | Sets the number of blocks (~640MB) to swap during the forward and backward passes, increasing this number lowers the overall VRAM used during training at the expense of training speed (s/it). |
| guidance_scale | FLOAT | 1.001–32 | guidance scale |
| discrete_flow_shift | FLOAT | 1.00000–10 | for the Euler Discrete Scheduler, default is 3.0 |
| highvram | BOOLEAN | false | memory mode |
| fp8_base | BOOLEAN | false | use fp8 for base model |
| gradient_dtype | COMBO | bf16 | to use the full fp16/bf16 training |
| save_dtype | COMBO | bf16 | the dtype to save checkpoints as |
| attention_mode | COMBO | sdpa | memory efficient attention mode |
| sample_prompts | STRING | illustration of a kitten | photograph of a turtle | validation sample prompts, for multiple prompts, separate by `|` |
| additional_argsopt | STRING | additional args to pass to the training command | |
| resume_argsopt | ARGS | resume args to pass to the training command |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| network_trainer | NETWORKTRAINER | — |
| epochs_count | INT | — |
| args | KOHYA_ARGS | — |