Optimizer Config Prodigy
The optimizer that finds its own learning rate
- optimizer_settings
Prodigy is the optimizer that made a lot of people stop obsessing over learning rate. Its whole pitch is adaptivity: you set the learning rate to 1.0 and it figures out the actual rate on its own as training goes. For the SDXL era that was a gift - finding a good LR by hand is tedious and easy to get wrong - and Prodigy became the community default because of it. OptimizerConfigProdigy is the node that wires Prodigy into a Flux Trainer run with its specific knobs exposed.
A reality check up front: Prodigy's dominance was an SDXL-era thing. On newer architectures the recipes people publish increasingly name AdamW8bit or Adopt-style optimizers instead, and Prodigy notably does not play well with Chroma. It's still a perfectly good choice, and a genuinely convenient one if hand-tuning LR isn't your idea of fun - just know it's no longer the automatic answer it once was.
How it works
The node outputs optimizer_settings (type ARGS) for the Init node. Remember Prodigy's core trick: set the learning_rate on the Init node to 1.0, not a tiny number, and let Prodigy scale from there. That's the part people get wrong.
The inputs worth knowing:
weight_decay(default 0) - regularization. A small value can help against overfitting.decouple(default true) - decoupled weight decay (the "AdamW" style). Leave it on; it's the recommended mode.use_bias_correction(default false) - an optional Prodigy stabilizer, occasionally worth trying if early training is jumpy.lr_scheduler(defaultconstant) - with an adaptive optimizer a constant schedule is common, since Prodigy is already adjusting the effective rate.min_snr_gamma(default 5) - standard loss weighting, leave at 5.
When to reach for it
Use Prodigy when you don't want to hunt for a learning rate and you're on SDXL or Flux (not Chroma). It's the "just let it figure it out" button. If you're following a modern recipe that specifies an exact LR and a plain optimizer, though, there's no need to override it with Prodigy - the auto-tuning is solving a problem that recipe already solved for you.
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
You set a tiny learning rate and it barely trains. The classic Prodigy mistake. Set the Init node's learning_rate to 1.0 - Prodigy interprets that as "scale freely," and a value like 1e-4 hobbles it.
Don't use it on Chroma. Chroma gradient-explodes with the wrong optimizer and Prodigy specifically doesn't work well there; that base wants Adam8bit with very low weight decay and a low fixed LR instead.
It's not magic on new architectures. Prodigy auto-tunes the LR, but it doesn't fix a bad dataset, wrong rank, or too many steps. If results are off, look at those first - the optimizer is rarely the bottleneck.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| max_grad_norm | FLOAT | 0.00 | gradient clipping |
| lr_scheduler | COMBO | constant | learning rate scheduler |
| lr_warmup_steps | INT | 0 | learning rate warmup steps |
| lr_scheduler_num_cycles | INT | 1 | learning rate scheduler num cycles |
| lr_scheduler_power | FLOAT | 1.00 | learning rate scheduler power |
| weight_decay | FLOAT | 0.0000 | weight decay (L2 penalty) |
| decouple | BOOLEAN | true | use AdamW style weight decay |
| use_bias_correction | BOOLEAN | false | turn on Adam's bias correction |
| min_snr_gamma | FLOAT | 5.00 | gamma for reducing the weight of high loss timesteps. Lower numbers have stronger effect. 5 is recommended by the paper |
| extra_optimizer_args | STRING | additional optimizer args |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| optimizer_settings | ARGS | — |